Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SAP Sybase SQL Anywhere 16.0 » SQL Anywhere Server - Database Administration » User and database security » User security (roles and privileges) » Passwords

 

Changing a password (SQL)

Change the password for a user by using the ALTER USER statement with an IDENTIFIED BY clause.

Prerequisites

Any user can change their own password. To change the password for another user, you must have the CHANGE PASSWORD system privilege.

If you are changing your own password and your login policy has dual control password changing set to ON, you can still change your password normally; dual control password changing is not required for you to change your own password.

Context and remarks

Passwords are case-sensitive and they cannot:

  • begin with white space, single quotes, or double quotes
  • end with white space
  • contain semicolons
  • be longer than 255 bytes in length
 Task
  1. Connect to the database.

  2. Execute an ALTER USER statement that contains an IDENTIFIED BY clause specifying the new password.

Results

The user password is changed.

Next

Inform the user of their new password.

Example

Execute the following statement to change the password for the DBA user to welcome_DBA:

ALTER USER DBA
IDENTIFIED BY welcome_DBA;

 See also