Prev | SQL Engine Reference | Next |
SET PASSWORD
The SET PASSWORD statement allows the Master user to change the password for a secured database and a normal user to change his or her login password for a database.
Syntax
SET PASSWORD = password password ::= user-defined-name
Remarks
SET PASSWORD may be issued at any time by either the Master user or a normal user. (SET SECURITY, in contrast, can be issued only by the Master user and the Master user's session must be the only current database connection.)
If issued by the Master user, SET PASSWORD changes the password for the entire database (all DDF files). If issued by a normal user, SET PASSWORD changes the login password for that user only in the
user.ddf
file.The Master user or a normal user must be logged in to the database before SET PASSWORD can be issued. Note that "password" is not a reserved keyword. It may be used as a name for a table or column.
The minimum length allowed for a password is one character. The maximum length is eight characters. Only the following characters are valid for use in a password:
- a through z (lowercase letters)
- A through Z (uppercase letters)
- 0 through 9
- _ (underscore)
- ^ (caret)
- ~ (tilde)
- $ (dollar sign)
A user-defined password is case sensitive. If the password begins with a non-alphabetic character, the password must be enclosed in single quotes.
Examples
The following example shows the Master user enabling security on the database with a password of "bigdog." The Master user then grants login authority to user "user45" with a password of "popcorn," and grants user45 SELECT permissions to table person. The Master user then changes the security password to "tinycat."
SET SECURITY = bigdog --this changes the password for all DDFs GRANT LOGIN TO user45:popcorn GRANT SELECT ON person TO user45 SET PASSWORD = tinycat --this changes the password for all DDFsThe following example assumes that user45 has logged in to the database with a password of "popcorn." User45 changes her password to "tomato." User45 then selects all records in the person table.
SET PASSWORD = tomato --this changes only user45's password in user.ddf SELECT * FROM person --user45 still has SELECT rights on table personSee Also
Prev SET OWNER |
Contents Up Check for Revisions | Next SET ROWCOUNT |