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
0

Comments

3 comments

  • Brian Donahue
    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
    0
  • activemind
    Absolutely, it is 10.2.0.1337.
    Thanks Brian.
    activemind
    0
  • Brian Donahue
    I guess the bug came back. I'll try to get it looked into.
    Brian Donahue
    0

Add comment

Please sign in to leave a comment.