Solved

Sending email with sp_send_cdosysmail failed after IP change

Posted on 2008-09-29
4
559 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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
SLQ View not updating 10 46
MS SQL export CSV & schedule It 9 42
MSSQL 2014 Query Synthax 8 38
MS SQL Pagination for Complex Query 5 31
Introduction SQL Server Integration Services can read XML files, that’s known by every BI developer.  (If you didn’t, don’t worry, I’m aiming this article at newcomers as well.) But how far can you go?  When does the XML Source component become …
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…
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
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

707 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now