Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Sending email with sp_send_cdosysmail failed after IP change

Posted on 2008-09-29
4
Medium Priority
?
613 Views
Last Modified: 2012-06-21
I changed the IP addresses on my SQL and Exchange servers this morning and now my SP to send email doesn't work. The SP containes a reference to the Exchange server but uses it's NetBIOS name and not the IP. The Outlook MAPI profile on the SQL server works fine and it sends email through the Exchange server. Nothin else has changed apart from the IP address being altered, and both servers are on the same subnet with their new addresses.

Has anyone come across this before? Is there a setting in SQL where I would stipulate the IP address of the Exchange server, as I can't locate it? Eventwvr on both servers shows no entries for failed SPs or emails being backed up. THe Exchange server queue is flowing just fine, so I'm stumped.

All advice appreciated.
0
Comment
Question by:guswebb
  • 3
4 Comments
 
LVL 29

Expert Comment

by:mass2612
ID: 22594945
Hi,

Have you restarted SQL? You could also try adding the IP address rather than using the NetBIOS name just as a test to see if that works. If it does then SQL is caching the IP address and not doing a lookup to see the new IP with the NetBIOS name.
0
 
LVL 9

Author Comment

by:guswebb
ID: 22595651
Yes, I have rebooted both servers twice since making the changes.

Changing the NetBIOS name in the SP for the IP address of the Exchange server doesn't make any difference. I restarted SQL after making the change so tht I could test this.

In Enterprise Manager/Support Services/SQL Mail, where I select the MAPI profile to be used I get an error (this happened prior to testing using IP as above, but has only started appearing since changing the IP address of the SQL server). The error is...

Error 18025: xp_test_mapi_profile : failed with mail error 0x8004011

Looking at the properties of the xp_test_mapi_profile Extended SP all I can see is the Path which is sqlmap70.dll.

Any ideas where I should be looking next?
0
 
LVL 9

Author Comment

by:guswebb
ID: 22596043
I've got past the MAPI profile error by recreating the profile and also reassigning the log on account information for MSSQL and SQLSERVERAGENT. I still cannot send email using the sp_send_cdosysmail stored procedure.

Any more ideas?
0
 
LVL 9

Accepted Solution

by:
guswebb earned 0 total points
ID: 22598054
I found the solution. It was to do with the SMTP server Relay permission's where I had listed a range of IP address that are authorised to send email via the SMTP virtual server. This list included my old IP subnet and so needed to be updated for the new IP range.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
What if you have to shut down the entire Citrix infrastructure for hardware maintenance, software upgrades or "the unknown"? I developed this plan for "the unknown" and hope that it helps you as well. This article explains how to properly shut down …
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Via a live example, show how to shrink a transaction log file down to a reasonable size.

877 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question