Is there a way to have a use_database command added to and object that is being scripted through enterprise manager?
I am trying to automate our scripting process for pushes to our production environment and we have several databases. I wan't to make sure that an object that is scripted in our QA environment can't accidently get pushed to the incorrect database in our prod environment.
You may stablish a standard use of full identifiers (dbname.owner.obj_name) in your developing environment, but it only works if your database structures are different.
Our case is the opposite: several instances of same structure, so we decided to create a post-processor (VB6) to integrate all changes in a single script, adding "USE db_name" at the very beginning that will be released to production environment.