sql - Update audit database name in triggers and views of main database? -
i have a system 2 databases, main database , audit database. lot of triggers , table views in main database , audit database referencing 1 database other. no needed change both databases names unfortunately failed work because still have old names in code.
is there code search , replace old name used referencing or in dependence?
thank you,
you have manually fix references can leverage sql find offending objects.
select object_name(id) objectname , text objectcode sys.syscomments text '%yourreplaceddatabasename%'
that give list of functions, procedures, views etc have old database name in code. have recompile each object after have updated code. utilize dynamic sql around nervous changes on scale automatically.
Comments
Post a Comment