Restore of Sybase ASE master database - is single user mode required?

Last post 06-21-2017, 5:17 AM by mrrossi. 1 replies.
Sort Posts: Previous Next
  • Restore of Sybase ASE master database - is single user mode required?
    Posted: 06-06-2017, 11:51 AM
    Hi all

    We've recently configured Commvault to backup our SAP Sybase ASE databases.

    I've successfully carried out a restore of the main DB previously and now wanted to prove a restore of master.

    I simulated a DR situation by renaming several files such as master.dat and removed the DB name from the interfaces file. I then receated the ASE using the srvbuildres tool and some .res files I'd previously saved off.

    When I tested this 'manually' (backups direct to disk and restore from disk) I simply restarted the database in 'single user mode' (otherwise known as master-recover mode, i.e. with a '-m' in the start file), connected as user 'sa' (as 'sapsa' wouldn't have been restored yet as it exists in the master DB) with the known password (which was effectively restored from the .res files). I would then do a 'load' of the master database from disk and was able to then start it up/restore the main DB etc etc.

    I assumed I would also need the DB in single user mode for a CommVault restore, so started it up in this mode. I asked the backup guys (who look after CommVault, I'm the SAP Basis guy) to restore the master DB and they got an error:

    "dataserver failed, Please make sure that SA password is empty before restoring master database or choose create device option in GUI"

    Fair enough, CommVault was setup to connect with the sapsa user, which doesn't exist currently. So I suggested they change the user to 'sa' with the known password.

    CommVault then errors with:

    "Sybase Server [SDD] seems to be running. It should not be running during master database restore."

    I figure perhaps the server doesn't need to be in single user mode for CommVault to restore; perhaps it does this itself/does something else in the background? So I shut it down, and asked them to try again. CommVault returns the first error again:

    "dataserver failed, Please make sure that SA password is empty before restoring master database or choose create device option in GUI"

    Thing is, I'm pretty sure they have the right (non-null) password for 'sa' else we wouldn't have got to the second previous error (i.e. it WAS able to connect). Certain 'sa' isn't null as running 'isql64 -Usa etc..' to connect requires the 'known' password.

    I had a look at the CommVault documentation and saw two examples of this error message where it was almost a 'red herring' and the detailed log revealed more useful information. I asked the backup team to dig out these logs and they found:

    "The socket is in an invalid state [CVS_STATE_INIT] for desired action"

    I did a search for this but haven't found anything useful (one note suggested a Windows fix - our system is on SUSE Linux so not relevant).

    Can anyone advise please?

    Should I have the ASE started in single user mode to restore master from CommVault?

    Thanks

    Ross
  • Re: Restore of Sybase ASE master database - is single user mode required?
    Posted: 06-21-2017, 5:17 AM
    Not sure why this posted twice and in such an odd format! We progressed from this situation 
    and asked another question ("Is it possible to set a null password for your DB user?") on the forum
    and have recieved assistance on this. Just thought I'd better post an 'answer' here as it seems to be
    getting lots of views.
     
    Basically, I shouldn't have used the srvbuildres tool for the DR scenario, I should have just removed 
    the master.dat file; CommVault does all the 'clever' restore bits itself in the background, including
    running the dataserver command (similar to srvbuildres) to rebuild the necessary files. Having it in
    this inconsistent state meant CommVault couldn't connect.

    The connection in CommVault should remain as the 'sapsa' user and password; when it rebuilds
    master it KNOWS that by default only a sa account exists with a null password and it is able to
    connect in the background.

    The database should be down; you shouldn't start it in single user mode. CommVault does what it
    needs to do in the background.
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 © 2017 Commvault | All Rights Reserved. | Legal | Privacy Policy