Restore fails - what now ??

fonagerfonager Posts: 6
edited June 14, 2005 5:51AM in SQL Backup Previous Versions
I am working on creating a "rescue plan" for our database backups - this way I know exactly how to handle restoring data, when a disaster occurs.

But, I have now made a backup of a test database, and then a backup of the transactionlog.

I then start then SQL Backup GUI, and initially I want to restore the test database.

After going thru the wizard, I get this error :

SQL Backup 3.2.0, (c) Red Gate Software Ltd 2004 - 2005
Serial number: [removed]
Restoring database logtest from "c:\temp\logtest.sqb"
VDI error 1010: Failed to get configuration from server. Check that the SQL Server instance is running, and that you have the S
Msg 3101, Level 16, State 2, Server SQL2, Line 1
Exclusive access could not be obtained because the database is in use.
Msg 3013, Level 16, State 1, Server SQL2, Line 1
RESTORE DATABASE is terminating abnormally.

Any idea what is going on ? It kinda shocks me that I cannot restore from a backup I made 2 minutes ago!


Regards,
Tony Godt

Comments

  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Hello Tony,

    In order to restore brom a backup, you must ensure that nobody is logged into and using the database (except for yourself, of course!). You can try shutting down any websites that may be using the database, or if you want to be completely ruthless, you can use Enterprise Manager to see who is using the database and kill thier process from Management->Current Activity.
  • Thanks for your reply!

    But noone is logged in - this is a test database, only created to perform backup/restore tests, so there are no users active in the database.

    I also tried setting the database into singleuser mode, but with the same result.

    How come this is so difficult ?



    Regards,
    Tony
  • peteypetey Posts: 2,358 New member
    Let's try keeping it simple first. If you can, stop and restart the SQL Server service. Use the command line interface to perform a backup e.g.

    sqlbackupc -sql "BACKUP DATABASE logtest TO DISK = '<some location>'

    If using SQL Server authentication, supply also the -U and -P parameters and values.

    Now, restore the database using the command line interface again e.g.

    sqlbackupc -sql "RESTORE DATABASE logtest FROM DISK = '<some location>'

    Does this work?
    Peter Yeoh
    SQL Backup Consultant Developer
    Associate, Yohz Software
    Beyond compression - SQL Backup goodies under the hood, updated for version 8
Sign In or Register to comment.