HOW TO 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> Directory created.SQL> CREATE or replace DIRECTORY tempdir AS '/u01/starch/';Directory created.

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;

About Sher khan

Senior Oracle DBA, Oracle 10g and 11g OCE and OCS, Oracle 11g OPN certified Specialist, OCP Certified in Oracle 9i,10g and 11g. I am working in Oracle technology since 2004. Currently working in U.A.E Email: sher487@hotmail.com
This entry was posted in ASM. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s