It wasn't difficult to find the ???? in the script and was able to get it to run. However due to the nature of the way some of my databases are named I had to make a small revision to get the script to run completely. The line of code in both procedures is as follows:
'Use '+@dbName+'; '+
I changed it to:
'Use ['+@dbName+']; '+
and this was able to correct the problem. Thanks for the script. I have a project that was handed me to provision the production SQL Server box for 2009.
Kurt
Kurt W. Zimmerman
SR DBA
Lefrak Organization
New York, NY
http://www.linkedin.com/in/kurtwzimmerman