AWS command refrence for Oracle DBA

 CLI reference 

Create/Drop  a Directory :

rdsadmin.rdsadmin_util.create_directory is the procedure that can be used to create a directory for Oracle DB in amazon RDS.10,000 directories can be created,all allocated in your main data storage space .

exec rdsadmin.rdsadmin_util.create_directory(p_directory_name => 'product_descriptions');

rdsadmin.rdsadmin_util.drop_directory is the procedure to drop the directory in database . if we drop directory the files which are present in the drop directory are not removed and will be still visble as the rdsadmin.rdsadmin_util.create_directory procedure can reuse pathnames, files in dropped directories can appear in a newly created directory.

exec rdsadmin.rdsadmin_util.drop_directory(p_directory_name => 'product_descriptions'); 

it is always recomended to clear out the files in respective directory before droping the directory .

List & Remove Files from a Directory:

rdsadmin.rds_file_util.listdir is used to list all the files of a directory .

SELECT * FROM table(rdsadmin.rds_file_util.listdir('DATA_PUMP_DIR')) order by mtime ; 

 

Read the contents of the text file .

SELECT * FROM TABLE
    (rdsadmin.rds_file_util.read_text_file(
        p_directory => 'PRODUCT_DESCRIPTIONS',
        p_filename  => 'rice.txt'));
 

 

 


Comments

Popular posts from this blog

Oracle Architecture SGA

FRA Usage and Administration

Format Date in Oracle Database - NLS_DATE_FORMAT