Solved

Sending email with sp_send_cdosysmail failed after IP change

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
This query failed in sql 2014 5 29
export sql results to csv 6 34
SQL Help 27 43
SQL Server 2012 r2 - Sum totals 2 23
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 article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
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.

776 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