SQL Server 2005: Difference between SQL mail and DB mail - sql-server-2005

Ok. I know SQL Mail is less secure and old, but what are the real advantages and differences between the two?
I read this article, which is pretty straight forward, but I was hoping to get someone to tell me why (if any) would you want to use SQL mail? Is it really out dated?
Thanks

Benefits of Database Mail over SQL Mail
Database Mail has the option of limiting file sizes to prevent sending large attachments
Database Mail can be configured with multiple SMTP accounts and with multiple profiles
No impact on the database performance, the mailing process is external
Having access to the mail history
Database mail :
Based on SMTP (Simple Mail Transfer Protocol).
Introduced in Sql 2005.
No need to install Outlook.
Depend on Service Broker service.
More secure than Sqlmail.
SQLMail
Based on MAPI (Messaging Application Programming Interface).
Used prior versions of Sql server 2005.
Require Outlook to be installed.
Leass secure than Database mail.
Link :
Database Mail
database-mail-vs-sql-mail

Related

SQL Database Mail Not Working - But I can send email on same server using VBscript CDO

I have searched everywhere (it feels) for a solution and / or guidance. My last resort is to ask. I have SQL Server 2016 running on a Windows Server. Database mail is not working. I have setup the profile and have submitted a test email by right clicking on the Database Mail node in the SSMS left window.
The email is in an 'unsent' status when I query SQL using SELECT * FROM msdb.dbo.sysmail_allitems;
I created a VBscript file to send an email using CDO - using the same email server values (host name, port, email from, user name, password, etc). The CDO script successfully sends the email.
I'm not sure where to go to troubleshoot SQL.
There is no data being written to SELECT * FROM msdb.dbo.sysmail_event_log;
Admittedly I am not very good with the SQL configuration - I just need to get it setup. I'm trying to determine why the status is just staying in 'unsent'. Is there an action I can do to force a send? Is there some message or log somewhere I can look at to see why it isn't move forward?
EDIT: I have put the same credentials into sql reporting services configuration 'email settings' - and I am able to create subscriptions and successfully send emails. And that confuses me because I see that SSRS Subscriptions require access to the SQL agent and creates a scheduled job.
So what is different about my database mail account in SQL then the one I created in SSRS? ( I understand that I am not posting pictures but that those wizards have personal info so I don't know the value in posting screenshots for data values I can't share ).
Any help is appreciated.
Thanks
This issue is resolved. Thank you #AlwaysLearning. I had to update the server by installing .Net Framework 3.5. Then - following your guidance I ultimately found my problem was with the SSL check box and port 465. I was able to send email using port 25 with no SSL, and also to send TLS on port 587. But SSL and port 465 are still causing problems.
For me however, that is not my main concern. That problem has been passed to someone else in the chain to work on. I am able to use Database Mail.

Receive and process email in SQL Server

I am looking to see if there is a viable solution to allow us to receive emails into SQL Server, process the content or linked attachments, and run a script on a database.
Currently we have a process where certain developers create basic scripts to modify one of a few of our production databases. They upload the scripts to our SVN and then email the DBA's with a link to the script. We then open it in SSMS and run, copy/pasting the output in response to the email. The process is primarily a separation of duties and to ensure that the DBA's are the only ones that can run the scripts.
But there are times when we may be unavailable and not able to be at a computer to run these in SSMS, but the business is waiting on these tables getting updated. I am trying to find a solution where we might be able to forward these emails if we see them, such as on our phones, to a receiving email on the SQL Server, and have a proc grab the script from SVN, maybe inserting the content of the script and mail into a database, and then running that script on the appropriate DB. My idea was having this on our MSX server and then it would be able to run on one of the servers via linked server or something. Then I want the output emailed back as confirmation.
I have looked around and most email related questions are about sending email. The only things I have found remotely related are about SQL Mail, which I understand is outdated and inefficient, and potentially CLR. Most of our environments are 2012+.
Am I on the right track with my thinking or is there something else I should be considering?
Thanks

From Access 2003 to SQL Server 2008?

