Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2005-08-24 : 07:38:42
|
ser dem writes "Hi.i made a program in visual basic. this program transfer the datas from sql server to another database(access or again sql server). I try the program manually and it is working. but I want to execute this exe file by using trigger. when the table updated I want sqlserver to execute this vb program. I wrote a trigger like this.CREATE TRIGGER [stokguncelle] ON [dbo].[Stok] FOR INSERT, UPDATE, DELETE ASexec master..xp_cmdshell 'c:\sqlbaglanti\guncelle.exe'this trigger is working fine when the program(guncelle.exe) and database are on the same computer with the database which I want to transfer the data from. but I have to transfer data from that computer to another on the network. but when I try to do this it is not successful. is there another usage of the "exec master..xp_cmdshell" command for the network. Please help me..." |
|
Thrasymachus
Constraint Violating Yak Guru
483 Posts |
Posted - 2005-08-24 : 08:37:16
|
It gives me the willies whenever programs are fired from sql through the command shell in a program.Have you checked the windows event viewer or the sql error log?I have my suspicion that the account context that the trigger executes from does not have permissions on the remote machines. Please make sure your .exe exits properly especially in the case of error or failure.I would do this with linked servers or DTS instead. Lower liklihood of something going wrong.====================================================Regards,Sean RoussyThank you, drive through |
|
|
|
|
|