Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Renaming database

Author  Topic 

kbk
Starting Member

34 Posts

Posted - 2009-04-07 : 10:51:24
i have two databases,test1 and test2. i rename the database test2 as test3 and test1 as 'test2'
when i chekc for standard reports of test3,i dont get any details since the name has been changed.so i am not able to know any previous details regarding backups,restoration etc.
and when i check standard reports for test2 which was renamed from test1, i get details of old test2(which is now test3).
Isnt there a way to get the test1 details(like backup,restore) without renaming it back to test1????

Please help!!!

bk

TG
Master Smack Fu Yak Hacker

6065 Posts

Posted - 2009-04-07 : 10:58:37
I loved that abbot and costello routine.
Can't you run the report for test2 (knowing it is really test1) ? third base

Be One with the Optimizer
TG
Go to Top of Page

TG
Master Smack Fu Yak Hacker

6065 Posts

Posted - 2009-04-07 : 11:10:55
Another thing you can do is profile the server when you run the report. You can capture the sql that the standard reports uses to get the data, then you can run the sql yourself. You can change the sql to use db_name(<id>) rather than @databasename. That is assuming that when you rename the database the ID remains unchanged in sysDatabases.

Be One with the Optimizer
TG
Go to Top of Page

kbk
Starting Member

34 Posts

Posted - 2009-04-07 : 11:16:06
If i run the report for test2 , i get the olden test2 details.not test1 details.if i rename it back to test1 then i will get test1 details.so the data might be retrieved from system database,is it?isnt there an option to pull the data from the user database level???hmm seems like iv confused it all the more huh? :P

PVK
Go to Top of Page
   

- Advertisement -