I have 2 databases (db1, db2) - SQL Server. And each database use another in stored procedures, functions
in db1:
select * from db2.dbo.users
in db2:
select * from db1.dbo.items
The problem is that there is hard coded db names in procedures. Now we want to add databases db1_test, db2_test on this server.
What is the easiest way to resolve this problem without updating all procedures, functions with new database names.
Thanks!