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
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 How to get info on previous Data and Log location

Author  Topic 

dbist
Yak Posting Veteran

52 Posts

Posted - 2008-03-17 : 10:17:47
Hello,

we had a restore job running on our test server and then last week we had a cluster problem and it stopped working. Our db went into suspect and another DBA deleted the database and recreated it with default file location, without checking that there are three files (mdf, ndf, ldf) rather than just mdf and ldf. I am trying to recreate the old structure with old naming convention and was wondering if there's a query I can run to pull the old structure name/location.

Thank you, hope I'm clear enough.

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-03-17 : 10:25:15
If you delete database , all data files and log files will be deleted as well. Do you have old full backup, try restoring . you will get all old data and log files.
Go to Top of Page

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 2008-03-17 : 11:02:22
The full backup file contains the data file locations. The script on the link below will get the file locations from the backup file, and generate a restore command.

Create Restore Command from DB Backup File:
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=71665

CODO ERGO SUM
Go to Top of Page

dbist
Yak Posting Veteran

52 Posts

Posted - 2008-03-17 : 14:44:20
thank you both, the problem is this database is just for restores and it was not backed up, just refreshed daily. I will look for a backup though, maybe there's one laying around. Thank you.
Go to Top of Page
   

- Advertisement -