|
This section contains step-by-step tasks pertaining to security. The tasks are divided into the following categories:
General tasks apply to the overall use of security.
Btrieve security policy tasks apply to the transactional interface.
User and group tasks apply to creating users and groups.
Assigning permissions tasks pertain to granting permissions for users and groups.
See Data Encryption .
To start Pervasive.SQL Control Center
If you do not see the database engine you wish to access, you must register it with PCC. To do so, right-click Engines then click New 4 Server. Type the name of the database engine then click OK.
To log into a database using PCC when you are already logged into that database as another user
Note
As the Master user, logging in as another user can aid you in testing the more restrictive permissions you have assigned this user.
Name reflects the name of the user currently logged in to the database. If the database does not have security enabled, name is Master. Name may also be Master if the current user is logged in as Master.
Any nodes expanded for the database are collapsed.
When you turn security on or off, the Master user must have only one connection open and must be the only user connected.
As soon as you turn security on for the first time, only the Master user can access the database. The Master user password, as with all Pervasive.SQL passwords, is case sensitive.
Caution
If you turn on security, be sure to specify a password with a significant length, at least five characters but no more than eight. Do not leave the password field blank because doing so creates a major security risk for your database. Note that passwords are case sensitive.
To turn on security using database properties
If the database resides on a remote machine, you must provide a user name and password of an administrator or of a member of the Pervasive_Admin group for the remote machine. The user name and password is not required if the database resides on the local machine to which you are logged in (and the local machine is not running Terminal Services).
Note
Turning on security prevents all users from accessing the database unless they login to it using a valid database user name and password. User names and passwords cannot be set up until security is turned on, so the database will be inaccessible to each user for the period of time until you have set up a user account for that user.
Database security is now on and you are logged in as the Master user. For instructions on creating database user accounts, see User and Group Tasks .
To turn on security using a SQL statement
Note
Turning on security prevents all users from accessing the database unless they login to it using a valid database user name and password. User names and passwords cannot be set up until security is turned on, so the database will be inaccessible to each user for the period of time until you have set up a user account for that user.
You can also use SQL Editor in PCC to issue the SQL statement.
See also SET SECURITY in SQL Engine Reference.
To turn off security using database properties
You must be logged into the computer as an administrator or as a member of the Pervasive_Admin operating system security group.
Caution
Turning off security allow all operating system users to access the database through the relational and transactional interfaces if database security is Mixed or Database mode.
Database user names, passwords, and permissions are retained but not used if security is turn off. If security is re-enabled, the previous user names, passwords, and permissions take effect again. (An exception is the Master user. The Master password is not retained nor re-applied.)
Database security is now off.
To turn off security using a SQL statement
Note
Turning off security allow all operating system users to access the database through the relational and transactional interfaces if database security is Mixed or Database mode.
Database user names, passwords, and permissions are retained but not used if security is turn off. If security is re-enabled, the previous user names, passwords, and permissions take effect again. (An exception is the Master user. The Master password is not retained nor re-applied.)
You can also use SQL Editor in PCC to issue the SQL statement.
See also SET SECURITY in SQL Engine Reference.
To set or change the security policy for a database
Caution
Changing security policy for a database may prevent current users from accessing the database, if security is turned on and the given users do not have equivalent user accounts and rights under the new security policy.
Caution
If your database has security turned on and you change from Classic security policy to Mixed or Database, all users are prevented from accessing the database until you create database user accounts and privileges for them.
To use an existing database, including the pre-defined DefaultDB, with your Btrieve files
If your files are spread over many directories, specify a high-level directory that they all have in common. You can specify a root level if necessary, but doing so includes in the database all Btrieve files at the root level and its subordinate directories.
You do not need to enter every directory, just the lowest level directory that is common to all Btrieve files you want to include in the database.
To create a new group with PCC
A group name is limited to a maximum of 30 bytes.
To create a new user with PCC
A user name is limited to a maximum of 30 bytes.
Passwords are case sensitive and limited to a maximum of 8 bytes. You may use any displayable character in a password except for the semicolon (;) and the question mark (?).
For the Mixed security polity, the database engine passes the user name and password entered by the user to the operating system authentication service. See Mixed .
Click
for Group, then click the desired group in the list.
Note
You can add a user to a group only when creating the new user. You cannot add an existing user to a group.
To assign a user to a group
Note
You can add a user to a group only when creating the new user. You cannot add an existing user to a group.
for Group, then click the desired group in the list.
To create a new group or user with SQL statements
The Select Database dialog appears.
|
Group Statement
|
User Statement
|
|---|---|
CREATE GROUP group-name
where group-name is name of the group that you want to create.
For example, to create the group `AcctGroup', type the following syntax:
CREATE GROUP AcctGroup
Note that group names are limited to a maximum of 30 bytes.
See also CREATE GROUP in SQL Engine Reference.
|
GRANT LOGIN TO myuser mypass
where myuser is the name of the user that you wish to create, and mypass is the password for that user.
For example, to create the user `john' with password `jb456', you would type the following syntax:
GRANT LOGIN TO john jb456
Note that user names are limited to a maximum of 30 bytes and passwords to a maximum of 8 bytes.
See also GRANT in SQL Engine Reference.
|
To assign permissions for a group
Note
Permissions on the "Database" tab override permissions on the "Table" tab.
A check mark indicates that the permission applies.
To assign specific permissions for a user
Note
You cannot assign specific permissions to a user if the user is a member of a group. The permissions of the group apply to the user.
Permissions on the "Database" tab override permissions on the "Table" tab.
A check mark indicates that the permission applies.
To assign permissions applicable to all users
Note
Permissions on the "Database" tab override permissions on the "Table" tab.
A check mark indicates that the permission applies.
To assign a user table privileges using SQL statements
The Select Database dialog appears.
See GRANT in SQL Engine Reference for the syntax and examples.
|
Chapter contents
Prev topic: Transactional Interface Security Quick Start
|