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

Save and menage SSMS client messages Expand / Collapse
Author
Message
Posted Wednesday, February 6, 2013 6:29 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: 2 days ago @ 2:37 AM
Points: 17, Visits: 47
Hi guys,
you know, there are some commands that generate client messages (those messages that are generated and shown inside the "result pane" along with errors).
For example when you run a DB check you get a message that tells the number of allocation errors, consistency errors and so on..
I know how to manage error warnings but I'd like also to intercept these messages and save them into a variable (or something else if needed) in order to enclose them to the mail body that my script sends at the end of the execution.

I've searched a lot on the web but I could not find any topic about my problem.
Has any of you ever had my same need and found a solution?

Thanks,
G.
Post #1416468
Posted Thursday, February 7, 2013 1:30 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: 2 days ago @ 2:37 AM
Points: 17, Visits: 47
I think this is a good solution.

http://www.mssqltips.com/sqlservertip/1394/how-to-store-longer-sql-agent-job-step-output-messages/
Post #1416863
Posted Thursday, February 7, 2013 1:47 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: 2 days ago @ 2:37 AM
Points: 17, Visits: 47
The only problem is that it explains how to do this within a Job.
I don't think it is possible to adapt this for SPs (or scripts outside Jobs).
Post #1416878
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse