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.
| Author |
Topic |
|
nazjon
Starting Member
3 Posts |
Posted - 2005-11-04 : 04:43:13
|
basicaiily im trying to do SQL restore (techinally not restore as its on another system from original one, would that matter??) from a DLT tapedrive and it wont bloody work, get a few different errors depending on what I try, this is first time I have used restore function on SQL so not that experieced with it!! Have tried it from enterprise manager after creating blank database to restore too.....and also query analyser with following query: RESTORE DATABASE Pidata FROM TAPE = '\\.\Tape0'with MOVE 'Pidata_Data.mdf' TO 'E:\Program Files\Microsoft SQL server\MSSQL',MOVE 'Pidata_log.ldf' TO 'E:\Program Files\Microsoft SQL server\MSSQL',RECOVERY, NOUNLOAD, REPLACE but get.....Server: Msg 3101, Level 16, State 1, Line 1Exclusive access could not be obtained because the database is in use.Server: Msg 3013, Level 16, State 1, Line 1RESTORE DATABASE is terminating abnormally. looked this up on web and it said turn off the 'read-only' option on database but it was already off, there is no one else using the DB so dont know now!! think I need to trick it into doing it but just dont know how!! someone help please help..... have also tried manually putting in the paths to where I want to restore but then get 'device activation error'!!! |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-11-04 : 04:49:41
|
| Try thisUSE MASTERRESTORE DATABASE Pidata FROM TAPE = '\\.\Tape0'with MOVE 'Pidata_Data.mdf' TO 'E:\Program Files\Microsoft SQL server\MSSQL',MOVE 'Pidata_log.ldf' TO 'E:\Program Files\Microsoft SQL server\MSSQL',RECOVERY, NOUNLOAD, REPLACEMadhivananFailing to plan is Planning to fail |
 |
|
|
nazjon
Starting Member
3 Posts |
Posted - 2005-11-04 : 04:50:48
|
| forgot to ask if the DB is password protected, does the error indicate if password is incorrect?? reason I ask is I dont know if the BD on the tape is password protected, it was just given to me and m trying to restore data from 2 years ago onto another (blank) system!!! |
 |
|
|
nazjon
Starting Member
3 Posts |
Posted - 2005-11-04 : 04:56:39
|
quote: Originally posted by madhivanan Try thisUSE MASTERRESTORE DATABASE Pidata FROM TAPE = '\\.\Tape0'with MOVE 'Pidata_Data.mdf' TO 'E:\Program Files\Microsoft SQL server\MSSQL',MOVE 'Pidata_log.ldf' TO 'E:\Program Files\Microsoft SQL server\MSSQL',RECOVERY, NOUNLOAD, REPLACEMadhivananFailing to plan is Planning to fail
thanks MadivananI remember trying that last night and gotServer: Msg 3234, Level 16, State 2, Line 2Logical file 'Pidata_Data.mdf' is not part of database 'Pidata'. Use RESTORE FILELISTONLY to list the logical file names.Server: Msg 3013, Level 16, State 1, Line 2RESTORE DATABASE is terminating abnormally.tried to use the FILELISTONLY command but couldnt get it to work! |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-11-04 : 04:58:30
|
| In Books On Line, SQL Server help file, look for RESTOREMadhivananFailing to plan is Planning to fail |
 |
|
|
Kristen
Test
22859 Posts |
Posted - 2005-11-06 : 08:48:58
|
| Can you restore from Tape to Disk and then from there into the database? That will perhaps rule out any issues with the Tape interface.I posted a fairly exhaustive example of the syntax for the RESTORE command [no syntax for Tape though] here:http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=54300in case it helps.Kristen |
 |
|
|
jen
Master Smack Fu Yak Hacker
4110 Posts |
Posted - 2005-11-07 : 00:17:55
|
| determine the filenames by issuing the restore filelistonlyi believe that's the closest thing you can get in solving your problemafter the exlusive error--------------------keeping it simple... |
 |
|
|
|
|
|
|
|