Enabling replication with owner_on status

NoteRefer to your Replication Agent documentation to see if your non-Sybase data server allows user tables with the same name but different owners.

User tables may have the same name but different owners. Adaptive Server allows you to mark a table for replication and specify that table owner information should be considered when identifying the table.

To mark the table for replication with the “owner on” status, log in to Adaptive Server and enter:

sp_setreptable table_name, 'true', owner_on

At the Replication Server, the replication definition for the table must identify the table owner. For example, if you set owner status for a table to “owner on” with sp_setreptable, you must include an owner name when you create the replication definition or Replication Server will be unable to find the correct table at the replicate database.

The owner of the source table and the owner of the destination table can be different.

NoteIf you specify “owner off” status for a table, Replication Server does not send table owner information to the replicate site. However, if you are replicating to a standby database, Replication Server sends “dbo” as the table owner.

Modifying the owner status of a table

You can change the owner status of a table previously marked for replication by using the sp_setrepdefmode system procedure.

To change the status of a table already marked for replication to “owner on,” log in to Adaptive Server and enter:

sp_setrepdefmode table_name, owner_on

To change the status of a table already marked for replication to “owner off,” log in to Adaptive Server and enter:

sp_setrepdefmode table_name, owner_off

You must reflect a change in owner status by including owner information in the replication definition. Use create replication definition at the Replication Server to create a new replication definition that includes the table owner.

Checking the owner status of a table

To check the owner status of a table, enter:

sp_setreptable table_name