Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 

Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin. Search for scripts directly from SSMS, and instantly access any saved scripts in your SSC briefcase from the favorites tab.
Download now (direct download link)

Changing database mail account SMTP servers

By Dennis Post,

Change @NewSMTP to a valid server name or IP address or leave NULL if you just want to generate the accounts as they are.

To skip the ping test, simply change @TestPing to 0.

If you have many accounts then it might be necessary to remove
@SQL = @SQL +
from the SELECT statement.
This will return each accounts TSQL in table format.

For SMTP authentication users, remember to change each users password before you run the generated script.
If there is only one account or only one password for multiple accounts then set the @PW variable.

Total article views: 603 | Views in the last 30 days: 6
 
Related Articles
FORUM

Auditing Account creation/changes

Trying to audit account creation and permission changes

FORUM

how to properly change the service accounts

how to properly change the service accounts

FORUM

CHANGING DB-OWNERSHIP TO SA ACCOUNT

CHANGING DB-OWNERSHIP TO SA ACCOUNT

FORUM

How to change dbo-login account is changed from DOM1\SQL_AC1 to DOM2\SQL_ACC1

Changing dbo_login Account to differnt one

FORUM

SSRS - Changing Service to use Domain Account

WMI problems when changing to domain account - can't even change back.

Tags
database mail    
smtp    
 
Contribute

Join the most active online SQL Server Community

SQL knowledge, delivered daily, free:

Email address:  

You make SSC a better place

As a member of SQLServerCentral, you get free access to loads of fresh content: thousands of articles and SQL scripts, a library of free eBooks, a weekly database news roundup, a great Q & A platform… And it’s our huge, buzzing community of SQL Server Professionals that makes it such a success.

Join us!

Steve Jones
Editor, SQLServerCentral.com

Already a member? Jump in:

Email address:   Password:   Remember me: Forgotten your password?
Steve Jones