Fully qualify object name

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

Fully qualify object name

Postby activemind » Thu Sep 20, 2012 10:05 pm

I'm currently working on a database migration and one of the task was to fully qualify the objects in the new database. The old database has default "dbo" schema, and many of the existing procs do not have the default "dbo" schema with its TSQL. When I do a SQL compare, I have to remap "dbo" to my "newSchema" in the new database.

When I generate the procs, redgate does fully qualify the new schema name for me in the generated scripts, however, it is also qualifying all the keywords such as MAX, DATEPART, COUNT etc.

So a statement like the following:
Select COUNT(*) FROM Person
would be scripted to:
SELECT [newschema].[COUNT](*) FROM [newschema].[Person]

I have a database with hundreds of stored procedures and having to go through the generated script and making these changes is quite an undertaking, and this obviously is a bug. Does anyone know how I could get around this?

Thanks in advance!
activemind
 
Posts: 2
Joined: Thu Sep 20, 2012 9:57 pm

Postby Brian Donahue » Mon Sep 24, 2012 4:32 pm

Can you please verify your version of SQL Compare? This seems to be a bug in v8 that has since been fixed in v10. Hopefuly it hasn't come back.
Brian Donahue
 
Posts: 6670
Joined: Mon Aug 23, 2004 10:48 am

Postby activemind » Mon Sep 24, 2012 5:11 pm

Absolutely, it is 10.2.0.1337.
Thanks Brian.
activemind
 
Posts: 2
Joined: Thu Sep 20, 2012 9:57 pm

Postby Brian Donahue » Tue Sep 25, 2012 10:50 am

I guess the bug came back. I'll try to get it looked into.
Brian Donahue
 
Posts: 6670
Joined: Mon Aug 23, 2004 10:48 am


Return to SQL Compare 10

Who is online

Users browsing this forum: No registered users and 1 guest