Category: Scripts

  • Configuring Peer-to-Peer replication using T-SQL

    This article brings you the easiest way to configure P2P replication using TSQL. Also I assume that the database has been initialized in all nodes participating in the replication. 1. Configure Distributor:

  • How To Check SQL SERVER Uptime Through T-SQL

    Introduction Services uptime can be checked through WMI scripts and other methods also. As a DBA most of us would like to know the uptime of SQL Server, i.e how much time is SQL Server running till the server is on. You can do almost all the stuffs in T-SQL, hence Im writing the script…

  • Disk space Check via SQL Server

    Im writing this script since most of them are looking a way to find total diskspace available in a drives through sql server. I hope there is no extended procedure for this. Ive used WMI script to do this, Copy the vbs script and save it to a location as diskspace.vbs and use this location…

  • How to find TCPIP port via T-SQL

    In most of the forums I’ve seen that users are not able to find on which port does their sql server is listening. Hence I decided to write a script to check TCPIP port on which sql server is listening. Checkout the below script.

  • Script Default Databases

    Default Database is one of the most important parameter when we detach the database. If we don’t have the track of default db for logins then it might be a problem when you use an application. Consider you are planning to move a user database from X: drive to Y: drive and your application login…