Library

Product




Previous | Contents

2.48 RMU Set Privilege Command

Allows you to modify the root file access control list (ACL) for a database.

A database's root file ACL determines the Oracle RMU commands that users can execute for that database.


Format




DESCRIPTION

The RMU Set Privilege command allows you to manipulate an entire root file ACL, or to create, modify, or delete access control entries (ACEs) in a root file ACL. See the Oracle Rdb7 Guide to Database Design and Definition for introductory information on ACEs and ACLs.

Use the RMU Set Privilege command to add ACEs to a root file ACL by specifying the ACEs with the Acl qualifier.

Table 2-1 shows the privileges a user must have to access each Oracle RMU command.

If the database root file you specify with RMU Set Privilege command does not have an ACL, Oracle RMU creates one.

The RMU Set Privilege command provides the following qualifiers to manipulate ACEs and ACLs in various ways:

By default, any ACEs you add to a root file ACL are placed at the top of the ACL. Whenever Oracle RMU receives a request for Oracle RMU access for a database that has a root file ACL, it searches each entry in the ACL from the first to the last for the first match it can find, and then stops searching. If another match occurs further down in the root file ACL, it has no effect. Because the position of an ACE in a root file ACL is so important, you can use the After qualifier to correctly position an ACE. When you use the After qualifier, any additional ACEs are added after the specified ACE.

You can delete ACEs from an ACL by including the Delete qualifier and specifying the ACEs with the Acl qualifier. To delete all the ACEs, include the Delete qualifier and specify the Acl qualifier without specifying any ACEs.

You can copy an ACL from one root file to another by using the Like qualifier. The ACL of the root file specified with the Like qualifier replaces the ACL of the root file specified with the root-file-spec parameter.

Use the New qualifier to delete all ACEs before adding any ACEs specified by the Acl, Like, or Replace qualifiers.

You can replace existing ACEs in a root file ACL by using the Replace qualifier. Any ACEs specified with the Acl qualifier are deleted and replaced by those specified with the Replace qualifier.

The existing ACE can be abbreviated when you use the Delete, Replace, or After qualifiers.

Use the RMU Set Privilege command with the Edit qualifier to invoke the ACL editor. You can specify the following qualifiers only when you specify the Edit qualifier also:

For more information on the ACL editor, see the OpenVMS documentation set.


COMMAND PARAMETERS

root-file-spec

The root file for the database whose root file ACL you are modifying.

COMMAND QUALIFIERS

Acl[=(ace[,...])]

Specifies one or more ACEs to be modified. When no ACE is specified, the entire ACL is affected. Separate multiple ACEs with commas. The specified ACEs are inserted at the top of the ACL unless you specify the After qualifier.

After=ace

Indicates that all ACEs specified with the Acl qualifier are to be added after the ACE specified with the After qualifier. By default, any ACEs added to the ACL are always placed at the top of the list.

You cannot use this qualifier with the Edit qualifier.

Delete[=All]

Indicates that the ACEs specified with the Acl qualifier are to be deleted. If no ACEs are specified with the Acl qualifier, the entire ACL is deleted. If you specify an ACE that was not specified with the Acl qualifier, you are notified that the ACE does not exist, and the delete operation continues.

You cannot use this qualifier with the Edit qualifier.

Edit

Invokes the ACL editor and allows you to use the Journal, Keep, Mode, or Recover qualifiers. Oracle RMU ignores any other qualifiers you specify with the Edit qualifier.

The RMU Set Privilege command with the Edit qualifier only functions off line. If you attempt it on line, an error message is generated. This restriction is necessary because the ACL editor requests exclusive write access to the database.

To use the Edit qualifier, the SYS$SHARE:ACLEDTSHR.EXE image must be installed at system startup time, or, be installed by RMONSTART.COM. Contact your system manager if this image is not installed as needed.

For more information on the ACL editor, see the OpenVMS documentation set.

Journal[=file-spec]

Nojournal

Controls whether a journal file is created from the editing session. By default, a journal file is created if the editing session ends abnormally.

If you omit the file specification, the journal file has the same name as the root file and a file type of .tjl. You can use the Journal qualifier to specify a journal file name that is different from the default. No wildcard characters are allowed in the Journal qualifier file-spec parameter.

You must specify the Edit qualifier to use this qualifier.

Keep[=(Recovery,Journal)]

Determines whether the journal file, the recovery file, or both, are deleted when the editing session ends. The options are:

You can shorten the Journal and Recover options to J and R, respectively. If you specify only one option, you can omit the parentheses.

You must specify the Edit qualifier to use this qualifier. If you specify the Edit qualifier but do not specify the Keep qualifier, both the journal file for the current editing session and the journal file used for restoring the ACL are deleted when the editing session ends.

Like=source-root-file-spec

Indicates that the ACL of the root file specified with the Like qualifier is to replace the ACL of the root file specified with the root-file-spec parameter of the RMU Set Privilege command. Any existing ACEs are deleted before the root file ACL specified by the Like qualifier is copied.

You cannot use this qualifier with the Edit qualifier.

Log

Nolog

Controls whether the RMU Set Privilege command displays the name of the root file that has been affected by the command.

The default is Nolog, where the name of the root file affected by the command is not displayed.

You cannot use this qualifier with the Edit qualifier.

Mode=[No]Prompt

Determines whether the ACL editor prompts for field values. By default, the ACL editor selects prompt mode.

You must specify the Edit qualifier to use this qualifier.

New

Indicates that any existing ACE in the ACL of the root file specified with RMU Set Privilege is to be deleted. To use the New qualifier, you must specify a new ACL or ACE with the Acl, Like, or Replace qualifiers.

You cannot use this qualifier with the Edit qualifier.

Recover[=file-spec]

Norecover

Specifies the name of the journal file to be used in a recovery operation. If the file specification is omitted with the Recover qualifier, the journal is assumed to have the same name as the root file and a file type of .tjl. No wildcard characters are allowed with the Recover qualifier file-spec parameter.

The default is the Norecover qualifier, where no recovery is attempted when you invoke the ACL editor to edit a root file ACL.

You must specify Edit to use this qualifier.

Replace=(ace[,...])

Deletes the ACEs specified with the Acl qualifier and replaces them with those specified with the Replace qualifier. Any ACEs specified with the Acl qualifier must exist and must be specified in the order in which they appear in the ACL.

This qualifier cannot be used with the Edit qualifier.


USAGE NOTES


EXAMPLES

Example 1

The following example assumes that the user with a user identification code (UIC) of [SQL,USER] has created the mf_test_db database and is therefore the owner of the database. After creating the mf_test_db database, the owner displays the root file ACL for the database. Then the owner grants Oracle RMU privileges to database users. The Oracle RMU privileges granted to each type of user depend on the type of Oracle RMU access the user needs to the database.

$! Note that by default the owner (the user with a UIC of [SQL,USER]) 
$! is granted all the Oracle RMU privileges in the root file 
$! ACL and no other users are granted any Oracle RMU privileges. 
 
$ RMU/SHOW PRIVILEGE MF_TEST_DB.RDB 
Object type: file,  Object name: SQL_USER:[USER]MF_TEST_DB.RDB;1, 
on 30-MAR-1996 15:51:55.79 
 
    (IDENTIFIER=[SQL,USER],ACCESS=READ+WRITE+CONTROL+RMU$ALTER+ 
    RMU$ANALYZE+RMU$BACKUP+RMU$CONVERT+RMU$COPY+RMU$DUMP+RMU$LOAD+ 
    RMU$MOVE+RMU$OPEN+RMU$RESTORE+RMU$SECURITY+RMU$SHOW+RMU$UNLOAD+ 
    RMU$VERIFY) 
$! 
$! The owner uses the RMU Set Privilege command and the After 
$! qualifier to grant the RMU$ANALYZE, RMU$OPEN, and 
$! RMU$VERIFY privileges to a user with a UIC of [SQL,USER2].  
$! This user will serve as the database administrator for the 
$! mf_test_db database. 
 
$ RMU/SET PRIVILEGE/ACL=(IDENTIFIER=[SQL,USER2],ACCESS=RMU$ANALYZE - 
_$ +RMU$OPEN+RMU$VERIFY) - 
_$ /AFTER=(IDENTIFIER=[SQL,USER])/LOG MF_TEST_DB.RDB 
%RMU-I-MODIFIED, SQL_USER:[USER]MF_TEST_DB.RDB;1 modified 
$! 
$! Next, the owner grants the RMU$SECURITY privilege to a user with a 
$! UIC of [SQL,USER3].  This gives the user USER3 the ability 
$! to grant other users the appropriate privileges they need for 
$! accessing the database with Oracle RMU commands.  Because both 
$! the database creator and user USER3 have the RMU$SECURITY 
$! privilege, both of them can modify the root file ACL for the 
$! database. 
 
