Correct ordering of DB objects in synchronization script

Compares and synchronizes SQL Server databases, backups and scripts.

Moderators: JonathanWatts, Chris Auckland, David Atkinson, eddie davis, Anu Deshpande, Michelle Taylor, alice.easey, james.billings, chengvoon.tong

Correct ordering of DB objects in synchronization script

Postby dariasbrownCJ » Thu Mar 27, 2014 6:11 pm

Does SQL Compare 9 or 10 Standard support the following:

Dependency checking so objects are scripted in the correct order for updates. Database objects are scripted in the correct order even if SQL metadata (sysdepends) is broken.

Thanks,

Darias
dariasbrownCJ
 
Posts: 2
Joined: Thu Mar 27, 2014 6:06 pm

Postby Brian Donahue » Mon Mar 31, 2014 2:36 pm

Hi Darias,

SQL Compare has had its' own text-parsing dependency engine since about version 3, so you should be pretty safe with dependencies, even if sysdepends has a problem. It needs this parsing support in order to work with scripts as a data source, so it's reliable.

When comparing a live database, v10 uses sysdepends as a starting point and then adjusts depending on the definition of the objects in the database.
Brian Donahue
 
Posts: 6668
Joined: Mon Aug 23, 2004 10:48 am

RE:Correct ordering of DB objects in synchronization script

Postby dariasbrownCJ » Wed Apr 02, 2014 8:35 pm

Brian,

Thanks for your response. I have an issue with the SQL Compare parser because it has been creating objects that depend on tables ahead of the table DDL.

Darias
dariasbrownCJ
 
Posts: 2
Joined: Thu Mar 27, 2014 6:06 pm

Postby Brian Donahue » Thu Apr 03, 2014 8:45 am

If there is a problem with this then there is probably some defect in that version. Is it possible to upgrade to v10? We don't provide support for prior versions but we can fix it if there is a problem with the current version.
Brian Donahue
 
Posts: 6668
Joined: Mon Aug 23, 2004 10:48 am

Postby SPeacock1978 » Fri May 16, 2014 2:11 pm

I am having a similar problem. I have a table that has a full text index on it and there is a stored procedure that uses this functionality. When I use SQL Compare 10 to create a deployment script the scripts creates the objects in the following order:

1) Create table
2) Create indexes
3) Create stored proc
4) Create full text index on table

As the full text index does not exist at the time the stored proc is being created I get the following error...

Cannot use a CONTAINS or FREETEXT predicate on table or indexed view 'tblCompany' because it is not full-text indexed.

Is there a way to control the ordering of the objects in the scripts or is it all automatic?
SPeacock1978
 
Posts: 1
Joined: Fri May 16, 2014 2:04 pm

Postby Michelle Taylor » Tue May 20, 2014 1:12 pm

That one's a particularly persistent bug caused by a compromise solution to the problem that full text operations interact poorly with transactions - it's on the list of issues we're actively looking at, but currently the workaround is to do two deployments - first with the fulltext objects and second with the procedures that depend on them.

We hope to have this fixed for v11.
Michelle Taylor
 
Posts: 529
Joined: Mon Oct 30, 2006 12:45 pm
Location: Red Gate Software


Return to SQL Compare 10

Who is online

Users browsing this forum: No registered users and 1 guest

cron