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 |
Starlet_GT
Yak Posting Veteran
81 Posts |
Posted - 2013-02-25 : 00:56:43
|
Hi,I have a sql server 2008R2, i have provided a login someone within a domain with write-only access, now I want to trigger a sql server agent job whenever a "insert into" query sucessfully executed by that login.please help in this regard. |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2013-02-25 : 01:05:52
|
do you mean you need to do trigger action only for specified login?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
Starlet_GT
Yak Posting Veteran
81 Posts |
Posted - 2013-02-25 : 01:20:26
|
YesHow to do it in SQL Server 2008, if you have any example then it will be appriciated. |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2013-02-25 : 02:01:48
|
nope. you can do thathowever what you can do instead is to add a trigger and do a check inside to see if login is your required login and then do corresponding actions.------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
Starlet_GT
Yak Posting Veteran
81 Posts |
Posted - 2013-02-25 : 02:03:58
|
I have created a trigger but the insert command is not working when trigger is active ... unable to figure it out why it is happening.Any one please help, i am new in triggers. |
|
|
Starlet_GT
Yak Posting Veteran
81 Posts |
Posted - 2013-02-25 : 02:16:15
|
Following are the lines if i modify the trigger, if this is active than the insert into command is not working.USE [DB NAME]GO/****** Object: Trigger [dbo].[SMSC] Script Date: 02/25/2013 12:11:51 ******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOALTER TRIGGER [dbo].[DB NAME] ON [dbo].[tABLE NAME] AFTER INSERTAS BEGINEND |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2013-02-25 : 04:10:12
|
what is active? didnt get that part.i cant see any insert into command also------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
|
|
|