I am running transactional replication with a push transformable
subscription. I am running into a PK error. After researching the error I
have found two transactions tied to record in the subscription database. So I
use the following to determine which transaction is getting fired first.
select * from distribution.dbo.MSrepl_commands
where publisher_database_id = 29
and article_id = 30
and xact_seqno = 0x0000235000000EFA000100000000
This returns a list of 58 transactions with the command_id and the command.
But I am unable to determine what the command is because it is not readable.
If I use
distribution.dbo.Sp_browsereplcmds
it gives me the command but not the command_id (sequence number).
How can I determine what the sequence of transactions is and read the
command?
Thanks for your time. Mike
Mike,
the code in sp_browsereplcmds is not too difficult. You could create your
own custom script using this as a template, but which includes the
command_id.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
Showing posts with label ihave. Show all posts
Showing posts with label ihave. Show all posts
Tuesday, March 27, 2012
Thursday, March 22, 2012
Determin the order of triggers,
Hi all,
Can one determine the order of triggers, or set the order of triggers. I
have a two insert triggers, generally I would like one trigger to fire first
all the tme. Is this possible.
RobertYou can specify which trigger fires first (or last) using
sp_settriggerorder. See the Books Online for details.
Hope this helps.
Dan Guzman
SQL Server MVP
"Robert Bravery" <me@.u.com> wrote in message
news:%23nKBoCWMGHA.3408@.TK2MSFTNGP12.phx.gbl...
> Hi all,
> Can one determine the order of triggers, or set the order of triggers. I
> have a two insert triggers, generally I would like one trigger to fire
> first
> all the tme. Is this possible.
> Robert
>|||You can set the first and the last trigger, i you have less than three
that shouldn=B4t be the problem:
sp_settriggerorder=20
HTH, Jens Suessmeyer.|||Hi
u can decide the order of triggers by the help of a Stored Procedure named
'sp_settriggerorder'.The syntax is as follows:
exec sp_settriggerorder <triggername>,<order>,'<operation>'
For Example:
exec sp_settriggerorder trig_Customer,first,'Insert'.
For more Info,log on to
http://www.sqlservercentral.com/col...erswhatsnew.asp
--
Regards
Ashish Narang
AIM: ashishnarang02
YIM: ashish_jsn@.yahoo.com
Mobile: +919820625179
"Jens" wrote:
> You can set the first and the last trigger, i you have less than three
> that shouldn′t be the problem:
> sp_settriggerorder
> HTH, Jens Suessmeyer.
>|||Thanks to all, for helping and poinmting in the right direction
Robert
"Robert Bravery" <me@.u.com> wrote in message
news:%23nKBoCWMGHA.3408@.TK2MSFTNGP12.phx.gbl...
> Hi all,
> Can one determine the order of triggers, or set the order of triggers. I
> have a two insert triggers, generally I would like one trigger to fire
first
> all the tme. Is this possible.
> Robert
>
Can one determine the order of triggers, or set the order of triggers. I
have a two insert triggers, generally I would like one trigger to fire first
all the tme. Is this possible.
RobertYou can specify which trigger fires first (or last) using
sp_settriggerorder. See the Books Online for details.
Hope this helps.
Dan Guzman
SQL Server MVP
"Robert Bravery" <me@.u.com> wrote in message
news:%23nKBoCWMGHA.3408@.TK2MSFTNGP12.phx.gbl...
> Hi all,
> Can one determine the order of triggers, or set the order of triggers. I
> have a two insert triggers, generally I would like one trigger to fire
> first
> all the tme. Is this possible.
> Robert
>|||You can set the first and the last trigger, i you have less than three
that shouldn=B4t be the problem:
sp_settriggerorder=20
HTH, Jens Suessmeyer.|||Hi
u can decide the order of triggers by the help of a Stored Procedure named
'sp_settriggerorder'.The syntax is as follows:
exec sp_settriggerorder <triggername>,<order>,'<operation>'
For Example:
exec sp_settriggerorder trig_Customer,first,'Insert'.
For more Info,log on to
http://www.sqlservercentral.com/col...erswhatsnew.asp
--
Regards
Ashish Narang
AIM: ashishnarang02
YIM: ashish_jsn@.yahoo.com
Mobile: +919820625179
"Jens" wrote:
> You can set the first and the last trigger, i you have less than three
> that shouldn′t be the problem:
> sp_settriggerorder
> HTH, Jens Suessmeyer.
>|||Thanks to all, for helping and poinmting in the right direction
Robert
"Robert Bravery" <me@.u.com> wrote in message
news:%23nKBoCWMGHA.3408@.TK2MSFTNGP12.phx.gbl...
> Hi all,
> Can one determine the order of triggers, or set the order of triggers. I
> have a two insert triggers, generally I would like one trigger to fire
first
> all the tme. Is this possible.
> Robert
>
Subscribe to:
Posts (Atom)