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
 Data Corruption Issues
 Reattach problem

Author  Topic 

juliemac
Starting Member

12 Posts

Posted - 2008-07-09 : 19:45:43
I keep the data folder on another drive from the OS. Helps if the OS has problems.
I rebuilt the server today, loaded SQL 7 and copied the files from the old Data folder to the new.
I ran the attach code to reattach the databases and got:
1)cannot restart some of the files. It will not reattach any of the databases.

I tried renaming the folder from Data_1 (the old Folder) to Data and letting the system reattach, but that just stops the DB server from starting.

How can I get this data back! Systems are down and its critical data.

Thanks!

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-07-09 : 22:15:11
Do you have backups?Also did you load SQL 7.0 with exact same setting as previous one?
Go to Top of Page

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2008-07-09 : 23:34:59
What do you mean 'cannot restart some of the files'? Did you check app event log to find out why sql failed to start?
Go to Top of Page

juliemac
Starting Member

12 Posts

Posted - 2008-07-10 : 05:15:12
1)I set SQL up excatly the same as before. I have done many installs of this before.

2)I rename the old data folder data_1, SQL makes a new Data folder. Move the files in to Data and run the reattach scripts.

I thought of this late last night. I formatted the C drive in fat 32, the other drives are NTFS. Might that cause a problem?
I'll post the errors when I get to work.
Go to Top of Page

juliemac
Starting Member

12 Posts

Posted - 2008-07-10 : 07:14:28
Ok. this is the error message:

server:Msg945, level 14, state 2, line 1
Database 'Namehere' cannot be opened because some of the files could not be activated
Server: Msg 1813, Levwel 16, State 2, Line 1
Could not open new database 'Namehere'. CREATE DATABASE is aborted

I really have to hump it to get it up and running again.
Hope you guys have an idea!
Go to Top of Page

juliemac
Starting Member

12 Posts

Posted - 2008-07-10 : 08:22:25
Ok. I concverted the C drive to NTFS. It still will not allow the MDF files to attach.
I also renamed the file and tried to reattach. Same thing.

I can create DB's with the enterprize manager as well as by script. So making them isnt a problem.

Can I import the data as a file? if so, whet is the delimiter?
Go to Top of Page

juliemac
Starting Member

12 Posts

Posted - 2008-07-10 : 08:32:25
Looking at the log, I find that SS7 is looking for the LDF on the wrong drive. and there for shutting it down.

How can I redirect the SS to look in the correct folder?
Go to Top of Page

juliemac
Starting Member

12 Posts

Posted - 2008-07-10 : 09:40:34
I renamed the drive and it attached. The MDF must have an absolute address for the log file.
Done...
Go to Top of Page

tosscrosby
Aged Yak Warrior

676 Posts

Posted - 2008-07-10 : 14:03:25
Wow, eights posts, six by you and you figured it out on your own. Well done!

Terry
Go to Top of Page

juliemac
Starting Member

12 Posts

Posted - 2008-07-11 : 05:19:56
Persistant geek, thats me :)
Go to Top of Page
   

- Advertisement -