Tag Archives: SQLCMD

SQL Server DevOps Tools

This article is part of the SQL Server Tools series, aimed at giving you an idea of the available tools and techniques to build applications using SQL Server tools. The first article of the series covers the rudimentary DevOps concepts and discusses … Continue reading

Posted in SQL Server DevOps | Tagged , , , , | Leave a comment

SQL Server Operations: Monitoring Disk Space with WMI and OLE Automation Objects

Abstract This article talks about various SQL methods to fetch the disk usage details and use of T-SQL in conjunction with invoking OLE automation procedures and WMI  class libraries using SQL Windows Shell interface. The step by step  details about … Continue reading

Posted in PowerShell, SQL, T-SQL | Tagged , , , , , | 1 Comment

SQL – List All Tables, Space Usage Info & Other Details

One of the OP requested in the forum to find all table details of any database. The details which includes Number of Rows,table size, index size etc:-. Even I frequently writing queries to list all such details. I’ve used SQLCMD mode to … Continue reading

Posted in Uncategorized | Tagged , , , , , | Leave a comment

T-SQL – Monitoring DiskSpace of Multiple Servers

This post talks about step by step approach to capture the disk space using T-SQL. This is a request from one of SQL enthusiast. The requirement is to do with T-SQL to monitor disk space of remote servers. Pre-requisites are Enable … Continue reading

Posted in Uncategorized | Tagged , , , | 3 Comments

SQLCMD – Database Backup and Restore – Automation – Quickest and Simplest method

In today’s world we rely more on third party tools to do a Backup and Restore of databases. Most of us still use SQL Native method to do a Database Backup and Restoration. This post illustrates the quickest way of … Continue reading

Posted in Backup and Restore, Robocopy, SETVAR, SQL, SQLCMD, Uncategorized | Tagged , , , | 7 Comments

SQLCMD –Quick Copy of Files – Using Robocopy

The requirement is to move the files to different server programatically and hence I’ve decided to use Robocopy in SQLCMD. Robocopy is a command line utility. It has been available as part of the windows resource kit and It’s one of … Continue reading

Posted in Robocopy, SETVAR, SQLCMD, T-SQL | Tagged , , | 3 Comments

SQLCMD – Explicit and Implicit calls – Examples

The scripting variables can be defined explicitly by using the setvar command or implicitly by using the sqlcmd -v option. Also, this is very helpful in Replication to check rowcount across publisher and subscriber articles. Explicit Call- SQLCMD can be … Continue reading

Aside | Posted on by | Tagged , , , , | Leave a comment