Prev | SQL Engine Reference | Next |
SET SECURITY
The SET SECURITY statement allows you to enable and disable security for the database to which you are currently logged in.
Syntax
SET SECURITY = password SET SECURITY = NULLExamples
The following example sets the password as 'mypasswd'.
SET SECURITY = mypasswdThe following example sets the password as 123456.
SET SECURITY = '123456'The following example disables security.
SET SECURITY = NULLRemarks
You must be logged in as Master to set security. You can then assign a password by using the SET SECURITY statement. There is no password required to log in as Master initially.
When using SET SECURITY, user name and password are case sensitive. If the password begins with a non-alphabetic character, the password must be enclosed in single quotes.
Only one Master user connection to the database is allowed to set security. You can set security from the Pervasive Control Center (PCC).
Note
The SET SECURITY statement cannot be executed within the SQL Data Manager. An error results if you try. For a database with no security, the SQL Data Manager locks the dictionary files, which prevents you from setting the password. For a secure database, the SQL Data Manager opens a second connection to the database files, which prevents you from disabling security.
The minimum length of 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 password is case sensitive. If the password begins with a non-alphabetic character, the password must be enclosed in single quotes.
See Also
Prev SET ROWCOUNT |
Contents Up Check for Revisions | Next SET TIME ZONE |