SQL Clone
SQLServerCentral is supported by Redgate
Log in  ::  Register  ::  Not logged in

PowerSQL By Prashanth Jayaram

Technology enthusiast with 7+ years of experience in Database Technology. I am Microsoft Certified Professional with certificates of OCA, MCP, MCTS, MCITP developer, MCITP administration and backed with a degree in Master of Computer Application. My expertise lies in T-SQL programming, Replication, PowerShell and Performance Tuning. Hobbies are Drawing, playing soccer and listening to Melodies songs.

Archives: June 2013

PowerSQL – Different Approaches to Find Free Space in all disk drives

Different ways to find FreeSpace  in all disk drives of a given server

  • T-SQL
  • Using WMIObject
  • Counters

All three methods are explained below

This post illustrates the simplest way of doing anything with ease using Powershell. I hope everyone agree with it.

Download the code here Code- DiskSpaceUsageDetails


TSQL Read more

0 comments, 1,315 reads

Posted in PowerSQL By Prashanth Jayaram on 27 June 2013

SQL- SP_PROCOPTION – AutoNotification to App Owners – When SQL Instance Restarts

We had a situation where Application owners automatically notified whenever server restarts.  The SP_PROCOPTION do have a facility to perform this activity. The SP_PROCOPTION built-in stored procedure being used to invoke the user defined stored proc automatically.

The details of this implementation is as follows

  • User defined meta data table…

Read more

4 comments, 1,504 reads

Posted in PowerSQL By Prashanth Jayaram on 24 June 2013

SSAS – Automatic Inventory Generation – 24 Columns – HTML Attachment

Inventory is a vital information,whether you’re a consultant or an in-house DBA, you need to have a reliable inventory of the servers you manage. This inventory can take any number of forms but, ideally, will allow some aggregation of information. When server hardware or software changes are taking place, it’s… Read more

1 comments, 976 reads

Posted in PowerSQL By Prashanth Jayaram on 18 June 2013

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 enabled in Query Editor. Go to SSMS Menu -> Query… Read more

0 comments, 1,720 reads

Posted in PowerSQL By Prashanth Jayaram on 12 June 2013

PowerShell – Identify Service Account & Other Details of SQL Services – Multi Server Script

One of my friend requested me to give a mutli server script to pull SQL Service related details. Here is a quick PowerShell script to find Name, ServerName, Status, StartupMode, Service Account and other details of SQL Services across all listed SQL Instances. The output is shown in three different… Read more

5 comments, 1,623 reads

Posted in PowerSQL By Prashanth Jayaram on 10 June 2013

SSAS Cube Backup strategies and Step by Step approach to setup and configure backup

There are different ways to take Cube database backups.

  • SQL Agent Job
    • XMLA script for backup
  • ROBOT job
    • ASCMD command
  • SSIS Package
    • SSIS package
  • AMO (Analysis Management Objects)
    • PowerShell Scripts

I feel AMO (Analysis Management Objects) does our job much easier. Different ways of taking cube backup is explained below.… Read more

8 comments, 2,386 reads

Posted in PowerSQL By Prashanth Jayaram on 5 June 2013