HomeЛюди и блогиRelated VideosMore From: Oracle DBA World

how to create directory in oracle 12c, 11g

3 ratings | 2012 views
Use the CREATE DIRECTORY statement to create a directory object. A directory object specifies an alias for a directory on the server file system where external binary file LOBs and external table data are located. You can use directory names when referring to BFILEs in your PL/SQL code and OCI calls, rather than hard coding the operating system path name, for management flexibility. All directories are created in a single namespace and are not owned by an individual schema. You can secure access to the BFILEs stored within the directory structure by granting object privileges on the directories to specific users. You must have CREATE ANY DIRECTORY system privilege to create directories. When you create a directory, you are automatically granted the READ and WRITE object privileges on the directory, and you can grant these privileges to other users and roles. The DBA can also grant these privileges to other users and roles. WRITE privileges on a directory are useful in connection with external tables. They let the grantee determine whether the external table agent can write a log file or a bad file to the directory. For file storage, you must also create a corresponding operating system directory, an ASM disk group, or a directory within an ASM disk group. Your system or database administrator must ensure that the operating system directory has the correct read and write permissions for Oracle Database processes. Privileges granted for the directory are created independently of the permissions defined for the operating system directory, and the two may or may not correspond exactly. For example, an error occurs if sample user hr is granted READ privilege on the directory object but the corresponding operating system directory does not have READ permission defined for Oracle Database processes. ---------------------------------------------------------------------------- Default directory is DATA_PUMP_DIR.Below command is to get directory name and directory path. SELECT directory_name, directory_path FROM dba_directories WHERE directory_name='DATA_PUMP_DIR' DIRECTORY_NAME DIRECTORY_PATH --------------- ------------------------------------------------------- DATA_PUMP_DIR /u01/app/mohammad75/product/12.1.0/dbhome_1/rdbms/log/
Html code for embedding videos on your blog
Text Comments (0)

Would you like to comment?

Join YouTube for a free account, or sign in if you are already a member.