Hi
I have created profiles in my database as mentioned below. now i want to delete the profile created in database.
can some one tell me how to proceed furthur.
i need to delete them permenantly.
EXECUTE msdb.dbo.sysmail_add_account_sp @.account_name = 'MyMailAccount', @.description = 'Mail account for Database Mail', @.email_address = 'makclaire@.optonline.net', @.display_name = 'MyAccount', @.username='makclaire@.optonline.net', @.password='abc123', @.mailserver_name = 'mail.optonline.net' --EXECUTE msdb.dbo.sysmail_add_profile_sp @.profile_name = 'MyMailProfile', @.description = 'Profile used for database mail' --EXECUTE msdb.dbo.sysmail_add_profileaccount_sp @.profile_name = 'MyMailProfile', @.account_name = 'MyMailAccount', @.sequence_number = 1
-
EXECUTE msdb.dbo.sysmail_add_principalprofile_sp @.profile_name = 'MyMailProfile', @.principal_name = 'public', @.is_default = 1 ; Regardskrishnarefer the below link which contains the list of stored procedures in database mail,
http://msdn2.microsoft.com/en-us/library/ms177580.aspx
i think you can make use of sysmail_delete_profile_sp stored procedure........
sysmail_delete_profile_sp { [ @.profile_id = ] profile_id | [
@.profile_name = ] 'profile_name' }
[, [ @.force_delete = ] force_delete ]
|||
Hi Deepak,
Thanks for the reply,
how do i configure email notification in SQL 2005 server, so that i get notification on two different mail id,s
ex:
krishna@.abc.com and krishna@.abchelp.com
regards
krishna
|||you can make use of,
EXEC msdb.dbo.sp_send_dbmail
@.profile_name = 'AdventureWorks Administrator',
@.recipients = 'danw@.Adventure-Works.com',
@.body = 'The stored procedure finished successfully.',
@.subject = 'Automated Success Message' ;
if you want to mail multiple receipients just use semicolon in the
@.receipients='krishna@.abc.com' ;'krishna@.abchelp.com'
refer the below link for further assistance,
http://msdn2.microsoft.com/en-us/library/ms190307.aspx
No comments:
Post a Comment