llion. Setting the parameter _gc_policy_time to 0 will completely disable DRM, but that also means that you can not manually remaster objects. Further, $object_policy_statistics is not maintained if DRM is disabled. ― SETUP ?-
SYS>drop table scott.test purge;
create table scott.test as select * from sh.sales;
insert into scott.test select * from scott.test;
commit;
insert into scott.test select * from scott.test;
commit;
insert into scott.test select * from scott.test;
commit;
insert into scott.test select * from scott.test;
commit; ? Get data_object_id for scott.test
SYS> col data_object_id for 9999999
col object_name for a15
select owner, data_object_id, object_name, object_id
from dba_objects
where owner = 'SCOTT'
and object_name = 'TEST'; OWNER DATA_OBJECT_ID OBJECT_NAME OBJECT_ID ―――――――――― ――――? ――――― ―――- SCOTT 74626 TEST 74626 ? Check the initial values of the parameters _gc_policy_minimum and _gc_policy_time ? Enter name of the parameter when prompted
SYS>
SET linesize 235
col Parameter FOR a20
col Instance FOR a10
col Description FOR a40 word_wrapped
SELECT a.ksppinm "Parameter",
c.ksppstvl "Instance",
a.ksppdesc "Description"
FROM x$ksppi a, x$ksppcv b, x$ksppsv c, v$parameter p
WHERE a.indx = b.indx AND a.indx = c.indx
AND p.name(+) = a.ksppinm
AND UPPER(a.ksppinm) LIKE UPPER('%¶meter%')
ORDER BY a.ksppinm;
Enter value for parameter: gc_policy
old 11: AND UPPER(a.ksppinm) LIKE UPPER('%¶meter%')
new 11: AND UPPER(a.ksppinm) LIKE UPPER('%gc_policy%') Parameter Instance Description ――――――? ―――- ―――――――――――――- _gc_policy_minimum 1500 dynamic object policy minimum activity per minute _gc_policy_time 10 how often to make object policy decisions in minutes ? Set _gc_policy_minimum and _gc_policy_time to very small values so that we can demonstrate remastering
SYS>alter system set "_gc_policy_minimum" = 10 scope=spfile;
alter system set "_gc_policy_time" = 1 scope=spfile; ? NODE1 ? shutdown the database and restart
[oracle@host01 ~]$ srvctl stop database -d racdb
srvctl start database -d racdb
srvctl status database -d racdb ? Check that parameter values have been changed to the minimum allowed by oracle although these values are not the ones we specified ? Enter name of the parameter when prompted
SYS>
SET linesize 235
col Parameter FOR a20
col Instance FOR a10
col Description FOR a40 word_wrapped
SELECT a.ksppinm "Parameter", c.ksppstvl "Instance", a.ksppdesc "Description"
FROM x$ksppi a, x$ksppcv b, x$ksppsv c, v$parameter p
WHERE a.indx = b.indx
AND a.indx = c.indx
AND p.name(+) = a.ksppinm
AND UPPER(a.ksppinm) LIKE UPPER('%¶meter%')
ORDER BY a.ksppinm;
old 11: AND UPPER(a.ksppinm) LIKE UPPER('%¶meter%')
new 11: AND UPPER(a.ksppinm) LIKE UPPER('%gc_policy%')
Enter value for parameter: gc_policy Parameter Instance Description ――――――? ―――- ―――――――――――――- _gc_policy_minimum 20 dynamic object policy minimum activity per minute _gc_policy_time 4 how often to make object policy decisions in minutes - Assign TEST to node1 manually ? Issue a select on scott.test from node1 ?
SYS@NODE1>oradebug lkdebug -m pkey 74626
SCOTT@NODE1>select * from scott.test; ? check the current master of scott.test ? ? Note that current master of scott.test is node1 (numbering starts from 0) ? Previous master = 2 (node3) ? REMASTER_CNT = 3 because while I was doing this demonstartion, remastering was initated 2 times earlier also.
SYS@NODE1>select o.object_name, m.CU