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!