• Eugene Elutin (7/24/2013)


    NineIron (7/24/2013)


    Thanx. I don't think we're being served very well....................

    So, if you have no choice, but to rename database (as your client/employer requires you to do), you must go inside of every stored proc, function and view and replace reference to database name to the new one.

    The above is quite clear reason why the practice of naming databases to differentiate environment is road to hell...

    It is your function to educate the client/employer as to WHY this methodology is bad, it is also important to recognize that in such configurations accidents are MORE likely to happen and they are going to have to live with that risk. They can set policy but that doesn't mean you can't challenge that policy or that the policy isn't wrong. Paranoia is a good trait for a DBA..

    You likely need to look at the sprocs, functions, and views in ONE database to see if they use 3 part names when not needed or USE in dynamic code, if they don't then you don't need to modify anything. If you detect those then you only need to modify THAT object in all the copies. DO NOT continue the mistake of referencing the database when not needed.

    Clear?

    CEWII