I am using one database like Test(db name) in this database i added 10 tables and 5 stored procedures , now i can call that procedures in another database like Test2(db name) ,
i am writing like this
Test database stored procedure is
Create proc GetDetails()
As
select * from Emp;
after that storedprocedure using in another database like
Test2 database stored procedure is
Create proc GetDetails()
As
Begin
Exec Test..GetDetails()
End
Now client import the databases change the names as client wish now all stored procedures are not working in this situation how to solve the problem pls give me any suggestion , i can dynamically change the database name in all stored procedure.
Thanking u
Hemanth
Assuming you can pass the target database name to the Test2 sproc (or read it from a configuration table or something), then you could use it like this: