Sybase ASE – Recover a lost or Unknown “sa” password

This post describes how to generate a temporary “sa” password in case the the existing password is lost or unknown.

First of all the ASE needs to be shutdown, since you don’t have the “sa” password you need to shutdown ASE by killing the dataserver.

kill -9 <PID of the dataserver>

Now go to the install directory and add -psa clause to the dataserver RUN FILE:-

cd $SYBASE/$SYBASE_ASE/install
echo "-psa" >>RUN_File

After editing the RUN_File, start the dataserver using startserver command:-

startserver -f  $SYBASE/$SYBASE_ASE/install/RUN_File

Then in the output you can see the temporary password for “sa” user:-

New SSO password for sa:mhuybduaordzp6

You can login to the ASE using this temporary password and then change the “sa” password using the sp_password procedure:-

sp_password "mhuybduaordzp6", "NewPassword", sa

2 thoughts on “Sybase ASE – Recover a lost or Unknown “sa” password

  1. Pingback: Sybase ASE | Oracle Database Internal Mechanism

  2. I have a SQL Anywhere 8 database on a Windows Server 2003 machine and no one knows the sa password! How can I recover this or any account and be able to run some queries? Thanks in advance for your help.
    NOTE: $SYBASE and $SYBASE_ASE environment variables do not exist on the server.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.