How can we help you today? How can we help you today?
jonswaino

Activity overview

Latest activity by jonswaino

Can't generate insert scripts without Primary Key
Hi, I'm trying to generate insert scripts for a database. I need to run the script across the live servers. The way I have done it is to create an empty table on a test database, then compare the...
2 followers 3 comments 0 votes
SQLCompare when sychronising is not copying over case
We have an sproc which fails on the server because the sproc is in mixed case. I can see that our scripts folder has the sproc in all upper case. However after sync has completed, if I check the ...
1 follower 1 comment 0 votes
SQLCompare is hanging on 'Getting latest version of db'
Hi, I am having a problem with SQL Compare. When I do a database comparision with my SQL scripts folder, the SQL compare process dialog pops-up and hangs on the 1st 'Getting latest version of datab...
2 followers 2 comments 0 votes
Changeset doesn't pop-up after db sync
Hi, I don't know if something has changed with my setup, but I used to have SQL changeset pop-up automatically when I synced to my database scripts folder. The folder is registered with ChangeSet,...
1 follower 1 comment 0 votes
Just an update, I've been looking at this all today and still not got anywhere. This is not so much a problem with Primary Keys (as the title suggests). Its more a problem with the foreign key, although I removed the constraint so its just like a regular column to try and investigate what is causing the problem. I created 2 very simple test databases (TestDB1, TestDB2). Then in each, I created a very simple table (TestTable). Step 1 The table is created like so: CREATE TABLE [dbo].[TestTable]( [Id] [bigint] IDENTITY(1,1) NOT NULL, [Name] [nchar](10) COLLATE Latin1_General_CI_AS NULL, [CustomerId] [int] NOT NULL, CONSTRAINT [PK_TestTable] PRIMARY KEY CLUSTERED ( [Id] ASC )WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY] ) ON [PRIMARY] Step 2. Now in my 2nd database I create exactly the same table but instead of having a CustomerId column I renamed it manually to ApplicantId, to simulate me renaming a foreign key (again, I removed the constraints for simplicity so its just like any other regular column), but no NULLs are allowed. Step 3. Run SQL Compare and attempt to sync from TestDB2 to TestDB1. I would expect that SQLCompare tries to select data into a temporary table, drop the table, create the new table and select the data back into it. If the column is in the same location, then the select should select into all the new columns in the correct order. However, SQLCompare gives me the following error: The column [ApplicantId] on table [dbo].[TestTable] must be added but has no default and does not allow NULL values. The table must be rebuilt. If the table contains data then the migration script will not work. To avoid this, add a default to the column or mark it as allowing NULL values. So ok, how do I go about changing the foreign key column name without adding a column and allow NULLs? We have a build system, and everything is checked out from source safe. SQL compare then syncs from a scripts folder to the database. We need SQLCompare to work in one go without fiddling with data in the database, or creating extra migration scrips. What baffles me is that this error seems to be displayed for any column rename that is peformed whilst it has a NON-NULL policy. Surely this is going to be a big problem. / comments
Just an update, I've been looking at this all today and still not got anywhere. This is not so much a problem with Primary Keys (as the title suggests). Its more a problem with the foreign key, al...
0 votes
How to change primary key column in database and preserve da
Hi, I'm having trouble after some substantial re-factoring work to our database schema. I've had change the primary key column on about 10 tables. When I run the SQL Compare I get high warnings o...
3 followers 4 comments 0 votes
Compare brings up View objects as different but are the same
I've just ran an SQL Compare against a SQL Scripts folder. I've noticed that a VIEW object has been identified as different. However when I click on the view object, in the differences pane there ...
1 follower 1 comment 0 votes