August 20, 2008 at 10:36 am
Testing our soon to be new production and getting this errror..
Msg 515, Level 16, State 2, Procedure sp_validate_user, Line 19
Cannot insert the value NULL into column 'permission path', table '@temp'; column does not allow nulls. INSERT fails.
The statement has been terminated.
Msg 14636, Level 16, State 1, Procedure sp_send_dbmail, Line 107
No global profile is configured. Specify a profile name in the @profile_name parameter.
When running this code...
exec MSdb.dbo.sp_Send_DBmail
@recipients = 'User',
@subject = 'This is a test '
I do have a profile set up in DBMail. Any ideas?
¤ §unshine ¤
August 20, 2008 at 12:08 pm
To set up a global or default profile go to Database Mail -> Right-click -> Configure Database Mail. Select "Manage profile security" and on either the public or Private profiles tab select the Profile you want and set the Default Profile property to Yes. Now whenever you do not provide the @profile_name parameter this profile will be used.
Or
You can just supply the @profile_name parameter with your profile name.
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
August 20, 2008 at 12:16 pm
Awesome! thanks!
I run it now, but I get the message
Mail queued.
But not actually received.
¤ §unshine ¤
August 20, 2008 at 5:07 pm
is your smtp server setup correctly? does the smtp server allow your ip address to be a relay?
look up dbmail setup in BOL to see the status of those queued email.
-----------------------------
www.cbtr.net
.: SQL Backup Admin Tool[/url] :.
August 20, 2008 at 6:25 pm
From BOL:
Diagnosing the Problem
The Database Mail external program logs e-mail activity in the msdb database.
First, use the SQL Server Surface Area Configurationutility to confirm that Database Mail is enabled.
Then execute the following statement in the msdb database to check the status of the mail queue:
Copy Code
sysmail_help_queue_sp @queue_type = 'Mail' ;
You need to have Service Broker enabled in msdb in order for mail to work. You can check that by running:
Select
is_broker_enabled
From
sys.databases
Where
name = 'msdb'
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
August 21, 2008 at 7:20 am
IT seesm as we have to put the full email address, where in sql 200 we did not. That worked and still sent the mail queued message, but just putting in the user name like before does not work.
SB is enabled on both, and the results for the sysmail_help_queue_sp is
node2
mail0INACTIVE2008-08-20 20:56:30.3432008-08-20 20:35:16.463
and node 1
mail0INACTIVE2008-08-20 21:53:32.4372008-08-20 21:42:28.893
¤ §unshine ¤
August 21, 2008 at 7:27 am
That would make sense since Database Mail is smtp and SQL Mail used MAPI and was connected to your Exchange Server using Outlook.
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply