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

WrapperSQl Script Expand / Collapse
Author
Message
Posted Monday, February 10, 2014 10:30 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, February 10, 2014 11:18 AM
Points: 1, Visits: 2
Hi friends,

I am trying to create a wrapper script for the SQL. I am trying to create a batch file, so that all the sql can be run together and can be directed to a flat file.

will appreciate light to it.
Post #1539869
Posted Tuesday, February 11, 2014 3:32 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Yesterday @ 10:07 AM
Points: 14,034, Visits: 28,406
You'll want to read up on the sqlcmd.exe utility. If you are looking to do things through the command line, it's one method. Another would be to use PowerShell. You can call that through the invoke-sqlcmd commandlet.

----------------------------------------------------
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood..." Theodore Roosevelt
The Scary DBA
Author of: SQL Server Query Performance Tuning
SQL Server 2012 Query Performance Tuning
SQL Server 2008 Query Performance Tuning Distilled
and
SQL Server Execution Plans

Product Evangelist for Red Gate Software
Post #1540111
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse