Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Database Mail Profile Expand / Collapse
Author
Message
Posted Wednesday, June 25, 2014 3:58 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Wednesday, November 12, 2014 10:44 AM
Points: 2,634, Visits: 3,985
Hi Experts,

We are planning to delete a particular Mail Profile & Account from all our servers. As a backout plan i like to script out those profiles & Accounts from the server,is there anyway i can achieve the same?


Thanks IN Advance.
Post #1585797
Posted Wednesday, June 25, 2014 4:25 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: 2 days ago @ 10:40 AM
Points: 2,480, Visits: 3,023
Have you looked at the script section of SQLServerCentral?
http://www.sqlservercentral.com/search/?q=mail&t=s&sort=relevance


** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **
Post #1585807
Posted Wednesday, June 25, 2014 4:29 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Wednesday, November 12, 2014 10:44 AM
Points: 2,634, Visits: 3,985
Thanks Hanshi,

I didnt find any to script out the current mail profiles & Accounts
Post #1585811
Posted Wednesday, June 25, 2014 4:59 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: 2 days ago @ 10:40 AM
Points: 2,480, Visits: 3,023
I don't have a script myselef, but it looks like this http://www.sqlservercentral.com/scripts/Database+Mail/100073/ can give you a rather good starting point.

You can also create a script yourself using the [msdb].[dbo].[sysmail_add_....._sp] stored procedures. Look in BOL for how to use these procedures.
Another option can be to (re-)create the mail setup using the wizard. Start a profiler trace to capture the commands executed by the wizard. From this trace you can extract the required commands and create your own script.


** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **
Post #1585820
Posted Wednesday, June 25, 2014 6:43 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Wednesday, November 12, 2014 10:44 AM
Points: 2,634, Visits: 3,985
Thanks Again Hanshi.

Post #1585866
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse