0% found this document useful (0 votes)
119 views1 page

Oracle Database Backup Script Guide

The document contains SQL scripts that allocate channels on disks 1, 2, and 3 and perform full and incremental database backups with compression at different levels, as well as archiving and deleting archived logs. It configures disk devices for parallelism of 4 and backup type to backup sets.

Uploaded by

shaikali1980
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
119 views1 page

Oracle Database Backup Script Guide

The document contains SQL scripts that allocate channels on disks 1, 2, and 3 and perform full and incremental database backups with compression at different levels, as well as archiving and deleting archived logs. It configures disk devices for parallelism of 4 and backup type to backup sets.

Uploaded by

shaikali1980
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

RUN

{
ALLOCATE CHANNEL disk1 DEVICE TYPE DISK FORMAT '/disk1/cat/%U';
ALLOCATE CHANNEL disk2 DEVICE TYPE DISK FORMAT '/disk2/cat/%U';
ALLOCATE CHANNEL disk3 DEVICE TYPE DISK FORMAT '/disk3/cat/%U';
BACKUP AS COPY DATABASE;
}

backup database incremental level 0 cumulative database;


backup as compressed backupset format 'LV0_%u_%d_%s' tag '%TAG LV1 COMPRESS LOW'
incremental level 0 cumulative database;
RUN
{
ALLOCATE CHANNEL disk1 DEVICE TYPE DISK FORMAT '/disk1/cat/%U';
ALLOCATE CHANNEL disk2 DEVICE TYPE DISK FORMAT '/disk2/cat/%U';
ALLOCATE CHANNEL disk3 DEVICE TYPE DISK FORMAT '/disk3/cat/%U';
backup as compressed backupset format 'LV0_%u_%d_%s' tag '%TAG LV0 COMPRESS LOW'
incremental level 0 cumulative database;
}

RUN
{
ALLOCATE CHANNEL disk1 DEVICE TYPE DISK FORMAT '/disk1/cat/%U';
ALLOCATE CHANNEL disk2 DEVICE TYPE DISK FORMAT '/disk2/cat/%U';
ALLOCATE CHANNEL disk3 DEVICE TYPE DISK FORMAT '/disk3/cat/%U';
backup as compressed backupset format 'LV1_%u_%d_%s' tag '%TAG LV1 COMPRESS LOW'
incremental level 1 cumulative database;
backup format 'ARCH_%u_%d_%s' tag '%TAG ARCH NOCOMPRESS' archivelog all not
backed up 2 times;
delete FORCE noprompt archivelog all backed up 1 times to device type disk;
}

run
{
backup incremental level 1 cumulative database;
backup archivelog all delete all input;
}

CONFIGURE DEVICE TYPE DISK PARALLELISM 4 BACKUP TYPE TO BACKUPSET;

You might also like