Retoring database

  • Hi All,

    I was restoring the database on the SQL thru remote desktop to the server, halfway i close the remote desktop connection and change to another computer to continue remote to the server. But the database is showing Company-Live(Restoring....) and this has continue for an hour ++.

    Please advise how i can get this database up.

  • Did you log off from your remote desktop session?

    Check the progress of the restore and whether or not it's moving with:

    select command, percent_complete from sys.dm_exec_requests where command like '%RESTORE%'.

    If you logged off, the restore will have stopped, in which case you will have to restart it.

  • You can try by stopping sql server services. while its in process sql server services should be stopped then after restore complete you can restart services

  • No need to stop SQL at all

  • In a situation like that described by the original poster, I would do the following:

    1) Run the query shown by SQLSACT a couple times and check the percent_complete column for progress. If the number is increasing, then the restore is still running.

    2a) If the query shows that the restore still has a session, but is not progressing, then you'd want to consider killing the session and starting over.

    2b) If the query shows that there is no restore running (it returns no rows), then you can check the error log to see if the restore completed. You'll see an entry in the log like this:

    Database was restored: Database: Testing, creation date(time): 2013/11/06(17:11:35), first LSN: 6533:517:1, last LSN: 6533:519:1, number of dump devices: 1, device information: (FILE=1, TYPE=DISK: {'E:\MSSQL\MSSQL10_50.ENT2008R2\MSSQL\Backup\puretesting.bak'}). Informational message. No user action required.

    In that case, if the database is still in a restoring state, then you may have run the restore using WITH NORECOVERY. To fix that you can just run a RESTORE DATABASE <Your database name> WITH RECOVERY to bring it online.

    If you don't see any indication in the error log that the restore finished successfully, and the database is in a restoring state, then it's probably best just to drop the database and kick off the restore again.

    Just to echo what SQLSACT said, there is no reason you should have to restart SQL Server.

    Cheers!

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply