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)
 HELP...Restoring from tape!!!!

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 1
Exclusive access could not be obtained because the database is in use.
Server: Msg 3013, Level 16, State 1, Line 1
RESTORE 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 this

USE MASTER
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


Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

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!!!
Go to Top of Page

nazjon
Starting Member

3 Posts

Posted - 2005-11-04 : 04:56:39
quote:
Originally posted by madhivanan

Try this

USE MASTER
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


Madhivanan

Failing to plan is Planning to fail



thanks Madivanan

I remember trying that last night and got

Server: Msg 3234, Level 16, State 2, Line 2
Logical 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 2
RESTORE DATABASE is terminating abnormally.

tried to use the FILELISTONLY command but couldnt get it to work!
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-11-04 : 04:58:30
In Books On Line, SQL Server help file, look for RESTORE

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

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=54300

in case it helps.

Kristen
Go to Top of Page

jen
Master Smack Fu Yak Hacker

4110 Posts

Posted - 2005-11-07 : 00:17:55
determine the filenames by issuing the restore filelistonly

i believe that's the closest thing you can get in solving your problem
after the exlusive error

--------------------
keeping it simple...
Go to Top of Page
   

- Advertisement -