How can we help you today? How can we help you today?
JackAce
The article is a good start, but I was looking for more detailed information under the hood. The article mostly says, "If you are working in X type of environment, you should do Y." I am looking for something that says, "If you are working in X type of environment, you should be aware of Y." For example, some things that I noticed when working in a mixed environment (some developers with 'shared' and some developers with 'dedicated'): Sometimes you can right click a change in the "Commit Changes" tab and select "Undo Changes". Sometimes you can not. I haven't figured out the exact pattern yet. Working in a dedicated (local) environment is much faster especially because our database and source control servers are remote and we have to connect to them via VPN. This is frustrating when working in a shared environment because the Commit Changes tab usually times out when trying to analyze changes. One major thing that is a problem for us (working in the mixed environment) is that we automate our deployments to database environments. So our continuous integration server can deploy the versioned database to our development environment and our QA environment. If I check in a change from my dedicated (local) machine and deploy it to a shared database server (where other developers are working), their uncommitted changes will be wiped out. In order to avoid clobbering other developers' changes, I am currently using SQL Compare and SQL Data Compare to deploy my committed changes. This is not ideal (especially because only a few developers have licenses for these two products -- most only have licenses for SQL Source Control), and will go away once all developers can work locally. I think an article that outlines "gotchas" like the ones above would be very beneficial. / comments
The article is a good start, but I was looking for more detailed information under the hood. The article mostly says, "If you are working in X type of environment, you should do Y." I am looking ...
0 votes
So I figured out what was causing the problem. We have a UserDefinedDataType called dbo.KeyType which is just a wrapper for a BIGINT datatype. If I manually edit the datatype and change it to BIGINT in the table generation script, the error goes away and there doesn't seem to be any problems. We will eventually change all the KeyType fields to be BIGINT, so this issue will eventually go away for us. In any case, here are the answers to your questions: Chris Auckland wrote: 1) Which version of SQL Data compare 9 are you using? (help> About) 2) Does this happen when you use the GUI, or is it just commandline or API? 3) Were the data scripts created by SQL Data Compare? 4) Are you checking out just the data scripts from SVN and comparing them, or are you also checking out the schema statements in the /tables folder too? 5) Could you post the DDL for the dbo.MyTable? 1) I am using Red Gate SQL Data Compare v9.0.0.117 2) I get the Unsupported column type - empty error when using the GUI. 3) The scripts were generated using SQL Source Control, not SQL Data Compare 4) The script repository has both a Data and a Tables folder, both generated by SQL Source Control 5) Here's the table generation script (with some names obfuscated): CREATE TABLE [dbo].[ActivityFeedSource] ( [ID] [dbo].[KeyType] NOT NULL IDENTITY(1, 1), [CodeFile] [nvarchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, [MethodName] [nvarchar] (200) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, [DisplayToCustomer] [bit] NOT NULL CONSTRAINT [DF_1] DEFAULT ((1)), [OriginatingCustomerText] [nvarchar] (500) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, [OriginatingCustomerPublicText] [nvarchar] (500) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, [SharedCustomerPublicText] [nvarchar] (500) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, [IsActive] [bit] NOT NULL CONSTRAINT [DF_ActivityFeedSource_IsActive] DEFAULT ((1)), [Display] [bit] NOT NULL CONSTRAINT [DF_ActivityFeedSource_Display] DEFAULT ((1)) ) ON [PRIMARY] GO ALTER TABLE [dbo].[ActivityFeedSource] ADD CONSTRAINT [PK_ActivityFeedSource] PRIMARY KEY CLUSTERED ([ID]) WITH (STATISTICS_NORECOMPUTE=ON) ON [PRIMARY] GO / comments
So I figured out what was causing the problem. We have a UserDefinedDataType called dbo.KeyType which is just a wrapper for a BIGINT datatype. If I manually edit the datatype and change it to BIGI...
0 votes
james.billings wrote: As aolcot said, I'd expect you to simply source control the table data that the view references. Is there a specific reason you'd like to source control the view interpretation of this? Well, perhaps I should have explained a little more. We have a table that has system-defined lookup data as well as user-defined data. Not the greatest database design, I agree, but it is a design that I have inherited. So the underlying table looks like this MyID BIGINT IDENTITY(1, 1), -- Primary Key MyCode VARCHAR(50), -- Unique values when UserID is NULL UserID BIGINT NULL, MyDescription VARCHAR(200) -- Data that we are concerned with -- other columns go here The view does not contain the Primary Key and is schema bound. It also filters out records where UserID is not NULL. In the view, there is a unique constraint/index defined for the MyCode field. We rely on the MyCode field to identify records that we need. The underlying Primary Key values may be different in Development, QA, Staging and Production. So if we want to version control the content that we care about (values in the table where the UserID is NULL), then I figured that we could do it by versioning the content in the views. If I pull up the SQL Data Compare GUI and allow views to be shown, it gives me the option of synchronizing the views. This works fine. If I create a record in the table that has MyID of 10 and MyCode of 'happy birthday', then a record will be created in the other table with MyID of 101 and MyCode 'happy birthday', assuming that 101 is the next IDENTITY record in the table. If you update MyDescription in the first table to 'You live in a zoo' for the 'happy birthday' record, then the corresponding record in the second table will also update, even if the underlying MyID value is different. The problem is that there is no way to detect/commit changes to source control when changes are made to the data. I wouldn't be surprised to hear that I am going about this in a very backwards way. If there is a more elegant solution (besides putting the data in a separate table), I'd love to hear it. / comments
james.billings wrote: As aolcot said, I'd expect you to simply source control the table data that the view references. Is there a specific reason you'd like to source control the view interpreta...
0 votes