A client wants to host their MS Access 2003 backend database into SQL Server 2008 that resides in a different server. They will be using upsizing wizard to move their databases and tables into SQL server.
A client also has MS Access front end application written in VB. After upsizing their database tables to SQL, they want to use SQL server to read/write data and also use adv. programmability features of SQL Server like stored Procs, functions etc. My team will host their SQL database.
Client will have a growing # of users entering data. So what would be the best option for our team to provide access to our SQL server so that they can use only their databases in our SQL Server?Is there a way to provide them a connection string or something like that so that they could test it in their front end application to see if they could connect to our SQL Server to read/write?Basically I want to know What are the different avenues to connect MS Access 2003 front end application written in VB to connect to SQL Server database hosted in a different server so that a user could read/write to SQL database tables? Any thoughts? Thanks.
Actually, how this setup works is not any different than if your developers were using c++, vb.net, c# or even asp.net. At the end of the day these software development tools such as c++, or FoxPro or MS Access are simply tools that let you write software. The ability of Access to connect to MySql or Oracle or insert your favorite X database brand has existed from day one.
As long as your database supports what is called "open database connectivity" then you are off to the races. And how you setup that database server to allow some software written in say c# or FoxPro or MS Access will not really change much of anything to my knowledge.
So Access is just like any other software tool such as c++ or vb.net – it is a tool that lets you write code and you connect that application and user interface to some database system you choose.
The connection technology that Access uses here is based on industry standards and thus your setup and maintains of the server side will quite much be the same for any other application(s) that you have running on premises that utilize SQL server now.
About the only relevant issue here is that in Access you have a choice of two data object models, ADO and DAO. Right now, since Microsoft is depreciating ADO and they are continuing investment in DAO and also recommending to use open database connectivity. For example, Access 2010 ships with support baked in for SQL Azure (cloud sql), and that support is based on open database connectivity.
So at this point time as it did back in 2003 the recommend data object model in Access is to use DAO.
You can read about the depreciation of ADO support in SQL server here:
http://blogs.msdn.com/b/sqlnativeclient/archive/2011/08/29/microsoft-is-aligning-with-odbc-for-native-relational-data-access.aspx
While a for good number of general exports and imports and that of linking to SQL server can occur 100% inside of Access, those users will STILL need a set of client tools beyond Access to effectively work with SQL server if over time they going to start using SQL server features. This thus suggests they will need some edition of SSMS (Sql server management studio). The free express version of SSMS should more than suffice in this case.

Sending a mail from SQL Server?

is it possible to send an email with SQL Server? I would like to be able to create a procedure for sending an email. It seems that I have to do some configuration according to this site but I don't have admin access on my machine. How can I achieve that ?
Thanks for your help !!
P.S : I am working on Windows
If you have limited privileges on the SQL Server why don't you write the query to obtain the users' names, email adresses and forgotten DVD titles and send the email from you application?
As long as you have access to an SMTP server you should be good to go.
Or you could always try the obvious:
USE YourDB;
GRANT CONTROL SERVER TO ME AS (JON_SKEET OR CHUCK_NORRIS);
GO
:-)
You could use a CLR Stored Procedure.
See this example for instance: Send Email from SQL Server Express Using a CLR Stored Procedure
Sending it via .NET would allow you to relay on a external SMTP and not having to configure Database Mail.
xp_sendmail is the command you want for older versions of SQL Server. Note that this is being removed from future versions, so for versions which support it use Database Mail.
EDIT Sorry - just read your full post. If you don't have the rights to enable mail sending, you'll need to speak to the admin who has. Server security is not designed to be "worked-around". Why does the mail have to be sent from SQL Server?

Send mail by SQL server 2005

i am not getting this store procedure , can you tell where is it "master..xp_sendmail"
i have send the mail when any insertion take place in particular table like "Emp"
According to Microsoft you should not use xp_sendmail anymore. Use this instead:
http://msdn.microsoft.com/en-us/library/ms175887(v=SQL.90).aspx
As for the process of sending the emails... I would decouple the insert and the sending of the emails. You could have a SQL Server job that polls for new entries in a table and sends the emails if needed. This job could be sheduled to run every 5 minutes.
Note from MS:
This feature will be removed in a
future version of Microsoft SQL
Server. Avoid using this feature in
new development work, and plan to
modify applications that currently use
this feature. To send mail from SQL
Server, use Database Mail.
EDIT: incorporated the usefull links from the comment of adolf garlic
http://blog.sqlauthority.com/2008/08/23/sql-server-2008-configure-database-mail-send-email-from-sql-database/
http://www.databasejournal.com/features/mssql/article.php/3626056/Database-Mail-in-SQL-Server-2005.htm