Feed on
Posts
Comments

Archive for the ‘SQL Backup and Restore’ Category

SQL Server stores history of all the taken backup forever. History of all the backup is stored in msdb database. Many times older history is no more required. Following Stored Procedure can be executed with parameter which takes days of history to keep. In following example 30 is passed to keep history of month.
USE msdb
GO
DECLARE [...]

Read Full Post »

Pro SQL Server 2005 Replication (Definitive Guide) (Hardcover)
by Sujoy Paul (Author)
Link to Amazon (This is not affiliate link)
Quick Review:
This is good book for any novice developer to start in the world of database replication implementation and maintenance. Replication is important part of highly availability and one book covers all the concept and methodology at [...]

Read Full Post »

Imran Mohammed continues to help community of SQL Server with his very enthusiastic writing and deep understanding of SQL Server architecture. Let us read what Imran has to say about how Transaction Log works and Shrinking of Log works.
Question from lauraV
Please help me understand. I am taking a full backup once a day, and transaction [...]

Read Full Post »

Just a day ago I received question from reader who just installed SQL Server 2008. After installation user did not find any samples database along with installation. User want to install samples database which he is very much used to.
Sample database are now moved to Microsoft’s opensource site of Codeplex. Visit following link to visit [...]

Read Full Post »

Just a day ago I received following email
“Dear Pinal,
While I was exploring my computer in directory C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data I have found database mssqlsystemresource. What is mssqlsystemresource?
Thanks,
Joseph Kazeka”
Simple question like this are very interesting. mssqlsystemresource is Resource Database. It is read only database and contains system objects (i.e. sys.objects, sys.modules and other sys schema [...]

Read Full Post »

ERROR : 9004 An error occurred while processing the log for database.
If possible, restore from backup.
If a backup is not available, it might be necessary to rebuild the log.
If you receive above error it means you are in great trouble. This error occurs when database is attempted to attach and it does not get attached. [...]

Read Full Post »

In my previous article SQL SERVER - 2008 - Introduction to New Feature of Backup Compression I wrote about Row Compression and I have received many request to write in detail about Row Compression. I like when I get request about any subject to write about from my readers.
Row Compression feature apply to zeros and [...]

Read Full Post »

Backup and Data Storage is my most favorite subject and I have not written about this for some time. I was experimenting with new feature of SQL Server 2008 and I come across very interesting feature of Backup compression.
Let us see example of Database AdventureWorks with and without compression. After taking backup with compression enabled [...]

Read Full Post »

It is really very bad of person to laugh on others misfortune, however dark humor is based on the same concept. It has been long time since I wrote something funny on this blog. Recently, I have came across forum discussion regarding backup misery of one of the developer. I feel very sorry for the [...]

Read Full Post »

Blog reader Donald Crowther has posted following comment. I have not tested this solution and when I tried to test it, it did not work for me. However, I have received email from two of my Jr. DBA who have done experiment about this and they are suggesting it works.
If you have tried everything and [...]

Read Full Post »

I am very pleased to write my 500th post. After 500 posts, I still have same feeling when I wrote first post on this blog. I would like to thank my family for their continuous support in writing this blog. Most of all I want to thank all of YOU for being wonderful readers of [...]

Read Full Post »

Read my article in SQL Server Magazine January 2007 Edition
I will be not able to post complete article here due to copyright issues. Please visit the link above to read the article.

Read Full Post »

I have been receiving following question again and again either through email or through comments on this blog.
My log file is too big, what should I do?
Answer to this question is in three steps.

Backup the log file to any device.
Truncate the log file.
Shrink the log file.

I have previously written two article about this issue. Refer [...]

Read Full Post »

About a year ago, I wrote SQL SERVER - Shrinking Truncate Log File - Log Full. I was just going through some of the earlier posts and comments on this blog and one particular comment by Praveen Barath caught my eye. It is very good explanation. I am copying complete explanation here with full credit [...]

Read Full Post »

I really enjoyed writing about SQL SERVER - 2005 - Create Script to Copy Database Schema and All The Objects - Stored Procedure, Functions, Triggers, Tables, Views, Constraints and All Other Database Objects. Since then the I have received question that how to copy data as well along with schema. The answer to this is [...]

Read Full Post »

DBCC CHECKDB checks the logical and physical integrity of all the objects in the specified database. If DBCC CHECKDB ran on database user should not run DBCC CHECKALLOC, DBCC CHECKTABLE, and DBCC CHECKCATALOG on database as DBCC CHECKDB includes all the three command. Usage of these included DBCC commands is listed below.
DBCC CHECKALLOC - [...]

Read Full Post »

SQL SERVER - Cursor to Kill All Process in Database
SQL SERVER - Find Stored Procedure Related to Table in Database - Search in All Stored procedure
SQL SERVER - Shrinking Truncate Log File - Log Full
SQL SERVER - Simple Example of Cursor
SQL SERVER - UDF - Function to Convert Text String to Title Case - Proper [...]

Read Full Post »

I have received following questions many times. I will list all the questions here and answer them together.
What is the purpose of Master database?
Should we backup Master database?
Which database is must have database for SQL Server for startup?
Which are the default system database created when SQL Server 2005 is installed for first time?
What happens if [...]

Read Full Post »

Backup & Recovery [ILLUSTRATED] (Paperback)
by W. Curtis Preston (Author)

Link to Amazon (This is not affiliate Link)
Short Summary:
This book’s does not only teaches you have to create safe backup but it takes you to the next level where a large organization can save tons of dollars a year by making their backup and restore faster and [...]

Read Full Post »

Our Jr. DBA ran to me with this error just a few days ago while restoring the database.
Error 3154: The backup set holds a backup of a database other than the existing database.
Solution is very simple and not as difficult as he was thinking. He was trying to restore the database on another existing active [...]

Read Full Post »

Older Posts »