Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Optimal command line tool
for SQL Server

SQLS*Plus

http://www.sqlsplus.com
Command line tools available
for SQL Server
SQLCMD – standard SQL Server command
line tool

SQLS*Plus – free advanced SQL ...
Why command line tools?
Batch processing of SQL commands
Automation of DBA, monitoring and
reporting tasks
Require less re...
What is missing?
Looking at Oracle SQL*Plus as a model
we see that standard SQL Server
command line tools lack functionali...
Would this functionality benefit SQL Server command line tool?

SET pagesize <N>

SET linesize <N>

“set markup html
on|of...
Would this functionality benefit SQL Server command line tool?

!!command –
interactive, rerun
command again

BTITLE - Pla...
Would this functionality benefit SQL Server command line tool?

EXEC Execute TSQL
procedure

FIND - Find a
line in T-SQL
p...
Would this functionality benefit SQL Server command line tool?

LIST - List last SQL
statement

LS - List all objects
matc...
Would this functionality benefit SQL Server command line tool?

RERUN
<history_number> Run command by
history number

SET ...
Would this functionality benefit SQL Server command line tool?

SET output <csv |
default> - Set
output to CSV
(commas
sep...
Would this functionality benefit SQL Server command line tool?

SHOW
TABLES|TAB Show
database
tables

SHOW ERRORS
- Show s...
Would this functionality benefit SQL Server command line tool?

TTITLE - Places and formats a specified
title at the top o...
SQLS*Plus is a free tool*

Download SQLS*Plus at
www.sqlsplus.com
*Free for personal and commercial use on a single databa...
Upcoming SlideShare
Loading in …5
×

SQLS*Plus SQL Server command line tool

2,625 views

Published on

SQLS*Plus is like Oracle© SQL*Plus / sqlplus for Microsoft© SQLServer 2012, 2008 and 2005

Command line tool selected by hundreds of SQL Server DBAs (see testimonials on site)

it is database management and SQL reporting tool with advanced options and functionality and "Must have" addition to SQL Server sqlcmd, osql, isql and other SQL command line tool /s

SQLS*Plus is used by DBAs, Developers and Operations to execute DBA tasks, run SQL script /s and to automate SQL database data processing and reporting batch jobs, as well as to convert Oracle SQL script /s after Oracle to SQL migration

SQLS*Plus is free for personal use and commercial use on a single server and single SQL Server instance.

We appreciate purchase of annual enterprise site license for use of SQLS*Plus in a multi-server and multi-instance SQL database environment.

Published in: Technology
  • Be the first to comment

  • Be the first to like this

SQLS*Plus SQL Server command line tool

  1. 1. Optimal command line tool for SQL Server SQLS*Plus http://www.sqlsplus.com
  2. 2. Command line tools available for SQL Server SQLCMD – standard SQL Server command line tool SQLS*Plus – free advanced SQL Server command line tool (www.sqlsplus.com) OSQL – will be deprecated past SQL Server 2012 ISQL – deprecated as of SQL Server 2005
  3. 3. Why command line tools? Batch processing of SQL commands Automation of DBA, monitoring and reporting tasks Require less resources and operate under very high server load when GUI tools stop working or causing issues Interactive command execution
  4. 4. What is missing? Looking at Oracle SQL*Plus as a model we see that standard SQL Server command line tools lack functionality that enables command line tool to be a useful instrument to DBAs and database developers SQLS*Plus for SQL Server is what SQL*Plus is for Oracle
  5. 5. Would this functionality benefit SQL Server command line tool? SET pagesize <N> SET linesize <N> “set markup html on|off” command to output selected data in HTML format “set output csv” command to output selected data in CSV format “set vout on” command to output data in vertical format, where each column is printed on its own line. Vertical output format is helpful when outputting data from a tables with many columns &<variable name> and &&< <variable name> Use substitution variable – both as command line parameter and from scripts
  6. 6. Would this functionality benefit SQL Server command line tool? !!command – interactive, rerun command again BTITLE - Places and formats a specified title at the bottom of each report page, or lists the current BTITLE definition “cat <table_name> -a” – select data from a table “col <name> format <format>” - format selected column (like Oracle does) “DEF[INE] [variable]|[variable = text]” – define script variable DEPS [NAME] – show Object dependencies and references DESCRIBE - Describe a table or stored procedure
  7. 7. Would this functionality benefit SQL Server command line tool? EXEC Execute TSQL procedure FIND - Find a line in T-SQL procedure source GREP <pattern table [extra clause]> Show rows that match pattern HEAD - Show first rows of table HISTORY Show history items matching pattern (or all) HOST Execute host OS command Id – show current user and login id
  8. 8. Would this functionality benefit SQL Server command line tool? LIST - List last SQL statement LS - List all objects matching pattern PAUSE - SET PAUSE <TEXT> | SET PAUSE [ON|OFF] Enables to control scrolling of terminal when executing reports PRINTVAR - Print bind variables PURGE <table where ...> Delete data from (large) table in chunks RECOMPILE – recompile objects REFS - Display referential integrity dependencies
  9. 9. Would this functionality benefit SQL Server command line tool? RERUN <history_number> Run command by history number SET COLSEP - Set column separator character for reports SET FEEDBACK <on|off|N> Display number of records returned by a query when a query selects at least n records SET HEADING - Set heading value SET HEADSEP - Set heading separator SET linesize <size> Set output line size SET MARK[UP] HTML [ON | OFF] Set output to HTML
  10. 10. Would this functionality benefit SQL Server command line tool? SET output <csv | default> - Set output to CSV (commas separated values) or to default output. SET pagesize <size> Set output page size SET termout on|off Controls the display of output SET VERIFY Print ampersand replacing SET vout on|off Set vertical output mode SHOW DB|DATABASE Show current database SHOW DBS|DATABASES Show available databases
  11. 11. Would this functionality benefit SQL Server command line tool? SHOW TABLES|TAB Show database tables SHOW ERRORS - Show server error log SHOW PARAMETER <pattern> Show database parameters SHOW USER Show the current username SPOOL spool <file_name> Write report output to file START | @ Execute sql script STARTREL | @@ - Execute sql script relative / nested to a running script
  12. 12. Would this functionality benefit SQL Server command line tool? TTITLE - Places and formats a specified title at the top of each report page. TSQL - Display T-SQL procedure code VARIABLE - declare a bind variable
  13. 13. SQLS*Plus is a free tool* Download SQLS*Plus at www.sqlsplus.com *Free for personal and commercial use on a single database instance

×