$ RMU/SET PRIVILEGE/ACL=(IDENTIFIER=[SQL,USER3],ACCESS=RMU$SECURITY) - 
_$ /AFTER=(IDENTIFIER=[SQL,USER2])/LOG MF_TEST_DB.RDB 
%RMU-I-MODIFIED, SQL_USER:[USER]MF_TEST_DB.RDB;1 modified 
$! 
$! The user with a UIC of [RDB,USER4], who will serve as the database 
$! operator, is granted the RMU$BACKUP, RMU$CONVERT, RMU$DUMP, and 
$! RMU$RESTORE privileges: 
$ RMU/SET PRIVILEGE/ACL=(IDENTIFIER=[RDB,USER4],ACCESS=RMU$BACKUP - 
_$ +RMU$CONVERT+RMU$DUMP+RMU$RESTORE) - 
_$ /AFTER=(IDENTIFIER=[SQL,USER3])/LOG MF_TEST_DB.RDB 
%RMU-I-MODIFIED, SQL_USER:[USER]MF_TEST_DB.RDB;1 modified 
$! 
$! The RMU$LOAD and RMU$SHOW privileges are granted to the user 
$! with a UIC of [RDB,USER5]. This user will be writing programs 
$! that load data into the database. 
 
$ RMU/SET PRIVILEGE/ACL=(IDENTIFIER=[RDB,USER5],ACCESS=RMU$LOAD - 
_$ +RMU$SHOW) /AFTER=(IDENTIFIER=[RDB,USER4]) MF_TEST_DB.RDB 
%RMU-I-MODIFIED, SQL_USER:[USER]MF_TEST_DB.RDB;1 modified 
$! 
$! No privileges are granted to all other users. 
 
$ RMU/SET PRIVILEGE/ACL=(IDENTIFIER=[*,*],ACCESS=NONE) - 
_$ /AFTER=(IDENTIFIER=[RDB,USER5])/LOG MF_TEST_DB.RDB 
%RMU-I-MODIFIED, SQL_USER:[USER]MF_TEST_DB.RDB;1 modified 
$! 
$! The RMU/SHOW PRIVILEGE command displays the root file ACL for the 
$! mf_test_db database. 
 
$ RMU/SHOW PRIVILEGE MF_TEST_DB.RDB 
Object type: file,  Object name: SQL_USER:[USER]MF_TEST_DB.RDB;1, 
on 30-MAR-1996 15:52:17.03 
 
    (IDENTIFIER=[SQL,USER],ACCESS=READ+WRITE+CONTROL+RMU$ALTER+ 
    RMU$ANALYZE+RMU$BACKUP+RMU$CONVERT+RMU$COPY+RMU$DUMP+RMU$LOAD+ 
    RMU$MOVE+RMU$OPEN+RMU$RESTORE+RMU$SECURITY+RMU$SHOW+RMU$UNLOAD+ 
    RMU$VERIFY) 
    (IDENTIFIER=[SQL,USER2],ACCESS=RMU$ANALYZE+RMU$OPEN+RMU$VERIFY) 
    (IDENTIFIER=[SQL,USER3],ACCESS=RMU$SECURITY) 
    (IDENTIFIER=[RDB,USER4],ACCESS=RMU$BACKUP+RMU$CONVERT+RMU$DUMP+ 
    RMU$RESTORE) 
    (IDENTIFIER=[RDB,USER5],ACCESS=RMU$LOAD+RMU$SHOW) 
    (IDENTIFIER=[*,*],ACCESS=NONE) 

Example 2

The following command adds an ACE for the user with a UIC of [RDB,USER1] to the root file ACL for the personnel database. This ACE grants [RDB,USER1] the RMU$BACKUP privilege for the personnel database. The RMU$BACKUP privilege allows user [RDB,USER1] to access the RMU Backup, RMU Backup After_Journal, and RMU Checkpoint commands for the personnel database.

$ RMU/SET PRIVILEGE/ACL=(IDENTIFIER=[RDB,USER1],ACCESS=RMU$BACKUP) - 
_$ PERSONNEL.RDB 

Example 3

The Replace qualifier in the following example causes the ACE in the root file ACL for the user with a UIC of [RDB,USER4] to be replaced by the ACE specified for the user with a UIC of [SQL,USER6]:

