I am using SQL Server 2012.
I have a db lets called it A in that database I have procedure backup which get all creation information of another database which is B.
Now the problem when I am trying to use
SP_HELPTEXT inside my procedure backup it give the information of database A. Any suggestion to make within database B?
I need to backup all functions in database B. My procedure which do that job is in database A. I used dynamic SQL to reach the names of functions when I want to get the body of them by using
SP_HELPTEXT I stoped here