Script to get data file usage and autogrowth details

Written by VidhyaSagar. Posted in Scripts

I’ve wrote this script to get data file allocated and used space. In addition to this I’ve also added auto growth setting details for the data file. Written two scripts for fetching the details, first one will get you the details for one database and second one will give you the details for all the database data files.

VN:F [1.9.20_1166]
Rating: 4.0/5 (1 vote cast)
VN:F [1.9.20_1166]
Rating: 0 (from 0 votes)

Script to Retrieve Security Information – SQL Server 2012 (Denali) and above

Written by VidhyaSagar. Posted in Scripts

SQL Server 2012 codenamed SQL Server Denali is on the way to market by 2012. As you all know SQL Server 2012 has new features related to security, we have contained database where you are allowed to create contained users and the next feature is server level roles, other security features are not related to this article, we will cover those later. I wrote some scripts earlier to retrieve permissions from SQL 2000 and SQL 2005 (links below) however these scripts are no longer useful for SQL Server 2012 as it won’t return the new contained user and server level role permissions.

VN:F [1.9.20_1166]
Rating: 0.0/5 (0 votes cast)
VN:F [1.9.20_1166]
Rating: 0 (from 0 votes)

Startup procedure to check SQL Server status when restarted

Written by VidhyaSagar. Posted in Scripts

I’ve written a startup procedure to check SQL Server status when the SQL Server gets restarted. Most of the time as a DBA when a Server gets rebooted or SQL Services is restarted we need to make sure everything is fine in SQL server to make sure SQL server is running healthy. Some companies will have budget to buy a monitoring tool, so that all these things will be taken care by that tool. This small procedure will help the DBA’s to know the status of SQL Server in HTML format through mail when it’s restarted.

VN:F [1.9.20_1166]
Rating: 4.0/5 (2 votes cast)
VN:F [1.9.20_1166]
Rating: +1 (from 1 vote)

Database Documentation

Written by Deepak. Posted in Scripts

Almost every application DBA would have a need to document the various database objects such as tables, views, stored procedures and functions. I wasn’t an exception and exploring ways to document the 400+ tables we have. Basically, this would serve the following purpose:

VN:F [1.9.20_1166]
Rating: 0.0/5 (0 votes cast)
VN:F [1.9.20_1166]
Rating: 0 (from 2 votes)

Recent Comments

VidhyaSagar

|

You can make use of Cluster.exe utility or powershell.

Cluster.exe sample
cluster group “Cluster Group” /move

Powershell sample
Move-ClusterGroup “Cluster Group”

Ganapathy

|

Vidya,

How to move the Windows cluster from one node to the other node in command line

Senthilsjc

|

Usefull Session. Please Keep it up,,

veeresh

|

Not yet tested might be very good feature..

VidhyaSagar

|

Probably Encryption might be set, so go to reporting server configuration wizard and then click on Encryption tab. Once you are there take a backup of the existing key and then delete it. Now you will be able to point it to new db