Skip to content

Commit 5f7c0db

Browse files
Update dbms_partition_wrangler_tab.sql
1 parent 2536c3c commit 5f7c0db

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

dbms_partition_wrangler_tab.sql

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -503,6 +503,41 @@ VALUES (
503503
);
504504
COMMIT;
505505

506+
/*
507+
GRP capability to allow you to undo the partition drop.
508+
509+
If CREATE_GRP=Y, it will drop the partition, but the dedicated tablespace will be dropped only once the GRP has been removed.
510+
511+
If using PDBs you’ve got this problem that you must allow drop tablespace with GRPs by setting a parameter:
512+
CDB$ROOT: alter system set "_allow_drop_ts_with_grp"=true;
513+
Setting that parameter will mean that a dropped tablespace will invalidate any GRPs and your ability to recover.
514+
ref: https://mikedietrichde.com/2018/06/05/drop-a-tablespace-in-a-pdb-with-a-guaranteed-restore-point-being-active/
515+
*/
516+
517+
INSERT INTO DBMS_PARTITION_WRANGLER_PARMS
518+
(ID, PARAMETER_NAME,DESCRIPTION,REGEX_STRING)
519+
VALUES (
520+
SEQ_DBMS_PARTITION_WRANGLER_PARMS.NEXTVAL,
521+
'CREATE_GRP',
522+
'Whether to create a temporary Guaranteed Restore Point prior to dropping a partition',
523+
'Y|N',
524+
'N',
525+
'Y'
526+
);
527+
COMMIT;
528+
529+
INSERT INTO DBMS_PARTITION_WRANGLER_PARMS
530+
(ID, PARAMETER_NAME,DESCRIPTION,REGEX_STRING)
531+
VALUES (
532+
SEQ_DBMS_PARTITION_WRANGLER_PARMS.NEXTVAL,
533+
'GRP_DURATION_MINS',
534+
'Number of minutes after dropping the partition to drop the Guaranteed Restore Point',
535+
'[0-9]',
536+
'N',
537+
'Y'
538+
);
539+
COMMIT;
540+
506541
CREATE TABLE DBMS_PARTITION_WRANGLER_SETTINGS (
507542
ID INTEGER PRIMARY KEY,
508543
PARAMETER_ID INTEGER NOT NULL,

0 commit comments

Comments
 (0)