SQL Server Performance Forum – Threads Archive
Wantan netsend alert when a user logins 2 DB urgnthi i have a DB server and i just want an alert when an user logins to the DB through a job definition i have made an operator for net send but i just want a script which i can define a job
pls help me !!!
You can define a job from Enterprise manager –> Management and goto Jobs, there you create a new job and alongwith this notification alert. HTH Satya SKJ
but i got your piont i can create job but where to find what the job will do i mean i want an alert when a predifines user logs into database and if different user logins with same login i want that an alert should fire as a net send i want the script how can i do that? and if i create a job what should i define in the job?
I believe you cannot do that by means of any script or trigger. May be third party tools like ENTEGRA from lumigent will help you to Audit the events on database by any process/user. HTH Satya SKJ
Let me see if I understand. You want to be alerted if a particular user logs on. Also, you want to be alerted if different users logon with the same logon ID? Is this correct? I have not done this before, but I think it might be possible, although I am not sure my solution will work, or if there might be better ways. What you might be able to do is to use the sp_who or the sp_who2 command, and from a job that runs periodically, run this command, and then parse the results, looking for the information you want. Then, at that time, you can use sp_sendmail to send you a message about what it found. This doesn’t sound very elegant, and I bet there are better ways, but off the top of my head, I can’t think of any. Anyone have any other suggestions. Another option might be to use the Profiler extend procedures to grab logon information and then write a program to parse the data and send you a message. Or, as satya has suggested, you might be able to use a third party program from www.lumigent.com.
Brad M. McGehee
I recokon similar reply in the other forum too, and I agree with Brad to see get it worked.
Sometimes things need to do on other way. Satya SKJ