Oracle9i OLAP User's Guide Release 2 (9.2) Part Number A95295-01 |
|
Administering Oracle OLAP, 7 of 9
The OLAP DML contains three types of commands that read from and write to external files:
These commands control access to files by using BFILE security. This database security mechanism creates a directory alias to represent a physical disk directory. Permissions are assigned to the alias, which control access to files within the associated physical directory.
You use PL/SQL statements to create a directory alias and grant permissions. The relevant syntax of these SQL statements is provided in this chapter.
See Also:
Oracle9i SQL Reference under the entries for |
To create a directory alias, you must have CREATE ANY DIRECTORY
system privileges.
Use a CREATE DIRECTORY
statement to create a new directory alias, or a REPLACE DIRECTORY
statement to redefine an existing directory alias, using the following PL/SQL syntax:
{CREATE | REPLACE | CREATE OR REPLACE} DIRECTORY alias AS 'pathname';
Where:
alias is the name of the directory alias.
pathname is the physical directory path.
After you create a directory alias, grant users and groups access rights to the files contained in that directory, using the following PL/SQL syntax:
GRANT permission ON DIRECTORY alias TO {user | role | PUBLIC};
Where:
permission
is one of the following:
alias
is the name of the directory alias.
user
is a database user name. That user gets immediate access rights.
role
is a database role. All users who have been granted that role get immediate access rights.
PUBLIC
is all database users. All users gets immediate access rights.
The following SQL commands create a directory alias named olapdemo
to control access to a directory named /users/oracle/OraHome1/demo
and grant read access to all users.
CREATE DIRECTORY olapdemo as '/users/oracle/OraHome1/demo'; GRANT READ ON olapdemo TO PUBLIC;
Users access files located in /users/oracle/OraHome1/demo
with DML commands such as this one:
funit = FILEOPEN('olapdemo/units.dat' READ)
|
![]() Copyright © 2001, 2002 Oracle Corporation. All Rights Reserved. |
|