GRANT (SECURITY PRIVILEGES)

Grants security privileges on a database to users.

SYNTAX

user_name Name of the user you want to grant security privileges to.
password Name of the view you want to remove from the database.

DESCRIPTION

The GRANT (security privileges) command creates new users or changes the security privileges of existing users. To execute the GRANT (security privileges) command, you must have SYSADM security privileges.

When you first create a database DBMaker will create the SYSADM default user with no password. You should change the SYSADM password immediately after creating the database to prevent unauthorized access. The SYSADM user is the only authorized user in the database until you grant security privileges to other users.

The SYSADM can grant CONNECT, RESOURCE, and DBA security privileges to a user. Granting CONNECT security privilege effectively add a new user name to the database. Once a user name exists, the SYSADM may grant higher security privileges to that user. Granting higher security privileges does not implicitly grant lower ones as well. Only the SYSADM may grant security privileges to other users.

CONNECT security privilege is necessary before a user can connect to a database. Once a user is granted CONNECT security privilege they have been added to the database as a user. All users must be granted CONNECT security privilege before they can be granted any other security privileges. A user with CONNECT security privileges may create temporary tables in a database, or perform queries on any data to which they have explicitly been granted permission.

RESOURCE security privilege allows a user to create, alter, and drop tables, domains, and indexes. As the owner of any objects they create, users with RESOURCE security privileges may grant and revoke object privileges to other users and create synonyms and views for any objects they own.

DBA security privilege has all same capabilities as RESOURCE security privilege, but may additionally create tablespaces and files. Users with DBA security privileges can also grant or revoke object privileges for schema objects owned by other users (except for system schema objects).

User names and passwords have a maximum length of eight characters, and may contain letters, numbers, the underscore character, and the symbols $ and #. The first character may not be a number.

EXAMPLE

The following example grants CONNECT security privileges to users named vivian and jenny with no password.

GRANT CONNECT TO vivian, jenny

The following example grants CONNECT security privileges to a user named vivian with the password shuka828 and a user named jenny with the password grala833.

GRANT CONNECT TO vivian shuka833, jenny grala828

The following example grants RESOURCE security privileges to users vivian and jenny.

GRANT RESOURCE TO vivian, jenny

The following example grants DBA security privileges to users vivian and jenny.

GRANT DBA TO vivian, jenny

RELATED COMMANDS

< GRANT (Object Privileges) | Contents | INSERT >

Copyright 2002 SYSCOM Computer Engineering Co. All rights reserved.