$ RMU/SET PRIVILEGE/ACL=(IDENTIFIER=[RDB,USER4]) - 
_$ /REPLACE=(IDENTIFIER=[SQL,USER6],ACCESS=RMU$BACKUP+RMU$CONVERT - 
_$ +RMU$DUMP+RMU$RESTORE)/LOG MF_TEST_DB.RDB 
%RMU-I-MODIFIED, SQL_USER:[USER]MF_TEST_DB.RDB;1 modified 
$! 
$ RMU/SHOW PRIVILEGE MF_TEST_DB.RDB 
Object type: file,  Object name: SQL_USER:[USER]MF_TEST_DB.RDB;1, 
on 30-MAR-1996 15:52:23.92 
 
    (IDENTIFIER=[SQL,USER],ACCESS=READ+WRITE+CONTROL+RMU$ALTER+ 
    RMU$ANALYZE+RMU$BACKUP+RMU$CONVERT+RMU$COPY+RMU$DUMP+RMU$LOAD+ 
    RMU$MOVE+RMU$OPEN+RMU$RESTORE+RMU$SECURITY+RMU$SHOW+RMU$UNLOAD+ 
    RMU$VERIFY) 
    (IDENTIFIER=[SQL,USER2],ACCESS=RMU$ANALYZE+RMU$OPEN+RMU$VERIFY) 
    (IDENTIFIER=[SQL,USER3],ACCESS=RMU$SECURITY) 
    (IDENTIFIER=[SQL,USER6],ACCESS=RMU$BACKUP+RMU$CONVERT+RMU$DUMP+ 
    RMU$RESTORE) 
    (IDENTIFIER=[RDB,USER5],ACCESS=RMU$LOAD+RMU$SHOW) 
    (IDENTIFIER=[*,*],ACCESS=NONE) 

Example 4

The Delete qualifier in the following example causes the ACE for the user with a UIC of [RDB,USER5] to be deleted from the root file ACL for the mf_test_db database:

$ RMU/SET PRIVILEGE/ACL=(IDENTIFIER=[RDB,USER5]) - 
_$ /DELETE/LOG MF_TEST_DB.RDB 
%RMU-I-MODIFIED, SQL_USER:[USER]MF_TEST_DB.RDB;1 modified 
$! 
$ RMU/SHOW PRIVILEGE MF_TEST_DB.RDB 
Object type: file,  Object name: SQL_USER:[USER]MF_TEST_DB.RDB;1, 
on 30-MAR-1996 15:52:29.07 
 
    (IDENTIFIER=[SQL,USER],ACCESS=READ+WRITE+CONTROL+RMU$ALTER+ 
    RMU$ANALYZE+RMU$BACKUP+RMU$CONVERT+RMU$COPY+RMU$DUMP+RMU$LOAD+ 
    RMU$MOVE+RMU$OPEN+RMU$RESTORE+RMU$SECURITY+RMU$SHOW+RMU$UNLOAD+ 
    RMU$VERIFY) 
    (IDENTIFIER=[SQL,USER2],ACCESS=RMU$ANALYZE+RMU$OPEN+RMU$VERIFY) 
    (IDENTIFIER=[SQL,USER3],ACCESS=RMU$SECURITY) 
    (IDENTIFIER=[SQL,USER6],ACCESS=RMU$BACKUP+RMU$CONVERT+RMU$DUMP+ 
    RMU$RESTORE) 
    (IDENTIFIER=[*,*],ACCESS=NONE) 

Example 5

In the following example, the Like qualifier copies the root file ACL from the mf_test_db database to the test_db database. As part of this operation, the original root file ACL for the test_db database is deleted.

$ RMU/SHOW PRIVILEGE TEST_DB.RDB 
Object type: file,  Object name: SQL_USER:[USER]TEST_DB.RDB;1,  on 
30-MAR-1996 15:52:31.48 
 
    (IDENTIFIER=[SQL,USER],ACCESS=READ+WRITE+CONTROL+RMU$ALTER+ 
    RMU$ANALYZE+RMU$BACKUP+RMU$CONVERT+RMU$COPY+RMU$DUMP+RMU$LOAD+ 
    RMU$MOVE+RMU$OPEN+RMU$RESTORE+RMU$SECURITY+RMU$SHOW+RMU$UNLOAD+ 
    RMU$VERIFY) 
