Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: convert regular snapshots to snapshot groups
"NetComrade" <andreyNSPAM_at_bookexchange.net> wrote in message
news:3d3c3e91.425414403_at_news.globix.com...
> I haven't taken advantage of what snapshot groups have to offer, and
> would like to covert my current snapshots to snapshot groups, w/o
> rebuilding snapshots from scratch. Some of my snapshots are
> incremental (fast) some are full (mostly small tables).
>
> From what I can see so far from the docs, the procedure should be
> something like
>
> --create 'refresh group' via DBMS_REFRESH.MAKE
> --associate my snapshots via DBMS_REFRESH.ADD w/ the snapshot group
> --DBMS_REPCAT.CREATE_SNAPSHOT_REPOBJECT seems unnecessary if snapshots
> have already been built (plus i highly doubt the usefullness of this
> proc since it takes snapshot creation DDL as an arguement and executes
> it)
>
>
> If anybody ever done it, any advice is appreciated.
>
> Thanx.
> .......
> We use Oracle 8.1.7.3 on Solaris 2.7 boxes
> remove NSPAM to email
NetComrade:
I'll try. This is a fairly lengthy post, since there doesn't seem to be much discussion on replication.
If you're only doing 'simple' replication; i.e one-way read-only from master site to snapshot site(s) then as far as I'm aware this is what you need to do:
You can use DBMS_REFRESH.ADD to add new members (snapshots) to an existing group at any subsequent time as and when the need arises, or indeed you could create an empty refresh group as a start, then add the members one by one if you prefer. It doesn't make a lot of difference.
6 to 8 are suggestions:
6) At this point review xxx_JOBS and (as the snapshot owner) delete any database JOBS which Oracle may or may not have created for you: begin DBMS_JOB.REMOVE(job_id); commit; end;
7) Create a table to act as a log, and a procedure something like:
create or replace procedure my_job as
v_errmsg varchar2(500);
begin
dbms_refresh('MY_GROUP');
insert into my_log values ('My Job','Completed successfully', sysdate);
commit;
exception
when others then
v_errmsg := substr(sqlerrm, 1, 500); insert into my_log values ('My Job',v_errmsg, sysdate); commit;
8) Submit a DBMS_JOB to run MY_JOB at the intervals required
That's it. If you're only doing the kind of replication I allude to, then as far as I'm aware you don't need any of the DBMS_REPCAT stuff.
Hope this helps, and if anyone can suggest improvements, suggestions would be welcome.
Regards,
Paul
Received on Mon Jul 22 2002 - 14:12:05 CDT
![]() |
![]() |