当前位置:网站首页>DM8 backup set deletion

DM8 backup set deletion

2022-07-06 03:54:00 Song Xiaorong

DMRMAN Delete backup set in

1

Delete a specific backup set

remove backupset Command to delete a specific backup set , Only one backup set can be deleted at a time . Close the database :

[[email protected]]$ ./DmServiceDMSERVER stop

Stopping DmServiceDMSERVER:                                [ OK ]

RMAN>backup database '/dm8/data/DAMENG/dm.ini' backupset'/dm8/backup/full01';RMAN>remove backupset '/dm8/backup/full01';

Successfully deleted in the database , The backup files on the operating system will also be deleted accordingly .

2

Delete all backup sets in batch

RMAN>backup database '/dm8/data/DAMENG/dm.ini' backupset'/dm8/backup/full01';

RMAN>backup database '/dm8/data/DAMENG/dm.ini' backupset'/dm8/backup/full02';

RMAN>remove backupsets with backupdir '/dm8/backup';

3

Batch delete backup sets at a specified point in time

RMAN>backup database '/dm8/data/DAMENG/dm.ini' backupset'/dm8/backup/full01';RMAN>remove backupsets with backupdir '/dm8/backup/' until time'2020-08-19 17:00:00';

SQL Statement use the function to delete the backup set

stay DM The database can check and delete backup sets through the following procedures or functions :

SF_BAKSET_CHECK

SF_BAKSET_REMOVE

SF_BAKSET_REMOVE_BATCH

SP_DB_BAKSET_REMOVE_BATCH

SP_TS_BAKSET_REMOVE_BATCH

SP_TAB_BAKSET_REMOVE_BATCH

SP_ARCH_BAKSET_REMOVE_BATCH

1

SF_BAKSET_CHECK

Verify the backup set .

[[email protected]]$ ./DmServiceDMSERVER start

Starting DmServiceDMSERVER:                                [ OK ]

[[email protected]]$ ./disql SYSDBA/SYSDBA

The server [LOCALHOST:5236]: In the normal open state

Login usage time :6.089( millisecond )

disqlV8

SQL>backup database full backupset '/dm8/backup/full01';

Operation performed

Elapsed time :00:00:01.278. Executive number :6.

SQL>select SF_BAKSET_CHECK('DISK','/dm8/backup/full01');

Line number    SF_BAKSET_CHECK('DISK','/dm8/backup/full01')

------------------------------------------------------

1         1

Elapsed time :7.370( millisecond ). Executive number :7.

2

SF_BAKSET_REMOVE

Delete the backup set of the specified device type and the specified backup set directory . Check only one legal at a time .meta file , Then delete the corresponding backup set .

SQL>select SF_BAKSET_REMOVE('DISK','/dm8/backup/full01');

Line number    SF_BAKSET_REMOVE('DISK','/dm8/backup/full01')

-------------------------------------------------------

1         1

Elapsed time :19.721( millisecond ). Executive number :8.

3

SF_BAKSET_REMOVE_BATCH

Batch delete all backup sets that meet the specified conditions .

SQL> backup database full backupset '/dm8/bakcup/full01';

Operation performed

Elapsed time :938.875( millisecond ). Executive number :10.

SQL> backup tablespace test full backupset '/dm8/backup/full02';

Operation performed

Elapsed time :794.957( millisecond ). Executive number :11.

SQL> select sf_bakset_remove_batch ('DISK', now()-1, 2, NULL);

Line number    SF_BAKSET_REMOVE_BATCH('DISK',NOW()-1,2,NULL)

-------------------------------------------------------

1         1

Elapsed time :8.614( millisecond ). Executive number :12.

SQL>select sf_bakset_remove_batch ('DISK', now(),NULL,NULL);

Line number    SF_BAKSET_REMOVE_BATCH('DISK',NOW(),NULL,NULL)

--------------------------------------------------------

1         1

Elapsed time :7.756( millisecond ). Executive number :13.

4

SP_DB_BAKSET_REMOVE_BATCH

