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 |
|
tmatkey
Starting Member
2 Posts |
Posted - 2005-04-18 : 09:49:44
|
| Hi,I'm trying to create a trigger on a table and can't get it to work. We have a phone system that inserts entries into a call DB at the completion of every inbound or outbound call. I want to add an INSERT TRIGGER that will copy some of the inserted data into another table in another database. When I set it up, not only does the trigger not work, but the table in the call DB with the new trigger stops accepting new entries--the inserts fail.The contents of the trigger doesn't seem to matter, it's very simple and straightfoward SQL stuff: FOR INSERT AS INSERT... SELECT FROM INSERTED.... However, if I replace the insert statement inside the trigger with a call to XP_SENDMAIL or just do a SELECT, the trigger works fine and the call DB table accepts new entries.Also, if I write an insert statement in query analyzer to add an entry to the call DB, the trigger works fine.I'm stumped here. Anyone have any ideas? Am I explaining the problem clearly enough?Thanks!Tony |
|
|
TG
Master Smack Fu Yak Hacker
6065 Posts |
Posted - 2005-04-18 : 11:28:26
|
| if you can insert to the table that has the trigger from QA but you can't from application, sounds like the account that the application runs under doesn't have appropriate db permissions to write the table that the trigger is writing to.try connecting to QA with the same account that the application uses and see if you still can successfully insert to the table.Be One with the OptimizerTG |
 |
|
|
tmatkey
Starting Member
2 Posts |
Posted - 2005-04-19 : 17:16:36
|
| Thanks! Permissions was the problem. |
 |
|
|
|
|
|