Solved

Sending email with sp_send_cdosysmail failed after IP change

Posted on 2008-09-29
4
600 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Begin Transaction 12 26
SQL Server replace between tags 6 27
Group ordersum by orderdate 3 18
Convert DateTime format in SQL query 7 12
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.

739 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