SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Powershell
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

dishant jain
Starting Member

India
5 Posts

Posted - 06/25/2014 :  03:13:11  Show Profile  Reply with Quote
Hi,

As we know there are two output windows in sql server management studio like 'Results' and 'Messages',
I want to capture that 'Messages' window into a log file using powershell program . like into a log file it should display like

ex:-
(1 row(s) affected)

(1 row(s) affected)


Can anyone help me out with this one

Dishant jain

influent
Constraint Violating Yak Guru

USA
367 Posts

Posted - 06/25/2014 :  17:55:35  Show Profile  Reply with Quote
Unless you work for Microsoft or otherwise have access to the API for SSMS you probably won't be able to do it. I tried with SQLCMD and couldn't find a way to get just the messages.
Go to Top of Page

jackv
Flowing Fount of Yak Knowledge

United Kingdom
2076 Posts

Posted - 06/26/2014 :  01:40:51  Show Profile  Visit jackv's Homepage  Reply with Quote
@dishant jain - do you have to run the commands from SSMS , what about running them from Powershell?

Jack Vamvas
--------------------
http://www.sqlserver-dba.com
Go to Top of Page

dishant jain
Starting Member

India
5 Posts

Posted - 06/26/2014 :  02:12:11  Show Profile  Reply with Quote
Actually i wrote a powershell program which is taking an input file containing some scripts, i want to capture message window of SSMS into a log file. How can i achieve that...

Dishant jain
Go to Top of Page

dishant jain
Starting Member

India
5 Posts

Posted - 06/27/2014 :  05:00:10  Show Profile  Reply with Quote
can any one help out with this...........

Dishant jain
Go to Top of Page

sardam98
Starting Member

Iraq
10 Posts

Posted - 06/29/2014 :  03:47:40  Show Profile  Reply with Quote
goood

http://www.soran.edu.iq
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.08 seconds. Powered By: Snitz Forums 2000