Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Command line T-SQL MSSQL

Status
Not open for further replies.

jpillonel

Programmer
Dec 17, 2003
61
CH
Hi,

I create a trigger for an builtin application.

The problem is that the application is maintaining cache from the frontend and the database. So after my trigger is completed I have to run a windows command line to clear the cache.

Does anyone how to run a command line in t-sql script on mssql 2000 and windows 2003 ? Is that possible to run something like @@c:\windows\update.exe ???

Thanks for your help !!
 
yes, use the xp_cmdshell system proc.
i.e.
xp_cmdshell "C:\windows\update.exe"

"I'm living so far beyond my income that we may almost be said to be living apart
 
Thanks works fine... but...

Did you know how to run this command line just after this trigger ???

trigger:
on ahd.act_log
for insert
as update call_req
set call_req.urgency='1'
from call_req, act_log
where act_log.call_req_id=call_req.persid
and act_log.type='CB'

Command line:
xp_cmdshell "c:\program files\CA\Unicenter ServicePlus Service Desk\bin\pdm_cache_refresh -t Call_Req"

Did you have an idea ????

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top