Question : Error 927 : Database xxx cannot be opened.

  • Database xxx cannot be opened. It's in the middel of a restore.

    Ok, i am completly blank on Microsoft SQL server, i don't know anything (almoust)...

    I don't know how long we have had this stautus on the database, it's an old databse that is going to be used again. How do i unlock it? Or should i get a really old Veritas backup of it?

     

    Roy

  • You can't use a database when it's being restored.

    That said, if it's been restoring for a while - it's possible the restore was done incorrectly.

    You didn't give enough information to really figure out what's wrong, so I'm going to make some guesses here...

    Look at the database in Enterprise Manager, does it show LOADING?

    If you are not actively restoring the database, but it's still in a restoring state (LOADING) that means that the option WITH NORECOVERY was probably used and the database is awaiting another file to be restored.

    Try running this command:

    RESTORE dbname

    WITH RECOVERY

    Change the dbname part to the real name of your database.

    -SQLBill

  • Yes, correct, it says LOADING, and i haven't done anything to start a restore.

    But here' comes a real newbi question! Where do i type :

    RESTORE dbname

    WITH RECOVERY

    ?

     

    Roy

  • You can type it in SQL Query Analyzer. You can open SQL Qeury analyzer from the tools tab in enterprise manager or go to start-> run and type in isqlw and press enter, query analyzer will pop up.

  • Or you can find QA at Start>Programs>Microsoft SQL Server>Query Analyzer

    Also, if you aren't aware of it, SQL Server has the Books OnLine (refered to as BOL) which is it's Help function. It's installed as part of the Client Tools and you can find it at Start>Programs>Microsoft SQL Server>Books OnLine. Make it your friend, it can be very helpful.

    -SQLBill

  • Thanks...but it didn't help, i think the database need sto be replaced with an old copy of it...

     

    Roy

  • My backup was also not good...and the

    RESTORE dbname

    WITH RECOVERY

    did not work either, it keeps saying "incorrect syntax near the keyword with" ?? It doesn't turn up in the database liste either (in SQL Query Analyzer)

    I'm lost....

  • This is interesting, I'm trying to find any help I can on the particular problem we have. This forum  is the closest I can find.

     

    Description: SQL server 7 and running a Veritas restore.

    Problem : Restore gets to 99% complete on the Veritas restore process, Database is in a state of "(loading)".

    Also, the Restore shows the following statement being used by Veritas

    RESTORE DATABASE [dbname] FROM virtual_device = 'BackupExecSqlAgent_dbname_00' WITH REPLACE, RECOVERY

    It is 'awaiting command' according to sp_who2 under Query analyser and 'sleeping' under EM current activity.

    So as far as I can tell, the restore has been done using the RECOVERY option. I can't see why this doesn't appear to complete.

    Database is quite large (33GB) and logfile (about 1GB).

    How long should this take to finish "loading" or is this likely to be still this way tomorrow morning (about 18 hours from now).

    We need this database back and this is a full restore so should bring it all back the way it was when the Backup was taken.

    I'm completely confused and don't know what to do next.

     

    Can anyone help me?

  • Roy,

    This article may help you http://www.sqlservercentral.com/columnists/bknight/unmarksuspect.asp

    Ritch


    "I didn't do anything it just got complicated" - M Edwards

Viewing 9 posts - 1 through 8 (of 8 total)

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