In Oracle, you can use the "create or replace directory dumpdir as 'directory directory path';" statement to modify the directory directory. This statement can not only be used to modify the directory directory, but also to create the directory.
The operating environment of this tutorial: Windows 10 system, Oracle 11g version, Dell G3 computer.
1. Query the directory
select * from dba_directories;
2. Create or modify the directory
create or replace directory dumpdir as '/home/dumpfiles';
3 , empower directory directory
grant read,write on directory dumpdir to username;
4, delete directory directory
drop directory DIRENAME;
Expand knowledge:
Oracle Directory (directory) allows users to log in to the Oracle database Flexibly read and write files, greatly improving Oracle's ease of use and scalability. The syntax is as follows:
CREATE [OR REPLACE] DIRECTORY DIRECTORY AS 'PATHNAME';
The permissions to create and delete Directory are: CREATE ANY DIRECTORY, DROP ANY DIRECTORY. The permissions given to ordinary users to use Directory include READ, WRITE, and EXECUTE. They can also directly write ALL, as shown below:
GRANT READ,WRITE,EXECUTE ON DIRECTORY EXP_DIR_LHR TO LHR; GRANT ALL ON DIRECTORY EXP_DIR_LHR TO LHR;
It should be noted that when creating a Directory database object, the corresponding path does not exist and will not When reporting an error, the Oracle database will not verify the existence of the path on the operating system. It will only verify the existence of the path when it is used. Therefore, when creating the Directory, remember the true existence of the corresponding path, otherwise ORA-29913 or ORA may be reported. -29400 error.
The following is an example of creating Oracle Directory:
Recommended tutorial: "Oracle Video Tutorial"
The above is the detailed content of How to modify the directory directory in Oracle. For more information, please follow other related articles on the PHP Chinese website!