Restore fails with error 32

  • I am trying to restore a sql serverexpress backup file to a regular sql server instance and I keep getting an error #32. The backup file is in use by another application. I have tried several backup files and get the same error. I also tried restoring to the instance of sql serverexpress that the file was created from and again gte the same error.

    What could be causing this error?

    Thanks.

    Quinn

  • turn off antivirus or antispyware.

    Alex S
  • Just so we can be sure - how are you trying to do the restore exactly?

  • I am just trying to restore from SSMS. From the context menu in databases.

    Thanks

    Quinn

  • Quinn (9/9/2009)


    I am just trying to restore from SSMS. From the context menu in databases.

    I see. ARe you able to rename the file from Windows explorer? That will tell you if the file is locked.

    Anti-virus, search indexing, could be many things.

    If you are able to, stop the SQL Service briefly while you try - that will prove it is not SQL Server doing the locking.

    Paul

  • Paul White (9/9/2009)


    Quinn (9/9/2009)


    I am just trying to restore from SSMS. From the context menu in databases.

    I see. ARe you able to rename the file from Windows explorer? That will tell you if the file is locked.

    Anti-virus, search indexing, could be many things.

    If you are able to, stop the SQL Service briefly while you try - that will prove it is not SQL Server doing the locking.

    Paul

    and if that doesnt work, then try rebooting the machine, that will get rid of any orphaned locks that might be there at the OS level.

    --------------------------------------------------------------------------------------
    [highlight]Recommended Articles on How to help us help you and[/highlight]
    [highlight]solve commonly asked questions[/highlight]

    Forum Etiquette: How to post data/code on a forum to get the best help by Jeff Moden[/url]
    Managing Transaction Logs by Gail Shaw[/url]
    How to post Performance problems by Gail Shaw[/url]
    Help, my database is corrupt. Now what? by Gail Shaw[/url]

  • I am not sure exactly what changed but I was able to do a full resotre without an error. Before that I was checking the suggestions that you made. I was able to rename the files in the backup directory. I also stopped the anti software that didn't help. I was restoring a sql server express file to standard sql server. I had given the new db a new name but didn't change the file names on the options tab. I wonder if that could have caused an error?

    Thanks for the help.

    Quinn

  • Try performing the restore filelistonly and verify from a query window and post the messages.

    RegardsRudy KomacsarSenior Database Administrator"Ave Caesar! - Morituri te salutamus."

  • Rudy,

    I am not clear about what you are asking.

    If I script the restore that worked I get this:

    RESTORE DATABASE [Testing]

    FROM DISK = N'D:\SQLBackups\wsgis20090906.bak'

    WITH FILE = 1, MOVE N'WSGIS' TO N'G:\SQLDBFiles\Testing',

    MOVE N'WSGIS_log' TO N'G:\SQLDBFiles\Testing_log.ldf', NOUNLOAD, STATS = 10

    You are saying try it like this:

    RESTORE FILELISTONLY

    FROM DISK = N'D:\SQLBackups\wsgis20090906.bak'

    WITH FILE = 1, MOVE N'WSGIS' TO N'G:\SQLDBFiles\Testing',

    MOVE N'WSGIS_log' TO N'G:\SQLDBFiles\Testing_log.ldf', NOUNLOAD, STATS = 10

    Thanks

    Quinn

  • execute this script in a query window:

    RESTORE FILELISTONLY

    FROM DISK = N'D:\SQLBackups\wsgis20090906.bak'

    post the results of the query please.

    RegardsRudy KomacsarSenior Database Administrator"Ave Caesar! - Morituri te salutamus."

  • Here they are.

    WSGISG:\SQLExpressFiles\WSGIS.mdfDPRIMARY42949672963518437208064010057E0A711-5010-402F-957A-CBD86420C1F60030398873605121NULL500000003229300037FA21D7CF-289B-4F3F-8A90-70BF67115A8601

    WSGIS_logG:\SQLExpressFiles\WSGIS_log.LDFLNULL31021465602199023255552200370D1030-EA8E-4B05-9D2A-E290F2424C5B0005120NULL000000000-0000-0000-0000-00000000000001

    (2 row(s) affected)

    Thanks

    Quinn

  • It look like you have a valid backup file.

    Try this command and post the results please ...

    RESTORE DATABASE [Testing]

    FROM DISK = N'D:\SQLBackups\wsgis20090906.bak'

    WITH

    MOVE N'WSGIS' TO N'G:\SQLDBFiles\Testing.mdf',

    MOVE N'WSGIS_log' TO N'G:\SQLDBFiles\Testing_log.ldf', STATS = 10

    RegardsRudy KomacsarSenior Database Administrator"Ave Caesar! - Morituri te salutamus."

  • Rudy

    I really appreciate your help on this.

    Here is the message from the last one.

    10 percent processed.

    20 percent processed.

    30 percent processed.

    40 percent processed.

    50 percent processed.

    60 percent processed.

    70 percent processed.

    80 percent processed.

    90 percent processed.

    100 percent processed.

    Processed 371080 pages for database 'Testing', file 'WSGIS' on file 1.

    Processed 1 pages for database 'Testing', file 'WSGIS_log' on file 1.

    RESTORE DATABASE successfully processed 371081 pages in 99.864 seconds (30.440 MB/sec).

    Thanks

    Quinn

Viewing 13 posts - 1 through 12 (of 12 total)

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