Pervasive logo

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


Prev
SET ROWCOUNT
Contents
Up
Check for Revisions
Next
SET TIME ZONE