是否可以在沒有「數據庫郵件」的情況下在SQL Server Management Studio上擁有郵件配置文件?如何在Express Edition的SQL Server上設置郵件配置文件?
回答
Here是一個詳細介紹過程的博客。
以下是博客內容的粗略副本,以便將來可以解決此問題。
啓用數據庫郵件存儲的特效:
sp_configure 'show advanced options', 1; GO RECONFIGURE; GO sp_configure 'Database Mail XPs', 1; GO RECONFIGURE GO
與
sysmail_add_account_sp
創建sysmail帳號:EXECUTE msdb.dbo.sysmail_add_account_sp @account_name = 'MailTest', @description = 'Sent Mail using MSDB', @email_address = '[email protected]', @display_name = 'umashankar', @username='[email protected]', @password='password', @mailserver_name = 'mail.queryingsql.com'
與
sysmail_add_profile_sp
創建數據庫配置文件:EXECUTE msdb.dbo.sysmail_add_profile_sp @profile_name = 'MailTest', @description = 'Profile used to send mail'
帳戶的配置文件與
sysmail_add_profileaccount_sp
地圖:EXECUTE msdb.dbo.sysmail_add_profileaccount_sp @profile_name = 'MailTest', @account_name = 'MailTest', @sequence_number = 1
授予數據庫主體(數據庫用戶或角色)使用的數據庫配置文件:
EXECUTE msdb.dbo.sysmail_add_principalprofile_sp @profile_name = 'MailTest', @principal_name = 'public', @is_default = 1 ; --A principal_name of 'public' makes this profile a public profile, granting access to all principals in the database.
測試與
sp_send_dbmail
:exec msdb.dbo.sp_send_dbmail @profile_name = 'MailTest', @recipients = '[email protected]', @subject = 'Mail Test', @body = 'Mail Sent Successfully', @body_format = 'text'
您還應該查看每個存儲過程的MSDN文檔,以確保正確配置您的系統。
我是一名新秀,所以我現在不能將你的答案標記爲正確。 –
我假設你可以使用MSDB中存儲的特效進行設置。我沒有試過這個,但你可能想嘗試一下。
看...
sysmail_add_account_sp
...和它的相關存儲的特效。
謝謝你的建議 –
默認情況下,SQL Express沒有通過GUI嚮導支持數據庫郵件配置,儘管如此,也可以通過腳本來配置它。
這些detailed instructions指導你。
- 1. SQL Server Compact Edition中設置
- 2. 如何爲SQL Server 2012 Express生成配置文件?
- 3. SQL Server文件配置
- 4. sql server 2008 r2 express edition
- 5. Sql Server 2005 Express Edition問題
- 6. SQL Server Express和SQL Server Compact Edition
- 7. 的SQL Server 2008 Express Edition的文件大小限制的問題
- 8. Sql server的硬件配置
- 9. 如何在SQL Server中配置和運行數據庫郵件
- 10. 如何設置配置文件圖片
- 11. SQL Server Compact Edition和SQL Server Express Edition有什麼區別?
- 12. 如何設置配置文件的IPython
- 13. Windows Azure雲上的SQL Server 2012郵件設置vm
- 14. 如何將SQL Server 2005 Express Edition集成到Visual Web Developer 2008 Express Edition
- 15. 如何設置log4j配置文件
- 16. Tikiwiki如何設置「User_Tracker_Business」配置文件?
- 17. 如何在cakePHP的AppControoler中設置電子郵件配置?
- 18. 配置數據庫郵件設置
- 19. 郵件設置 - 基本配置
- 20. SQL Server Express Edition的規模有多大?
- 21. SQL Server Express Edition是免費的嗎?
- 22. Zend Framework:如何在配置文件中設置默認郵件傳輸?
- 23. 笨設置電子郵件從配置
- 24. 如何在環境配置文件外設置ActionMailer SMTP設置
- 25. 如何在cherrypy配置文件中設置靜態文件?
- 26. Android設置|(文件)配置
- 27. Joomla 1.7郵件設置配置
- 28. 爲sql作業配置電子郵件
- 29. 如何在ASP.NET 5中配置電子郵件設置?
- 30. 如何在cakephp中設置動態電子郵件配置
SQL Server Management Studio ***是***管理工具 - 所以這個問題什麼都不清楚..... –
Express版在管理文件夾中沒有「Database Mail」它清晰如日。 –