Lost the 'sa' password
I have lost the 'sa' password to my database, and I don't know how to retrieve it. Is this a situation where I will have to just reset the 'sa' password? I do not have any other account into the database.

    Requires Free Membership to View

    When you register, my team of editors will also send you resources covering Linux administration and management; integration and interoperability between Linux, Windows and Unix; securing Linux and mixed-platform environments; and migrating to Linux.

    Cathleen A. Gagne, Senior Editorial Director

    By submitting your registration information to SearchEnterpriseLinux.com you agree to receive email communications from TechTarget and TechTarget partners. We encourage you to read our Privacy Policy which contains important disclosures about how we collect and use your registration and other information. If you reside outside of the United States, by submitting this registration information you consent to having your personal data transferred to and processed in the United States. Your use of SearchEnterpriseLinux.com is governed by our Terms of Use. You may contact us at webmaster@TechTarget.com.

If you have lost the 'sa' password, then you can regenerate another one. To do so follow the following example

  1. Shutdown the Sybase server from the operating system level by using a kill command. I assume that since you have lost the 'sa' password then you have not used the server for a while!
  2. Once you have shutdown the ASE, modify the RUN_SERVER file as follows:
    /sybase/ase/sqlserver/1251/ASE-12_5/bin/dataserver 
    -sSYB_CRFXR1_1251 
    -d/sybase/ase/SYB_CRFXR1_1251/data/master.dat 
    -e/sybase/ase/sqlserver/1251/ASE-12_5/install/SYB_CRFXR1_1251.log 
    -c/sybase/ase/sqlserver/1251/ASE-12_5/SYB_CRFXR1_1251.cfg 
    -M/sybase/ase/sqlserver/1251/ASE-12_5 
    -psa
    
    Notice the last line "-psa". This will instruct Sybase to create a login for 'sa'. The password will be written to the ASE's errorlog. In this example our server is called SYB_CRFXR1_1251 and the errorlog will be SYB_CRFXR1_1251.log, by default.

    Use the regenerated 'sa' password to access your ASE as usual, once you have rebooted your ASE. Reset the 'sa' password using exec sp_password afterwards and do not forget to remove the last line in the RUN_SERVER file.

    For More Information


    This was first published in June 2004