PreviousSQL Engine Reference (v9 SP2 (9.5) revision 1) Next

SET SECURITY

Chapter contents

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 = NULL 

Examples

The following example sets the password as `mypasswd'.

SET SECURITY = mypasswd 

The following example sets the password as 123456.

SET SECURITY = '123456' 


The following example disables security.

SET SECURITY = NULL 

Remarks

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 also set security from the Pervasive PSQL Control Center (PCC). See To turn on security using Pervasive PSQL Explorer in Pervasive PSQL User's Guide.


Note
The SET SECURITY statement cannot be executed within the SQL Editor. An error results if you try. For a database with no security, the SQL Editor locks the dictionary files, which prevents you from setting the password. For a secure database, the SQL Editor opens a second connection to the database files, which prevents you from disabling security.

The minimum length of a password is one byte. The maximum length is eight bytes. You may use any displayable character in a password except for the semicolon (;), question mark (?), double quote ("), and single quote (').

A password is case sensitive. If the password begins with a non-alphabetic character, the password must be enclosed in single quotes.

See Also

GRANT

REVOKE

SET PASSWORD


Chapter contents
Book contents

Prev topic: SET ROWCOUNT
Next topic: SET TIME ZONE