Source=Microsoft OLE DB Provider for ODBC Drivers. Msg= Error: -2147217871.
Msg: IDispatch error #3121. Description: [Microsoft][ODBC SQL Server
Driver]Timeout expired
Thanks
--billg
This is not SQL Server timing out, but your host application. But I
wouldn't, ever, advise anyone to use a trigger that in turn uses
xp_cmdshell. It's WAY too slow to be involved in a trigger. Remember that
until the trigger is finished, all locks for the initial statement are held
fast. This affects concurrency and performance.
Anyway, if you really want to use this, make sure that you set the timeout
to a large enough value in your host application.
--
Andrés Taylor
visit me @
http://www.sql.nu/
"Bill Gauvey" <bga...@alltel.net> wrote in message
news:uaFZ1d#MCHA.1996@tkmsftngp12...
"Bill Gauvey" <bga...@alltel.net> wrote in message
news:uaFZ1d#MCHA.1996@tkmsftngp12...
A trigger always executes in the context of a transaction and the
external process runs on a different connection. This causes an
undetected deadlock if the external process tries to access modified
data.
A workaround, which I'm not recommending, is to specify READ UNCOMMITTED
or NOLOCK hint. A better option is to have the trigger insert the
updated data into a separate table. You can schedule a separate process
via a SQL Agent job to process data from that table.
Hope this helps.
Dan Guzman
SQL Server MVP
-----------------------
SQL FAQ links (courtesy Neil Pike):
http://www.ntfaq.com/Articles/Index.cfm?DepartmentID=800
http://www.sqlserverfaq.com
http://www.mssqlserver.com/faq
-----------------------
"Bill Gauvey" <bga...@alltel.net> wrote in message
news:uaFZ1d#MCHA.1996@tkmsftngp12...
"Andrés Taylor" <and...@rotselleri.com> wrote in message
news:O3Kmpm#MCHA.1936@tkmsftngp12...
here is the trigger code.
CREATE TRIGGER update_shipping_info ON dbo.ShippingInfo
FOR UPDATE
AS
DECLARE @@order CHAR(12),
@@suffix CHAR(1),
@@cmd VARCHAR(255)
SELECT @@order= acxiom_order_number, @@suffix = suffix_code FROM inserted
IF @@suffix = NULL SELECT @@suffix = '_'
IF @@suffix = ' ' SELECT @@suffix = '_'
SELECT @@cmd = 'D:\MTSShare\MKS\bin\PostShipInfo.exe ' + RTrim(@@order) + '
' + RTrim(@@suffix)
EXECUTE master..xp_cmdshell @@cmd, NO_OUTPUT
"Sunil" <sunil_...@yahoo.com> wrote in message
news:eGqNX0#MCHA.1620@tkmsftngp10...
IF @@suffix is NULL SELECT @@suffix = '_'
IF @@suffix is ' ' SELECT @@suffix = '_'
"Bill Gauvey" <bga...@alltel.net> wrote in message
news:uagmd7#MCHA.2492@tkmsftngp12...
"Bill Gauvey" <bga...@alltel.net> wrote in message
news:uagmd7#MCHA.2492@tkmsftngp12...
"Sunil" <sunil_...@yahoo.com> wrote in message
news:#JOkuE$MCHA.2492@tkmsftngp12...
Thanks
"Dan Guzman" <dang...@nospam-earthlink.net> wrote in message
news:ON4wp4#MCHA.2096@tkmsftngp12...
CREATE TRIGGER update_shipping_info ON dbo.ShippingInfo
FOR UPDATE
AS
DECLARE @@order CHAR(12),
@@suffix CHAR(1),
@@cmd VARCHAR(255)
SELECT @@order= acxiom_order_number, @@suffix = suffix_code FROM inserted
IF @@suffix = NULL SELECT @@suffix = '_'
IF @@suffix = ' ' SELECT @@suffix = '_'
SELECT @@cmd = 'D:\MTSShare\MKS\bin\PostShipInfo.exe ' + RTrim(@@order) + '
' + RTrim(@@suffix)
INSERT TEMP_FOR_DEBUG VALUES (@@cmd)
--EXECUTE master..xp_cmdshell @@cmd, NO_OUTPUT
GO
--****************************************************
The idea is - instead of executing something - you will have what are you
trying to execute in debug table.
HTH.
Mikhail Berlyant
Data Integrator, Data Systems
Launch Your Yahoo!Music Experience http://launch.yahoo.com
Brainbench MVP for Visual Basic www.brainbench.com
"Bill" <bga...@acxiom.com> wrote in message
news:O7roJY$MCHA.2320@tkmsftngp11...
Have you tried executing sp_who or sp_who2 to see if this is the case?
If you do observe blocking, please re-read my response.
Hope this helps.
Dan Guzman
SQL Server MVP
-----------------------
SQL FAQ links (courtesy Neil Pike):
http://www.ntfaq.com/Articles/Index.cfm?DepartmentID=800
http://www.sqlserverfaq.com
http://www.mssqlserver.com/faq
-----------------------
"Bill" <bga...@acxiom.com> wrote in message
news:#m8JqY$MCHA.2368@tkmsftngp10...
Regards
Roman Tumaykin
"Bill Gauvey" <bga...@alltel.net> wrote in message
news:e#lsQ6#MCHA.2492@tkmsftngp10...