Troubleshooting SQL Mail with Exchange Server

Troubleshooting SQL Server

Troubleshooting

Troubleshooting SQL Mail with Exchange Server

Typically, errors that occur when starting a SQL Mail session or sending mail from SQL Mail with Microsoft® Exchange Server fall into these categories: permissions problems and Exchange client setup problems. For more information, see SQL Mail.

To troubleshoot problems with SQL Mail, complete these steps:

  1. Log on to Microsoft Windows NT® 4.0 or Windows® 2000 with the user account that will be used for the MSSQLServer service. This user account must be an administrator of the local computer and a domain account.

  2. Confirm that the Exchange Server client, Exchnge32.exe, or the Microsoft Outlook™ client, Outlook.exe, can connect to Exchange Server and that e-mail can be sent. If using Outlook, ensure that Outlook has been installed with the Corporate or Workgroup option.

  3. Confirm that the Exchange Server profile used does not have a Personal Message Store (.pst). The Exchange Server profile name should not be longer than 32 characters.

  4. On the Services tab, confirm that the only services available are Microsoft Exchange Server and Personal Address Book, and then click the Delivery tab. Confirm that the selection in the Deliver To box is the mailbox on Exchange Server, which should have a name similar to "Mailbox - <Friendly User Name>" (where <Friendly User Name> is the name of the user who logged on to Windows NT 4.0 or Windows 2000in Step 1).

  5. To run SQL Mail with Exchange Server, the MSSQLServer service must be run under the same user account that logged on in Step 1. In Control Panel, double-click Services, select MSSQLServer service, and then click Startup.

  6. Confirm that the SQL Mail profile is correct. In SQL Server Enterprise Manager, expand the server, expand the Support Services folder, select SQL Mail, and then right-click. Click Properties, and then on the General tab, ensure that the profile name specified in the Profile name box is correct. (The profile name must match the profile name used in Step 3.) Click Test to verify that the profile was set up correctly.

  7. If SQL Mail fails to start (for example, gives you an error indicating that the profile was incorrect), check to make sure that Outlook Express is not set as the default e-mail client. In Control Panel, double-click Internet Options. On the Programs tab, verify that Outlook Express is not in the e-mail combo box. If you have to change the default e-mail client to a client other than Outlook Express, you may need to stop and restart the MSSQLServer service before verifying that SQL Mail can start with the mail profile.

In some cases, a mail profile may get corrupted and SQL Mail will not be able to use it. To correct the problem, copy the profile to a different name, or re-create the profile.

If the account used to start Microsoft SQL Server™ does not have access to the Exchange server, you cannot use SQL Mail. Test SQL Server access permissions to Exchange Server by executing xp_cmdshell, which executes with the same permissions as SQL Mail. Use the following command to test connectivity to the server, assuming Exchange Server is located on a computer named "MyServer".

xp_cmdshell "NET USE \\MyServer\IPC$"

If this command fails, Step 3 was not completed correctly.