cancel
Showing results for 
Search instead for 
Did you mean: 

Oracle to EDB migration using XDB

Adventurer

Re: Oracle to EDB migration using XDB

Hi

Just to add on this,

the iseq$$  is a sequence which gets automatically  created in the background when a table is created with an identity column feature of oracle.

e.g

CREATE TABLE identity_demo (
    id NUMBER GENERATED ALWAYS AS IDENTITY,
    description VARCHAR2(100) NOT NULL
);
 
from the above table creation a sequence will be created automatically in the background for id column and automatically inserts the the id whenever a description is  inserted into the table.
We normaly use identity column feature for columns such as id for generating unique values for primary keys.
I am having an issue  with regard to this type of a sequence during the xdb subscription creation.
 

 

Adventurer

Re: Oracle to EDB migration using XDB

I have attached the screenshots with the sequence issue belowsequence_issue_1.PNGsequence_issue_2.PNG

EDB Team Member

Re: Oracle to EDB migration using XDB

Hi,

 

Sequences (database objects created by the CREATE SEQUENCE statement) are not replicated from the publication database to the subscription databases in a single-master replication system.

 

You need to manually create the sequence in the subscription database and then perform a synchronize.

Adventurer

Re: Oracle to EDB migration using XDB

Hi Robit,

Thanks for the response.Yes I have noticed the sequence do not get created but if you are having sequences which get created through  oracle identity columns you are going to run into problems.

 

I just have this 3 questions,

1. for sequences, if the sequece has been created manually on the subscriber,does it stay in sync with the sequence on the publisher during synchronization? ie if the  sequence's next value increment on the publisher will  the sequence on the subscriber next value also change on the subscriber after synchronization?  Do i have to create the sequence using the same name as 

2. I have noticed triggers to do not get copied across too,do  i need to create the triggers manually as well.what happens to the triggers during synchronization? will the fire? my understanding is that they should not fire.

 

3. Foreign keys do not get copied accross too? what must happen to the foreign keys ? When do i create them on the subscriber?

 

I will be happy to get clarity on this

 

Regards,

Justice

 

EDB Team Member

Re: Oracle to EDB migration using XDB

Hi Justice,

 

Please refer below in-line comments for your raised concerns.

 

1. for sequences, if the sequece has been created manually on the subscriber,does it stay in sync with the sequence on the publisher during synchronization? ie if the sequence's next value increment on the publisher will the sequence on the subscriber next value also change on the subscriber after synchronization? Do i have to create the sequence using the same name as
>> Sequences (database objects created by the CREATE SEQUENCE statement) are not replicated from the publication database to the subscription databases in a single-master replication system.

>> Sequence's next value increment on the publisher will not change on subscriber after synchronization.

 

2. I have noticed triggers to do not get copied across too, do I need to create the triggers manually as well.what happens to the triggers during synchronization? will the fire? my understanding is that they should not fire.
>> Any change you want to see on the subscriber needs to be done on the publisher. All the changes made by triggers on the publisher will get replicated over to the subscriber.
>> If triggers are created on subscriber and changes are made due to them, they are not propagated back to the publication. If changes are made to the subscription table rows, it is fairly likely that the rows will no longer match their publication counterparts.

 

3. Foreign keys do not get copied accross too? what must happen to the foreign keys ? When do i create them on the subscriber?
>> Foreign key constraints are not replicated by the publication or subscription server in a single-master replication system.

 

Go through  'Restrictions on Replicated Database Objects'  for more details.