June 6, 2006 at 10:15 am
Hi All,
I have configured my SQL Mail correctly...i guess.
After all, i have sent a simple E-Mail to me and i have recieved normally. When i try to send an E-Mail with query, the SQL returned
the error:
ODBC error 2812 (42000) Could not find stored procedure 'sp_setuserbylogin'.
That's the query:
EXEC master.dbo.xp_sendmail @recipients = 'user...',
@query = 'SELECT * FROM table'
, @dbuse= 'Database',
@subject = 'Test',
@message = 'Tests:',
@attach_results = 'TRUE', @width = 250
Any ideas?
Tks
Fabiano
June 6, 2006 at 10:42 am
It should be in your master database under "Extended Stored Procedures" in Enterprise Manager, and I'm pretty sure it should have EXEC privileges set to public.
Can you ensure that it is there, and that its privileges are set correctly?
June 6, 2006 at 10:48 am
Hi David, thanks
Well, the exec privilege wasnt set. I have already set exec privilege to public but still not working.
I dont know but i'm connect in QA with the user "sa". Is it the problem?
Tks
Fabiano
June 6, 2006 at 10:54 am
Are you running this from Query Analyzer, or from an app?
I'm a bit confused as to why SQL isn't finding the procedure, unless there was perhaps something like a service pack install gone wrong, etc. Try the following line and see if it finds it, and where. It should show (server internal):
sp_helpextendedproc sp_setuserbylogin
June 6, 2006 at 10:57 am
David,
see:
Server: Msg 15019, Level 16, State 1, Procedure sp_helpextendedproc, Line 23
The extended stored procedure 'sp_setuserbylogin' does not exist.
June 6, 2006 at 11:08 am
David,
Seaching in the google, i found that this Extended Stored Procedure is in the Service Pack 4, but i did:
select @@version and i see that my server is with SP4.
I dont know!
tks
June 6, 2006 at 11:09 am
Well, that's a bit problematic.
Are you the dba, and have you had any problems during service pack installs? Is the box one that you could reapply a service pack to, or is it some locked down production box?
There is one other option (adding it ourselves) but that's scary.
June 6, 2006 at 11:14 am
Well, i dont know. I did not see the instalation.
I see that i dont have many options. I have to add it myself.
I have seen some examples but i dont know where i can get it.
June 6, 2006 at 11:28 am
Before you go further, if you're not the dba, you really should have them involved, as the possible fixes change system tables.
If it were my box, I'd reapply the service pack before trying anything else, as the other options require changes to the system tables in a non-supported manner.
June 6, 2006 at 11:32 am
Hi David,
Thank you very much.
[]s
Fabiano
Viewing 10 posts - 1 through 9 (of 9 total)
You must be logged in to reply to this topic. Login to reply