Learn SQL With Bru

Bru Medishetty's SeekWell Blogs

  • Home
  • SQL Server Forum
  • Learn SQL Server
  • SQL Server Tidbits
    • SQL Tidbits Jun 2010
    • SQL Tidbits May 2010
    • SQL Tidbits Apr 2010
    • SQL Tidbits Mar 2010
    • SQL Tidbits Feb 2010
    • SQL Tidbits Jan 2010
  • SQL Server Interview Questions and Answers
    • SQL Server DBA QandA
    • SQL Server DEV QandA
    • SQL Server BI DEV QandA

Backup Information for a Database

Mar 16th

Posted by Brumedishetty in SQL Server

1 comment

How do I find the backup information about a particular database ?

Some one asked me this question in the past and since it is being repeatedly asked in forums and to me personally , I decided to write this.

Having the backup information of a database is very important for a database administrator. In case of disaster, the DBA has to be aware when was the last time that database was backed up.  If a SQL Server is inherited from another Admin and the schedule of the backups and the backup types performed is not known it is easy to find by querying the backup related tables in MSDB.

One of those tables is msdb.dbo.backupset. It has the backup information related to all databases on that instance. information such as backup size, backup type and the start and end time of the backup to name a few.

The following script is one such script that gives the backup info of a specific database with the most recent one first.

The value in bkup_type column indicates the type of backup performed. D indicates FULL backup, I indicates Differential and L indicates Log backup.

Use the following Script.

DECLARE @DBNAME VARCHAR(50)

SET @DBNAME = ‘LSWB’

SELECT CEILING(((backup_size / 1024)/1024)/1024) Bkup_Size_In_GB,
CEILING(((backup_size / 1024)/1024)) Bkup_Size_In_MB, [type] Bkup_Type,
backup_start_date StartTime,backup_finish_date
FROM msdb.dbo.backupset
WHERE DATABASE_NAME = @DBNAME
ORDER BY backup_start_date DESC

– Bru Medishetty

Backups, Monitoring, Scripts, Tips

Listed in SQL PASS Blog Directory

Mar 13th

Posted by Brumedishetty in General

3 comments

I wanted to share some news about this Blog. Last week this blog was added to the list of blogs in SQL PASS Blog Directory.

I am thrilled to have this blog listed in it, since the list contains highly regarded SQL Server experts. Follow the Blog Directory at SQL PASS here http://www.sqlpass.org/Community/BlogDirectory.aspx

– Bru Medishetty

General, Personal, SQL PASS

Finding Shared Drives on a Cluster

Mar 10th

Posted by Brumedishetty in SQL Server

1 comment

When working in a clustered environment, it is a common practice to open the Cluster Administrator to look at the shared drives for the SQL Server instance.  This can be performed from one of the participating nodes in the cluster. Using SQL Server Dynamic Management View sys.dm_io_cluster_shared_drives we can query and retrieve the shared drives for the SQL Server.

Note that the DMV returns only one column DriveName. The script returns no values when run on a standalone installation of SQL Server.

For the convenience of users, the script can be copied from the text at the end of the post.

In the above image, there are 7 rows indicating the 7 shared drives for the SQL Server fail-over cluster.

select * from sys.dm_io_cluster_shared_drives

– Bru Medishetty

Cluster, Dynamic Mangement Views, Tips
« First...«89101112»20...Last »
  • Search this Site

  • Site Stats

    1,003,406 Requests (Since Nov 1 2009)

    Note: Stats are not updated real time, they are updated as the server information is updated.

  • Site Visitors

    World wide visitors to this blog since May 14th 2010..

    Locations of visitors to this page

  • My Other Blogs

    • Beyond Relational My blogs @ Beyond Relational
    • Full Throttle My blogs @ SQLServerCentral
    • MSSQLTips My Articles List @ MSSQLTips
    • SQL Server Club My blogs @ SQL Server Club
  • Blogs Archive

    • August 2010
    • July 2010
    • June 2010
    • May 2010
    • April 2010
    • March 2010
    • February 2010
    • January 2010
    • December 2009
    • November 2009
    • October 2009
    • September 2009
    • August 2009
  • Tags

    .NET 3.5 2010 Access Administration Articles Backups Certification Charity configurations Deployment Downgrading Dynamic Mangement Views Error Logs General Goals High Availability Installation LearnSQLWithBru Linked Server Logging Monitoring MSSQLTips Multiple Instances New Features NULL Performance Tuning Personal Sample Databases Scripts Service Pack snapshots SQL PASS SQL Server SQL Server 2008 SQL Server 2008 R2 SSAS SSIS SSIS Warning Strings T-SQL Tips Transaction Logs Troubleshooting Tutorials Upgrade
  • Recent Comments

    • Preethi on Scripting database objects in SQL Server 2008
    • Saqlain on Learn SQL Server
    • siva on SQL Server BI DEV QandA
    • Learn SQL With Bru completes 1 year on Learn SQL Server
    • Learn SQL With Bru on Google Search on Learn SQL Server
Mystique theme by digitalnature | Powered by WordPress
RSS Feeds XHTML 1.1 Top