all groups > sql server replication > august 2007 >
You're in the

sql server replication

group:

stored proc in replication


stored proc in replication pardhiveswar via SQLMonster.com
8/14/2007 9:55:09 PM
sql server replication: Urgent pls,

When we configure SQL to SQL Transactional replication along with the table
creation at the destination it also creates 3 storedprocedures.
Example
Replicate table Employee, in the sch file or script file it will have script
related to create table and create procedure sp_msins_employee
sp_msupd_employee, sp_msdel_employee
When we select heterogeneous option to push data to oracle it generates sql
statements such as insert , delete and update. Here in oracle stored
procedures are not created.
Is there any way we can able to invoke stored procedures for pushing data
instead of insert , delete and update statements.
Oracle sometimes when it gets delete, update is not using the plan. Everytime
it is creating a plan when the parameter is changed.
Example
Delete from employee where employeeid = 1234
Delete from employee where employeeid = 5555
When the parameter value changes its looking for a new plan…for stored
procedures it will have the plan so if the value changes it can still use the
plan.
Deletes or updates on certain tables can be in 1000’s

Is there any way we can able to create procedures in oracle and called by
sending the parameter values.

Note: Replication pushes huge amount of data to oracle.

Thanks,
pardhi

--
Message posted via http://www.sqlmonster.com
RE: stored proc in replication Paul Ibison
8/15/2007 4:12:01 AM
Have a look at sp_addarticle. You have the parameters for @upd_cmd = etc
which can take "CALL custom_stored_procedure_name". This way you could create
the procs yourself in advance:
http://msdn2.microsoft.com/en-us/library/ms173857.aspx
HTH,
Paul Ibison
AddThis Social Bookmark Button