SQL Restore Fails Leaves the DB in Single User

Last post 01-29-2019, 8:54 PM by pereirath. 4 replies.
Sort Posts: Previous Next
  • SQL Restore Fails Leaves the DB in Single User
    Posted: 01-24-2019, 1:36 PM

    Restoring a database SQL (no VSS) and at some point the DB Restore fails. Commvault either leaves the DB in single user mode or restoring status.

     

    This post http://forum.commvault.com/forums/22141/ShowThread.aspx#22141 from 2012 talks kind about it and at that point they said;

    "Response: Currently CommVault will not automatically clear the connections. If the database has active connections too it during the restore, Microsoft SQL will likely return an "Excluse Access Could Not be Obtained" error. We have spoke to development and a Customer Modification request was made for this to provide an option during restore to drop any active connections. They will look into this for a future release of CommVault."

    https://ma.commvault.com/Post/Details/22141 

    https://ma.commvault.com/Post/Details/22412 

     

    So, wondering if that was developed and if so, how do I configure that? Failed Jobs doesnt seem to get along with SQL after all. Thanks

  • Re: SQL Restore Fails Leaves the DB in Single User
    Posted: 01-29-2019, 7:24 PM

    Hi Pereirath,

    It looks like the articles you are referencing are from V9. The functionality to drop connections on restore was introduced in V10 as an advanced option. On the restore form, click Advanced button. On the Advanced Form, click Options tab and then you should see the "Drop Connections to Database" option. This will actually run an ALTER DATABASE statement prior to restoring to switch the DB to single user.

    After the restore has completed the database will be returned to multi-user mode. 

    If a restore fails or is killed it will still leave a database in RESTORING state, but this can be removed manually or initiating another restore with Unconditional Overwrite option enabled should be able to remove this database and restore over the top of it.

    For a full list of the available advanced options in V11 please see: http://documentation.commvault.com/commvault/v11_sp13/article?p=61506.htm

    I hope this helps.


    - David

  • Re: SQL Restore Fails Leaves the DB in Single User
    Posted: 01-29-2019, 8:19 PM

    Thanks for replying the post.

    I actually read that document which still doesnt help me. Like I said, in my case, DBAs what work with me complains that Commvault should NOT leave the DB as Restoring. They dont want to do anything manually and that is my struggle. 

  • Re: SQL Restore Fails Leaves the DB in Single User
    Posted: 01-29-2019, 8:38 PM

    If the job is killed or is interrupted, it does not have a chance to clear up afterwards. There is no way around this by default, especially if the job has failed in a way that has left the database in a state which does not allow recovery.

    If the database restore has completed but left the database in RESTORING state, you could try running a Recovery Only restore. As per the previous post, on the Advanced Restore Options form, you can change the restore type from Database Restore to Recover Only which will run a restore with recovery against the database (i.e. bringing it online).

    Again none of this resolves your problems of databases/files left over. You could possibly look at using post-scripts on the SQL restore to run a drop command, but at the end of the day it will really be much easier to retry the restore with overwrite which will overwrite the DB, hopefully bringing it online, or to manually drop and remove the database files.

    -David

  • Re: SQL Restore Fails Leaves the DB in Single User
    Posted: 01-29-2019, 8:54 PM

    Thanks for your time and knowledge shared. Will continue to look for possible solutions, maybe a script like you said. 

The content of the forums, threads and posts reflects the thoughts and opinions of each author, and does not represent the thoughts, opinions, plans or strategies of Commvault Systems, Inc. ("Commvault") and Commvault undertakes no obligation to update, correct or modify any statements made in this forum. Any and all third party links, statements, comments, or feedback posted to, or otherwise provided by this forum, thread or post are not affiliated with, nor endorsed by, Commvault.
Commvault, Commvault and logo, the “CV” logo, Commvault Systems, Solving Forward, SIM, Singular Information Management, Simpana, Commvault Galaxy, Unified Data Management, QiNetix, Quick Recovery, QR, CommNet, GridStor, Vault Tracker, InnerVault, QuickSnap, QSnap, Recovery Director, CommServe, CommCell, SnapProtect, ROMS, and CommValue, are trademarks or registered trademarks of Commvault Systems, Inc. All other third party brands, products, service names, trademarks, or registered service marks are the property of and used to identify the products or services of their respective owners. All specifications are subject to change without notice.
Close
Copyright © 2019 Commvault | All Rights Reserved. | Legal | Privacy Policy