Category Archives: DBA

Category containing DBA Scripts

SQL Script to find the database & their files details on a SQL Server

SQL Script to find database details Sometimes we need a SQL Script which can give the below information about the databases created on a SQL Server for house keeping purpose: -1) Database Name 2) Database ID 3) Database Files name … Continue reading

Posted in DBA | Tagged , | 31 Comments

SQL Script: – How to find the database restoring history of SQL Server databases

SQL Script to find database restoring history Sometime we need to find out the history of database restoration to get the answers of following questions: -1) Do we need to restore the database again as there is a possibility that it … Continue reading

Posted in DBA, SQL Database Restoration | Tagged , | 28 Comments

SQL Script: – How to find the last access date of a database

SQL Script to find database last access date Sometime we create databases on Test/ Development database servers for temporary uses for short duration and  forgot to delete them after the work got completed. As a part of house keeping activity, … Continue reading

Posted in DBA | Tagged , | 35 Comments

Learn How to Recover Deleted Records from SQL Server 2014

Problem Sometimes users may have numerous of databases in their SQL Server. However, while managing their database sometimes by mistake their records are deleted due to which they face a lot of issues. To maintain the workflow they need to … Continue reading

Posted in DBA, SQL Tips | Tagged , | 31 Comments

Two Ways to Restore Database from MDF File in SQL Server

Ways to Restore Database from MDF File Introduction In todays decade Relational database Management system became the necessity of the organizations whether they are small level or large level. In such context SQL Server is the best and successful RDBMS … Continue reading

Posted in DBA, SQL Database Restoration, SQL Tips | 31 Comments

How to Resume Suspended Database Mirroring in SQL Server ?

Resuming Suspended Database Mirroring in SQL Overview Database mirroring is a feature in SQL Server which is creating and maintaining the redundant copies of the database. The purpose behind database mirroring is continuous data availability and minimizes the loss of … Continue reading

Posted in DBA, SQL Database Mirroring | 27 Comments

SQL Recovery Software: An Ultimate Tool For SQL Database Recovery

SQL Server is a database management system which enables to store and retrieve data from the database. Due to some reasons like virus infection, improper closing of the Server, etc. the data in the database may go damaged or corrupted. … Continue reading

Posted in DBA | Tagged | 26 Comments

SQL Script to find the missing indexes

Script to find the missing indexes Performance tuning in SQL is important exercise and index creation is an important part of it. Sometimes base on the frequent SQL queries, we need to create some indexes or missing indexes which are enhance the … Continue reading

Posted in DBA, SQL Advanced, SQL Indexes, SQL Server | Tagged , | 29 Comments

SQL Script to find the list of all the jobs failed yesterday

One of the important task of any DBA is to find out all the jobs which are failed yesterday. Below SQL Script can be used to find out all the jobs which are failed yesterday. SELECT DISTINCT CAST(CONVERT(datetime,CAST(run_date AS char(8)),101) … Continue reading

Posted in DBA, SQL Advanced, SQL Server | Tagged , | Leave a comment

SQL Script to search stored procedures containing a given text

Sometimes we need to find out how many stored procedures contains a given text. Below SQL query can be used to find out the list of all the stored procedures which contains a  particular given text as input. SELECT OBJECT_NAME(object_id), … Continue reading

Posted in DBA, SQL Advanced, SQL Server | Tagged , | 32 Comments