Home » Server Options » Streams & AQ » Getting right SCN to start streams after imp (Oracle EE 10.2, Linux x64)
Getting right SCN to start streams after imp [message #544992] Sun, 26 February 2012 02:47 Go to next message
garther
Messages: 4
Registered: April 2009
Location: Poland
Junior Member

Hi

I have a streams configuration that's working perfectly well but I have one problem with starting it on production env.

I did exp on production database and imported it on target database.

While starting streams on target database I'm using following code:

DECLARE
  iscn  NUMBER;         -- Variable to hold instantiation SCN value
BEGIN
  iscn := DBMS_FLASHBACK.GET_SYSTEM_CHANGE_NUMBER@DB.PROD;
  DBMS_APPLY_ADM.SET_SCHEMA_INSTANTIATION_SCN(
    source_schema_name    => 'STREAMS_SCHEMA',
    source_database_name  => 'DB.PROD',
    instantiation_scn     => iscn,
    apply_database_link   => null,
    recursive             => true);
END;


But this way after starting capture and apply I do have a gap between the time of export and the time of configuring and starting streams.

How should I set SCN to start the replication so there is no gap?

Thanks for any ideas...


Re: Getting right SCN to start streams after imp [message #544994 is a reply to message #544992] Sun, 26 February 2012 03:53 Go to previous messageGo to next message
John Watson
Messages: 8922
Registered: January 2010
Location: Global Village
Senior Member
Your instantiation SCN should be set to the SCN at the time of the export. And you'll have to adjust the capture as well.
Is there a reason why you are not using the dbms_streams_adm.maintain_schemas procedure? I find it much easier to use.
Re: Getting right SCN to start streams after imp [message #544997 is a reply to message #544994] Sun, 26 February 2012 04:12 Go to previous message
garther
Messages: 4
Registered: April 2009
Location: Poland
Junior Member

Hi
I'm not familiar with this method but I will look into it.

Thanks
Previous Topic: what is right point in time restore procedure
Next Topic: What is the difference between Streams and Streams AQ?
Goto Forum:
  


Current Time: Thu Mar 28 07:19:35 CDT 2024