$ ! 
$ RMU/SHOW PRIVILEGE MF_TEST_DB.RDB 
Object type: file,  Object name: SQL_USER:[USER]MF_TEST_DB.RDB;1, 
on 30-MAR-1996 15:52:33.86 
 
    (IDENTIFIER=[SQL,USER],ACCESS=READ+WRITE+CONTROL+RMU$ALTER+ 
    RMU$ANALYZE+RMU$BACKUP+RMU$CONVERT+RMU$COPY+RMU$DUMP+RMU$LOAD+ 
    RMU$MOVE+RMU$OPEN+RMU$RESTORE+RMU$SECURITY+RMU$SHOW+RMU$UNLOAD+ 
    RMU$VERIFY) 
    (IDENTIFIER=[SQL,USER2],ACCESS=RMU$ANALYZE+RMU$OPEN+RMU$VERIFY) 
    (IDENTIFIER=[SQL,USER3],ACCESS=RMU$SECURITY) 
    (IDENTIFIER=[SQL,USER6],ACCESS=RMU$BACKUP+RMU$CONVERT+RMU$DUMP+ 
    RMU$RESTORE) 
    (IDENTIFIER=[*,*],ACCESS=NONE) 
$! 
$ RMU/SET PRIVILEGE/LIKE=MF_TEST_DB.RDB/LOG TEST_DB.RDB 
%RMU-I-MODIFIED, SQL_USER:[USER]TEST_DB.RDB;1 modified 
$! 
$ RMU/SHOW PRIVILEGE TEST_DB.RDB 
Object type: file,  Object name: SQL_USER:[USER]TEST_DB.RDB;1,  on 
30-MAR-1996 15:52:41.36 
 
    (IDENTIFIER=[SQL,USER],ACCESS=READ+WRITE+CONTROL+RMU$ALTER+ 
    RMU$ANALYZE+RMU$BACKUP+RMU$CONVERT+RMU$COPY+RMU$DUMP+RMU$LOAD+ 
    RMU$MOVE+RMU$OPEN+RMU$RESTORE+RMU$SECURITY+RMU$SHOW+RMU$UNLOAD+ 
    RMU$VERIFY) 
    (IDENTIFIER=[SQL,USER2],ACCESS=RMU$ANALYZE+RMU$OPEN+RMU$VERIFY) 
    (IDENTIFIER=[SQL,USER3],ACCESS=RMU$SECURITY) 
    (IDENTIFIER=[SQL,USER6],ACCESS=RMU$BACKUP+RMU$CONVERT+RMU$DUMP+ 
    RMU$RESTORE) 
    (IDENTIFIER=[*,*],ACCESS=NONE) 

Example 6

The New qualifier in the following example deletes all the existing ACEs and the Acl qualifier specifies a new ACE for the root file ACL for the mf_test_db database. Note that after the RMU Set Privilege command in this example is issued, only the user with a UIC of [SQL,USER2] or a user with an OpenVMS override privilege would be able to display the root file ACL for the mf_test_db database.

$ RMU/SHOW PRIVILEGE MF_TEST_DB.RDB 
Object type: file,  Object name: SQL_USER:[USER]MF_TEST_DB.RDB;1, 
on 30-MAR-1996 15:52:44.50 
 
    (IDENTIFIER=[SQL,USER],ACCESS=READ+WRITE+CONTROL+RMU$ALTER+ 
    RMU$ANALYZE+RMU$BACKUP+RMU$CONVERT+RMU$COPY+RMU$DUMP+RMU$LOAD+ 
    RMU$MOVE+RMU$OPEN+RMU$RESTORE+RMU$SECURITY+RMU$SHOW+RMU$UNLOAD+ 
    RMU$VERIFY) 
    (IDENTIFIER=[SQL,USER2],ACCESS=RMU$ANALYZE+RMU$OPEN+RMU$VERIFY) 
    (IDENTIFIER=[SQL,USER3],ACCESS=RMU$SECURITY) 
    (IDENTIFIER=[SQL,USER6],ACCESS=RMU$BACKUP+RMU$CONVERT+RMU$DUMP+ 
    RMU$RESTORE) 
    (IDENTIFIER=[*,*],ACCESS=NONE) 
$! 
$ RMU/SET PRIVILEGE/NEW - 
_$ /ACL=(IDENTIFIER=[SQL,USER2],ACCESS=READ+WRITE+CONTROL+ - 
_$ RMU$ALTER+RMU$ANALYZE+RMU$BACKUP+RMU$CONVERT+RMU$COPY+ - 
_$ RMU$DUMP+RMU$LOAD+RMU$MOVE+RMU$OPEN+RMU$RESTORE+RMU$SHOW+ - 
_$ RMU$UNLOAD+RMU$VERIFY)/LOG MF_TEST_DB.RDB 
%RMU-I-MODIFIED, SQL_USER:[USER]MF_TEST_DB.RDB;1 modified 


Previous | Next | Contents



Library

Product

Copyright ©1996, Oracle Corporation All rights reserved.