Hi ,
We have a use case where an ASE database is setup in a Warm Standby using SAP Sybase Replication Server
- Primary : “PDS.mydb”
- Standby : “RDS.mydb”
- A stored procedure “mydb..myTest_sp” uses the following SELECT statement
select @myLogId = reserve_identity( 'mydb..myLog', 1 )
- The procedure also inserts a row into another base table eg. “mydb..myAppTab” using @myLogId as one of the values.
Result ( in a standard Warm Standby setup )
- After execution of the stored procedure, Only logged transactions ( DMLs ) are replicated
- The effect of the above SELECT calling function “reserve_identity” is not replicated
- From ISQL prompt following query reports current value @PDS.mydb and older value @RDS.mydb
select next_identity('mydb..myLog')
Table DDL:
create table myLog (
myLog_Id numeric(20,0) identity
)
Question:
- Using “sp_setrepproc” to replicate the stored procedure “mydb..myTest_sp” replicates execution of the stored procedure @RDS.mydb
- Is this the best method to replicate the usage ofSELECT “reserve_identity” inside the stored procedure ?
Thanks & Regards
Shiva