i have sql server 2005 dev installed on a laptop. i have 2 .bak's from production sql server 2005 database. i went through the gui restore procedure and both backup files completed successfully. now both databases are in the (Restoring...) status and have been for quite some time. i have sp2 applied. when will these become available? each .bak was around 400 mb. it has been a few hours.Did you refresh your GUI afterte restore? Can you connect to your database?|||it's now the morning and been at least a good 12 hours. refresh in the GUI shows them still in restoring status. i closed and reopened the management studio and they are still both restoring. i am unable to choose either database from the drop down when i open a new query window. i told it during restore to do them in norecovery mode under the expectation that this would be the fastest.|||i did notice that the data files created were substantially bigger... one backup created a 7.2gb mdf, 92mb ldf, the other created a 543mb mdf, 1.3gb ldf, and 371mb ndf... actually it appears when I specified the new filepath for that one from the backup, that I forgot the suffix. will that matter? I suppose I could stop the db service and rename it to an .ndf real quick. doesn't seem to be the cause of my slow restore issue though..|||FYI i restored the db in norecovery mode, under the impression that db access was denied only for the duration of the restore. i tried it with the first option later and the db's loaded fine. there must be some step to flip the db into available once in the restoring status, however it was not obvious/intuitive to me based on the gui or error messages i was receiving. but i seemed to be missing that step.|||I've experienced the same symptom, but with both norecovery and recovery options. Each time this produces a process that cannot be terminated until the machine is turned off. No errors are logged in sql server or windows. I've also verified the database backup through the verifyrestoreonly option and by restoring to another machine/instance.
Any thoughts?
|||i did not appear to have an active ongoing process; my cpu appeared idle. i didn't have a problem installing sp2 hoping it would fix the problem while the databases were in the restoring state. my assumption is there is some toggle (that should be made more apparent in gui error messages) that one could flip in there or some hidden sql to flip the db to go. i'm just naively jumping into this and figuring it out, my assumption is some book (a book online maybe) covers this situation (?) or perhaps it is some flakey bug.|||
That's your key.
Restoring a database in norecovery mode tells SQL Server that you intend to apply transaction log backups to roll the database forward before making it available. Thus the restore process is not complete. That's why your database is staying in 'restoring' state.
To bring your database online, simply use the command RESTORE DATABASE <dbname> WITH RECOVERY
You don't need a backup file for this - it just invokes the recovery logic to bring the DB online.
No comments:
Post a Comment