Batch delete the database backup set before the specified time . Before using this method , You need to use it first SF_BAKSET_BACKUP_DIR_ADD Add the backup set directory to be deleted , Otherwise, only the backup set under the default backup path will be deleted .

SQL>backup database full backupset '/dm8/backup/full01';

Operation performed

Elapsed time :922.757( millisecond ). Executive number :14.

SQL> select sf_bakset_backup_dir_add('DISK','/dm8/backup');

Line number    SF_BAKSET_BACKUP_DIR_ADD('DISK','/dm8/backup')

---------- ----------------------------------------------

1          1

Elapsed time :0.946( millisecond ). Executive number :15.

SQL> sp_db_bakset_remove_batch ('DISK', now());

DMSQL Process completed successfully

Elapsed time :10.211( millisecond ). Executive number :16.

SQL>  sp_db_bakset_remove_batch ('DISK', now()-15);

DMSQL Process completed successfully

Elapsed time :8.257( millisecond ). Executive number :17.

5

SP_TS_BAKSET_REMOVE_BATCH

Batch delete the specified table space object and the table space backup set before the specified time . Before using this method , You need to use it first SF_BAKSET_BACKUP_DIR_ADD Add the backup set directory to be deleted , Otherwise, only the backup set under the default backup path will be deleted .

SQL>backup tablespace test full backupset '/dm8/backup/test';

Operation performed

Elapsed time :800.435( millisecond ). Executive number :18.

SQL>select sf_bakset_backup_dir_add('DISK','/dm8/backup');

Line number    SF_BAKSET_BACKUP_DIR_ADD('DISK','/dm8/backup')

--------------------------------------------------------

1         1

Elapsed time :0.315( millisecond ). Executive number :19.

SQL>call sp_ts_bakset_remove_batch('DISK',NOW(),'TEST');

DMSQL Process completed successfully

Elapsed time :8.093( millisecond ). Executive number :20.

6

SP_TAB_BAKSET_REMOVE_BATCH

Batch delete the specified table object and the table backup set before the specified time . Before using this method , You need to use it first SF_BAKSET_BACKUP_DIR_ADD Add the backup set directory to be deleted , Otherwise, only the backup set under the default backup path will be deleted .

SQL>create table test (t1 int);

Operation performed

Elapsed time :8.965( millisecond ). Executive number :21.

SQL>backup table test backupset '/dm8/backup/test';

Operation performed

Elapsed time :00:00:01.784. Executive number :22.

SQL>select SF_BAKSET_BACKUP_DIR_ADD ('DISK','/dm8/backup');

Line number    SF_BAKSET_BACKUP_DIR_ADD('DISK','/dm8/backup')

--------------------------------------------------------

1         1

Elapsed time :731.887( millisecond ). Executive number :23.

SQL>call SP_TAB_BAKSET_REMOVE_BATCH('DISK',NOW(),'SYSDBA','TEST');

DMSQL Process completed successfully

Elapsed time :185.518( millisecond ). Executive number :24.

7

SP_ARCH_BAKSET_REMOVE_BATCH

Batch delete the archive backup set before the specified time . Before using this method , You need to use it first SF_BAKSET_BACKUP_DIR_ADD Add the backup set directory to be deleted , Otherwise, only the backup set under the default backup path will be deleted .

SQL>backup archivelog backupset '/dm8/backup/archbak';

Operation performed

Elapsed time :00:00:01.363. Executive number :25.

SQL>select SF_BAKSET_BACKUP_DIR_ADD('DISK','/dm8/backup');

Line number    SF_BAKSET_BACKUP_DIR_ADD('DISK','/dm8/backup')

--------------------------------------------------------

1         1

Elapsed time :1.192( millisecond ). Executive number :26.

SQL>call SP_ARCH_BAKSET_REMOVE_BATCH('DISK',NOW());

DMSQL Process completed successfully

Elapsed time :10.074( millisecond ). Executive number :27.

原网站

版权声明
本文为[Song Xiaorong]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202132259039109.html