Trouble with database restore

  • Good afternoon experts,

    I had a problem that has been resolved, but I am trying to figure out what happened.

    We lost some data in a production table, so I needed to restore the production backup to the development server. The backup was done in CommVault using their SQL client. Both the production DB and the dev version were in “simple” mode. The backup was 775 GB. The DB had 5 data files and a log file. The drives and file locations were set up identically. Production was SQL 2008 Enterprise and dev was SQL 2008 Developer.

    We ran the restore 5 times and each time it stuck in restore mode. I tried running RESTORE DATABASE <dbname> WITH RECOVERY, but it would throw an error “The database cannot be recovered because the log was not restored.”

    CommVault threw the following errors: “Description: Query Result [Exclusive access could not be obtained because the database is in use.” (4 times) and “The database cannot be recovered because the log was not restored. “(1 time).

    Three of these times I completely blew away the database and started from scratch. These failures all occurred after 6-10 hours after all of the files were replaced.

    I initiated a call with CommVault and verified that I was in fact setting everything up correctly. On a whim, the engineer suggested we try restoring the database as another name and that worked.

    I am trying to figure this out for future reference as they want to go to a regular refresh schedule.

    The only thing I can figure is that there are users (services) persistently trying to make connections. Perhaps I should disable these users before I try it again? I am just guessing.

    We did not have this issue a couple of weeks ago when we had to restore production. We have the same persistent service accounts over there also, but my restore worked the first time.

    Any thoughts?

    Mike

    “I know that you believe you understand what you think I said, but I'm not sure you realize that what you heard is not what I meant.”...Robert McCloskey

    ___________________________________________________________________

  • Duplicate post. direct replies here. http://www.sqlservercentral.com/Forums/Topic1525134-391-1.aspx

    _______________________________________________________________

    Need help? Help us help you.

    Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

    Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.

    Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
    Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
    Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
    Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/

Viewing 2 posts - 1 through 1 (of 1 total)

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