Drop Down MenusCSS Drop Down MenuPure CSS Dropdown Menu

Oracle RAC GENERATE ARCHIVE LOG FROM ASM TO LOCAL DISK

HOW TO GENERATE ARCHIVE LOG FROM ASM TO LOCAL DISK
SQL> CREATE or replace DIRECTORY archdir AS '+ARCH/mscdxb/arch/';
SQL> CREATE or replace DIRECTORY tempdir AS '/u01/starch/';
spool archmove.sql
set linesize 250
set pagesize 250
select 'EXECUTE DBMS_FILE_TRANSFER.COPY_FILE(''ARCHDIR'','''||
SUBSTR(NAME,INSTR(NAME,'/',-1) + 1) ||''',''TEMPDIR'','''||
SUBSTR(NAME,INSTR(NAME,'/',-1) + 1)||''');'
FROM V$ARCHIVED_LOG where name is not null;
spool off;
exit;

Comments

Popular posts from this blog

Script to find sessions that are blocking other sessions in PostgreSQL

How to find the server is whether standby (slave) or primary(master) in Postgresql replication ?

How to Get Table Size, Database Size, Indexes Size, schema Size, Tablespace Size, column Size in PostgreSQL Database

PostgreSQL pgBadger

How to Return a Result Set from a PostgreSQL Stored Procedure