Startup error | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Startup error

DBA’s When my SQL Server agent starts, I always come across these 2 errors: 1. [298] SQLServer Error: 2812, Could not find stored procedure ‘msdb.dbo.xp_sqlagent_notify’. [SQLSTATE 42000] (DisableAgentXPs) 2. [364] The Messenger service has not been started – NetSend notifications will not be sent Why are these errors caused and will this affect the functionality of SQL Server in any manner? Thanks
Satya

First one is the error and the second one is the warning… Check the following… as per the following thread it is bug and fixed in SP2…
http://groups.google.com/group/micr…o.xp_sqlagent_notify’&rnum=1#80331ad74dee5730 Agent can send the alert to an operator through NET SEND, which uses the Messenger service.
If the service isn’t running/started, then Agent will write this message…
You can change the messenger service to start automatically if it is configured start manually…
MohammedU.
Moderator
SQL-Server-Performance.com
Thanks Mohammed I have one more question though it is not related to the thread. Is there a way to fetch the current login name through T-SQL? I know that we can fetch spid , but can we feetch login name? Thanks
Satya
Are you looking for these functions?
select system_user, SUSER_SNAME ()
MohammedU.
Moderator
SQL-Server-Performance.com
My main intention was to get the group name rather than only the user name. In one of the applications we had to extract the current user name and the group he belongs to. It can done via application code using some class I guess, but I was wondering if we could get anything from SQL code.
I didn’t get you? What do you mean by group name?
Can you give an example? MohammedU.
Moderator
SQL-Server-Performance.com
Read about "Security Functions" in BOL… I belive IS_SRVROLEMEMBER or is_member will solve your problem Madhu

Mohammed A developer told me that he had to get the current username and the group which he belongs to in his application code. I am not familiar with the front end application code but he just wanted to find out if there was any T-SQL code to extract that info, I guess this should be clear, anyway I guess it is not really a DBA’s work because it can be done more easily using the application code. It just uses some class name to extract that info. Thanks
Satya
Is this the SQL/Windows authentication question again?
I am not sure what question you are referring to.
Situation where client application was connecting through SQL authentication, and question was how to get Windows user name in stored procedure. Short answer was to use Windows authentication.
No We are not at all using SQL authentication
I don’t get it…
Check BOL topic "System Functions (Transact-SQL" for all system functions…
MohammedU.
Moderator
SQL-Server-Performance.com
]]>