Saturday, 20 June 2015

Changing System Administrator's(sa) password back to NULL

As you might seen during the installation of SAP ASE server it asks for System Administrator's password and you must have to provide that, else it will raise an error like 

'Password is too short, minimum 6 characters required'

To resolve this you have to provide a 6 chars password to complete the installation successfully.

After the completion of installation, you can login the server with sa(login name) and password which you have provided above.

Now its time when you can change your password as NULL(the password which you might like most, as me...!!!)

Step 1:

First thing what you have to do is take FULL dump of your master database as it contains the system tables which will get updated in next few steps which may create some consequences with your database, at that time you will be in a situation where you will have a clean dump of master which you can restore. So the first thing what you need to consider is 'be safe'.

1> dump database master to 'd:\\dumps\\master_dump_20062015_145200.dmp'
2> go

(for Unix platform just change the path like 
'/sybase/dumps/master_dump_20062015_145200.dmp' above)

Now you are ready to play with system tables.

Step 2:

To set the server-wide default minimum password length to 0 :

1> sp_configure "minimum password length", 0

2> go

Note: this configuration option is dynamic. Also note that this server-wide setting also applies the (optional) passwords for user-defined roles.

Step 3:

To set a minimum password length for a specific login

1> sp_modifylogin 'login_name','minimum password length',0
2> go

here your login name will be 'sa' in this case, else you can put any login from your server.


1> sp_modifylogin 'sa','minimum password length',0
2> go

Now you have overcame the error 

'Password is too short, minimum 6 characters required'

Step 4:

To set a password to blank for your own login

1> sp_password 'login_name',NULL
2> go


1> sp_password 'sa',NULL
2> go

It's done..!!

Now you can login with blank password, like

$ isql -Usa -P -S<server_name> (in Unix)

c:\sybase_ase157> isql -Usa -P -S<server_name> (in Windows)


Keep updating me with your suggestions and queries in the comments below...everything will be appreciated..Thanks...!!


  1. Really helpful topics and must needed knowledge to learn. Helpful for new bie

  2. I have a query ?
    I have granted mon_role to sybdba but i want to revoke that role but it is giving error user has been logged in cannot revoke permission..Kindly provide steps

    1. Hi Naveen,

      As you reported the error the cause is

      You cannot revoke a role from a user while the user is logged in.

      , visit the link for detailed review :