<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Journey to SQL Authority with Pinal Dave &#187; SQL Backup and Restore</title>
	<atom:link href="http://blog.sqlauthority.com/category/sql-backup-and-restore/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sqlauthority.com</link>
	<description>Notes of a SQL Server MVP and Database Administrator</description>
	<lastBuildDate>Sat, 21 Nov 2009 01:30:19 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='blog.sqlauthority.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/08e35387c05b61340e885b1763a69d9f?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>Journey to SQL Authority with Pinal Dave &#187; SQL Backup and Restore</title>
		<link>http://blog.sqlauthority.com</link>
	</image>
			<item>
		<title>SQL SERVER &#8211; Mirrored Backup and Restore and Split File Backup</title>
		<link>http://blog.sqlauthority.com/2009/09/02/sql-server-mirrored-backup-and-restore-and-split-file-backup-2/</link>
		<comments>http://blog.sqlauthority.com/2009/09/02/sql-server-mirrored-backup-and-restore-and-split-file-backup-2/#comments</comments>
		<pubDate>Wed, 02 Sep 2009 01:30:16 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[Pinal Dave]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Backup and Restore]]></category>
		<category><![CDATA[SQL Data Storage]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Scripts]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[SQLServer]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=6660</guid>
		<description><![CDATA[Introduction
This article is based on a real life experience of the author while working with database backup and restore during his consultancy work for various organizations. We will go over the following important concepts of database backup and restore.

Conventional Backup and Restore
Spilt File Backup and Restore
Mirror File Backup
Understanding FORMAT Clause
Miscellaneous details about Backup and Restore

Note: [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&blog=668536&post=6660&subd=sqlauthority&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><h3 style="text-align:justify;">Introduction</h3>
<p style="text-align:justify;">This article is based on a real life experience of the author while working with database backup and restore during his consultancy work for various organizations. We will go over the following important concepts of database backup and restore.</p>
<ol style="text-align:justify;">
<li>Conventional Backup and Restore</li>
<li>Spilt File Backup and Restore</li>
<li>Mirror File Backup</li>
<li>Understanding FORMAT Clause</li>
<li>Miscellaneous details about Backup and Restore</li>
</ol>
<div style="text-align:justify;"><strong>Note: </strong>Before running all the examples, make sure that you have the required folders created on your drive. It is mandatory to create Backup folders prior to creating backup files using SQL Server.</div>
<p style="text-align:justify;">In our example, we will require the following folders:</p>
<ul style="text-align:justify;">
<li>C:\Backup\SingleFile</li>
<li>C:\Backup\MultiFile</li>
<li>C:\Backup\MirrorFile</li>
</ul>
<h3 style="text-align:justify;">Conventional and Split File Backup and Restore</h3>
<p style="text-align:justify;">Just a day before working on one of the projects, I had to take a backup of one database of 14 GB. My hard drive lacked sufficient space at that moment. Fortunately, I had two 8 GB USB Drives with me. Now, the question was how to take a backup in two equal sizes, each of 7 GB, so I can fit them on each USB drive. Well, conventional backup takes one large backup in one file. However, SQL Server backup command can take backups in two or more split parts.</p>
<p style="text-align:justify;">Let us see an example of a conventional one-file backup using the AdventureWorks database.</p>
<div id="highlighter_735873" style="text-align:justify;"><code style="font-size:12px;"><span style="color:blue;">BACKUP DATABASE </span><span style="color:black;">AdventureWorks<br />
</span><span style="color:blue;">TO DISK = </span><span style="color:red;">'C:\Backup\SingleFile\AdventureWorks.bak'<br />
</span><span style="color:black;">GO </span></code></div>
<p style="text-align:justify;">The result is displayed below. Here, the backup is taken in a single file.</p>
<p style="text-align:justify;"><img src="http://www.pinaldave.com/bimg/sqlmirror/sql-mirrored-backup1.jpg" alt="" /></p>
<p style="text-align:justify;">Now, let us see how we can split one database into two different database files. This method is very similar to taking a single-file backup. By simply adding an additional DISK option we can split the files backup files.</p>
<div id="highlighter_539944" style="text-align:justify;"><code style="font-size:12px;"><span style="color:blue;">BACKUP DATABASE </span><span style="color:black;">AdventureWorks<br />
</span><span style="color:blue;">TO DISK = </span><span style="color:red;">'C:\Backup\MultiFile\AdventureWorks1.bak'</span><span style="color:gray;">,<br />
</span><span style="color:blue;">DISK = </span><span style="color:red;">'C:\Backup\MultiFile\AdventureWorks2.bak'</span><span style="color:gray;">,<br />
</span><span style="color:blue;">DISK = </span><span style="color:red;">'C:\Backup\MultiFile\AdventureWorks3.bak'<br />
</span><span style="color:black;">GO<br />
</span></code></div>
<p style="text-align:justify;">In the previous example, we can clearly see that backup is split into three equal parts of the original backup file size.</p>
<p style="text-align:justify;"><img src="http://www.pinaldave.com/bimg/sqlmirror/sql-mirrored-backup2.jpg" alt="" /></p>
<p style="text-align:justify;">Restoring a backup from a single-file backup is quite easy. Let us go over an example where we restore the AdventureWorks database from a single backup file.</p>
<div id="highlighter_977297" style="text-align:justify;"><code style="font-size:12px;"><span style="color:blue;">RESTORE DATABASE </span><span style="color:black;">AdventureWorks<br />
</span><span style="color:blue;">FROM DISK = </span><span style="color:red;">'C:\Backup\SingleFile\AdventureWorks.bak'<br />
</span><span style="color:black;">GO<br />
</span></code></div>
<p style="text-align:justify;">Running the above script will give a successful message.</p>
<p style="text-align:justify;"><img src="http://www.pinaldave.com/bimg/sqlmirror/sql-mirrored-backup3.jpg" alt="" /></p>
<p style="text-align:justify;">Now let us see an example where we restore a database from a split file. This method is very similar to restoring a database from a single file; just add an additional DISK option.</p>
<div id="highlighter_737278" style="text-align:justify;"><code style="font-size:12px;"><span style="color:blue;">RESTORE DATABASE </span><span style="color:black;">[AdventureWorks]<br />
</span><span style="color:blue;">FROM DISK = </span><span style="color:red;">N'C:\Backup\MultiFile\AdventureWorks1.bak'</span><span style="color:gray;">,<br />
</span><span style="color:blue;">DISK = </span><span style="color:red;">N'C:\Backup\MultiFile\AdventureWorks2.bak'</span><span style="color:gray;">,<br />
</span><span style="color:blue;">DISK = </span><span style="color:red;">N'C:\Backup\MultiFile\AdventureWorks3.bak'<br />
</span><span style="color:black;">GO </span></code></div>
<p style="text-align:justify;">Running the above script will give a successful message as shown in the image below.</p>
<p style="text-align:justify;"><img src="http://www.pinaldave.com/bimg/sqlmirror/sql-mirrored-backup4.jpg" alt="" /></p>
<p style="text-align:justify;">Make sure that while restoring database, the database is not in use, otherwise it will give an error of database in use. In the event of an error taking place, close all the connections and re-attempt to restore the database.</p>
<h3 style="text-align:justify;">Mirror Backup of the file</h3>
<p style="text-align:justify;">It is quite a common practice to create an exact copy of the backup and store it to several places to deal with any catastrophes which might affect the place where the database is stored. Once a full backup is accomplished DBAs generally copy the database to another location in their network using a third party tools like <em>robocopy </em> or native DOS commands like xcopy.</p>
<p style="text-align:justify;">In SQL Server 2005 and later versions, there is a Mirror command that makes a copy of the database backup to different locations while taking the original backup. The maximum limit of additional locations that can be specified with MIRROR clause is 3.</p>
<p style="text-align:justify;">Mirrored backup can be taken in local computer system as well as in a local network. Let us now see two examples of mirror backup.</p>
<h4 style="text-align:justify;">Example 1. Single File Backup to Multiple Locations using Mirror</h4>
<div id="highlighter_236370" style="text-align:justify;"><code style="font-size:12px;"><span style="color:blue;">BACKUP DATABASE </span><span style="color:black;">AdventureWorks<br />
</span><span style="color:blue;">TO DISK = </span><span style="color:red;">'C:\Backup\SingleFile\AdventureWorks.bak'<br />
</span><span style="color:black;">MIRROR </span><span style="color:blue;">TO DISK = </span><span style="color:red;">'C:\Backup\MirrorFile\AdventureWorks.bak'<br />
</span><span style="color:blue;">WITH </span><span style="color:black;">FORMAT<br />
GO<br />
</span></code></div>
<p style="text-align:justify;">If this command is being run for the first time, it is mandatory to use the <code>WITH FORMAT </code> clause; but for sub sequential runs it is not required. <code>WITH FORMAT </code> reinitializes the backup.</p>
<p style="text-align:justify;"><img src="http://www.pinaldave.com/bimg/sqlmirror/sql-mirrored-backup5.jpg" alt="" /></p>
<p style="text-align:justify;">When checked in both the folders ‘SingleFile’ and ‘MirrorFile’, backup files are exactly the same files. As mentioned earlier, four mirror backup can be specified in total.</p>
<h4 style="text-align:justify;">Example 2. Split File Backup to Multiple Locations using Mirror</h4>
<p style="text-align:justify;">We have earlier seen an example where we can have multiple split files of large database backup files. SQL Server Mirror functionality also supports backup of the split files.</p>
<div id="highlighter_897158" style="text-align:justify;"><code style="font-size:12px;"><span style="color:blue;">BACKUP DATABASE </span><span style="color:black;">AdventureWorks<br />
</span><span style="color:blue;">TO DISK = </span><span style="color:red;">'C:\Backup\MultiFile\AdventureWorks1.bak'</span><span style="color:gray;">,<br />
</span><span style="color:blue;">DISK = </span><span style="color:red;">'C:\Backup\MultiFile\AdventureWorks2.bak'</span><span style="color:gray;">,<br />
</span><span style="color:blue;">DISK = </span><span style="color:red;">'C:\Backup\MultiFile\AdventureWorks3.bak'<br />
</span><span style="color:black;">MIRROR </span><span style="color:blue;">TO DISK = </span><span style="color:red;">'C:\Backup\MirrorFile\AdventureWorks1.bak'</span><span style="color:gray;">,<br />
</span><span style="color:blue;">DISK = </span><span style="color:red;">'C:\Backup\MirrorFile\AdventureWorks2.bak'</span><span style="color:gray;">,<br />
</span><span style="color:blue;">DISK = </span><span style="color:red;">'C:\Backup\MirrorFile\AdventureWorks3.bak'<br />
</span><span style="color:blue;">WITH </span><span style="color:black;">FORMAT<br />
GO<br />
</span></code></div>
<p style="text-align:justify;">All the mirror sets will need the same number of <code>DISK </code> clauses as the original backup media.</p>
<p style="text-align:justify;"><img src="http://www.pinaldave.com/bimg/sqlmirror/sql-mirrored-backup6.jpg" alt="" /></p>
<p style="text-align:justify;">Mirrored database backup can be restored using the same method as the original backup. Mirrored backup is in fact an exact replica of the original backup.</p>
<h3 style="text-align:justify;">Understanding the FORMAT Clause</h3>
<p style="text-align:justify;">The <code>FORMAT </code> clause is used to reinitiate a backup media. Although it is a very useful clause it should be used with caution. When the clause is used it erases everything present in backup media. I have noticed that some DBAs are confused while taking a backup on a local disk where they have SQL Server installed. They have a misconception that if the format command is used, it will erase the complete disk including the SQL Server installation. However, the fact is that SQL Server format clause is quite different from OS format. The effect of SQL Server format clause is limited to a folder or path specified in the <code>DISK </code> clause.</p>
<p style="text-align:justify;">In our example, when the <code>FORMAT </code> clause is specified, it will format only folders like C:\Backup\MultiFile\ or C:\Backup\SingleFile.</p>
<h3 style="text-align:justify;">Related Errors</h3>
<h4 style="text-align:justify;"><strong><span style="color:#ff0000;">Error 3010<em><br />
Invalid backup mirror specification. All mirrors must have the same number of members.</em></span></strong></h4>
<p style="text-align:justify;">This error can show up while taking a mirrored database backup along with a regular backup; and <code>DISK </code> and <code>MIRROR TO DISK </code> do not match accurately.</p>
<p style="text-align:justify;">The following image demonstrates how the error takes place.</p>
<p style="text-align:justify;"><img src="http://www.pinaldave.com/bimg/sqlmirror/sql-mirrored-backup7.jpg" alt="" /></p>
<p style="text-align:justify;">To fix the error, match the members of <code>DISK </code> and <code>MIRROR TO DISK </code> to each other.</p>
<p style="text-align:justify;"><img src="http://www.pinaldave.com/bimg/sqlmirror/sql-mirrored-backup8.jpg" alt="" /></p>
<h4 style="text-align:justify;"><span style="color:#ff0000;">Error 3215<em><br />
Use WITH FORMAT to create a new mirrored backup set</em></span></h4>
<p style="text-align:justify;">This error can spring up when a new backup is initiated and an existing media header needs to be reset for all headers on the backup media. If there is already a backup on the media, it will display this error and prevent backup from being overwritten. To fix this error, use <code>WITH FORMAT </code> as shown in an earlier example.</p>
<h3 style="text-align:justify;">Miscellaneous details about Backup and Restore</h3>
<p style="text-align:justify;">When no options are specified, <code>BACKUP DATABASE </code> takes only full backups. Before taking the first log backup, full database backup is necessary to take one full backup. Backups created on later versions of SQL Server cannot be restored to earlier versions of SQL Server. The user needs permissions of <code>sysadmin </code> or <code>db_owner </code> or <code>db_backupoperator </code> roles to perform backup operation.</p>
<p style="text-align:justify;">Reference : <strong>Pinal Dave (</strong><a href="http://blog.sqlauthority.com/" target="_blank"><strong>http://blog.sqlauthority.com</strong></a><strong>),</strong> <a href="http://dotnetslackers.com/articles/sql/Mirrored-Backup-and-Restore-and-Split-File-Backup.aspx" target="_blank">DNS</a></p>
Posted in Pinal Dave, SQL, SQL Authority, SQL Backup and Restore, SQL Data Storage, SQL Query, SQL Scripts, SQL Server, SQL Tips and Tricks, SQLServer, T SQL, Technology  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/6660/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/6660/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/6660/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/6660/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/6660/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/6660/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/6660/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/6660/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/6660/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/6660/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&blog=668536&post=6660&subd=sqlauthority&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2009/09/02/sql-server-mirrored-backup-and-restore-and-split-file-backup-2/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>

		<media:content url="http://www.pinaldave.com/bimg/sqlmirror/sql-mirrored-backup1.jpg" medium="image" />

		<media:content url="http://www.pinaldave.com/bimg/sqlmirror/sql-mirrored-backup2.jpg" medium="image" />

		<media:content url="http://www.pinaldave.com/bimg/sqlmirror/sql-mirrored-backup3.jpg" medium="image" />

		<media:content url="http://www.pinaldave.com/bimg/sqlmirror/sql-mirrored-backup4.jpg" medium="image" />

		<media:content url="http://www.pinaldave.com/bimg/sqlmirror/sql-mirrored-backup5.jpg" medium="image" />

		<media:content url="http://www.pinaldave.com/bimg/sqlmirror/sql-mirrored-backup6.jpg" medium="image" />

		<media:content url="http://www.pinaldave.com/bimg/sqlmirror/sql-mirrored-backup7.jpg" medium="image" />

		<media:content url="http://www.pinaldave.com/bimg/sqlmirror/sql-mirrored-backup8.jpg" medium="image" />
	</item>
		<item>
		<title>SQL SERVER &#8211; Backup master Database Interval &#8211; master Database Best Practices</title>
		<link>http://blog.sqlauthority.com/2009/08/12/sql-server-backup-master-database-interval-master-database-best-practices/</link>
		<comments>http://blog.sqlauthority.com/2009/08/12/sql-server-backup-master-database-interval-master-database-best-practices/#comments</comments>
		<pubDate>Wed, 12 Aug 2009 01:30:32 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[Best Practices]]></category>
		<category><![CDATA[Pinal Dave]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Backup and Restore]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[SQLServer]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=6578</guid>
		<description><![CDATA[During a recent consultancy project, I was asked to review a Database Backup plan. While going through the plan, I noticed that there was no backup for the master database. When I questioned this, the DBA informed me that it was not necessary. I was startled and couldn’t resist explaining to him that the master [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&blog=668536&post=6578&subd=sqlauthority&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p style="text-align:justify;">During a recent consultancy project, I was asked to review a Database Backup plan. While going through the plan, I noticed that there was no backup for the master database. When I questioned this, the DBA informed me that it was not necessary. I was startled and couldn’t resist explaining to him that the master database contains all the logon accounts details, as well as all the system-level database configuration. He was a little astounded and asked me to tell him at what intervals he should backup the master database. The discussion that followed was very thought provoking and I would like to share the major points with you:</p>
<ul style="text-align:justify;">
<li>The master database is the most      important database of all and the most recent version of the backup should      be available in the case of disaster.</li>
<li>Backup of the master database      should be made for:
<ul>
<li>Changing server-level       configuration settings;</li>
<li>Changing database-level       configuration settings; and</li>
<li>Changing any logon accounts details.</li>
</ul>
</li>
</ul>
<p style="text-align:justify;">On further observation of his master database, I found that he has some system maintenance Stored Procedure created in the master database. This should not be the case. The master database should not contain any user-created objects. Users should not be required to modify or create anything in the master database. The real purpose of the master database is for the SQL Server to maintain itself. Users only need to make backups and restore when needed.</p>
<p style="text-align:justify;">Do you backup your master database? Please leave your comments here.</p>
<p style="text-align:justify;">Reference : <strong>Pinal Dave (</strong><a href="http://blog.sqlauthority.com/" target="_blank"><strong>http://blog.SQLAuthority.com</strong></a><strong>)</strong></p>
<p style="text-align:justify;">
Posted in Best Practices, Pinal Dave, SQL, SQL Authority, SQL Backup and Restore, SQL Query, SQL Server, SQL Tips and Tricks, SQLServer, T SQL, Technology  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/6578/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/6578/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/6578/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/6578/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/6578/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/6578/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/6578/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/6578/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/6578/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/6578/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&blog=668536&post=6578&subd=sqlauthority&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2009/08/12/sql-server-backup-master-database-interval-master-database-best-practices/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>
	</item>
		<item>
		<title>SQL SERVER &#8211; Four Different Ways to Find Recovery Model for Database</title>
		<link>http://blog.sqlauthority.com/2009/07/16/sql-server-four-different-ways-to-find-recovery-model-for-database/</link>
		<comments>http://blog.sqlauthority.com/2009/07/16/sql-server-four-different-ways-to-find-recovery-model-for-database/#comments</comments>
		<pubDate>Thu, 16 Jul 2009 01:30:26 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[Pinal Dave]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Backup and Restore]]></category>
		<category><![CDATA[SQL Data Storage]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Scripts]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=5915</guid>
		<description><![CDATA[Perhaps, the best thing about technical domain is that most of the things can be executed in more than one ways. It is always useful to know about the various methods of performing a single task. Today, we will observe four different ways to find out recovery model for any database.
Method 1
Right Click on Database [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&blog=668536&post=5915&subd=sqlauthority&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p style="text-align:justify;">Perhaps, the best thing about technical domain is that most of the things can be executed in more than one ways. It is always useful to know about the various methods of performing a single task. Today, we will observe four different ways to find out recovery model for any database.</p>
<p style="text-align:justify;"><strong>Method 1</strong></p>
<p style="text-align:justify;">Right Click on Database &gt;&gt; Go to Properties &gt;&gt; Go to Option. On the Right side you can find recovery model.</p>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/bimg/rm1.jpg" alt="" width="500" height="619" /></p>
<p style="text-align:justify;"><strong>Method 2</strong></p>
<p style="text-align:justify;">Click on the Database Node in Object Explorer. In Object Explorer Details, you can see the column Recovery Model.</p>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/bimg/rm2.jpg" alt="" width="500" height="290" /></p>
<p style="text-align:justify;"><strong>Method 3</strong></p>
<p style="text-align:justify;">This is a very easy method and it gives all the database information in one script.</p>
<p style="text-align:justify;"><code style="font-size:12px;"><span style="color:blue;">SELECT </span><span style="color:black;">name </span><span style="color:blue;">AS </span><span style="color:black;">[Database Name]</span><span style="color:gray;">,<br />
</span><span style="color:black;">recovery_model_desc </span><span style="color:blue;">AS </span><span style="color:black;">[Recovery Model]<br />
</span><span style="color:blue;">FROM </span><span style="color:black;">sys.databases<br />
GO</span></code>
</p>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/bimg/rm3.jpg" alt="" width="417" height="454" /></p>
<p style="text-align:justify;"><strong>Method 4</strong></p>
<p style="text-align:justify;">This method provides only one database at a time.</p>
<p style="text-align:justify;"><code style="font-size:12px;"><span style="color:blue;">SELECT </span><span style="color:red;">'ADVENTUREWORKS' </span><span style="color:blue;">AS </span><span style="color:black;">[Database Name]</span><span style="color:gray;">,<br />
</span><span style="color:magenta;">DATABASEPROPERTYEX</span><span style="color:gray;">(</span><span style="color:red;">'ADVENTUREWORKS'</span><span style="color:gray;">, </span><span style="color:red;">'RECOVERY'</span><span style="color:gray;">)<br />
</span><span style="color:blue;">AS </span><span style="color:black;">[Recovery Model]<br />
GO</span></code>
</p>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/bimg/rm4.jpg" alt="" width="489" height="187" /></p>
<p style="text-align:justify;"><strong>My recommendation </strong></p>
<p>Of all the above methods, I prefer Method 3. It is accurate and can be used in T-SQL code. Besides, I can use it for many other purposes as well.</p>
<p>I would like to know which one is your favorite method .</p>
<p style="text-align:justify;">Reference : <strong>Pinal Dave (<a href="http://blog.sqlauthority.com/" target="_blank">http://blog.SQLAuthority.com</a>)</strong></p>
Posted in Pinal Dave, SQL, SQL Authority, SQL Backup and Restore, SQL Data Storage, SQL Query, SQL Scripts, SQL Server, SQL Tips and Tricks, T SQL, Technology  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/5915/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/5915/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/5915/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/5915/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/5915/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/5915/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/5915/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/5915/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/5915/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/5915/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&blog=668536&post=5915&subd=sqlauthority&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2009/07/16/sql-server-four-different-ways-to-find-recovery-model-for-database/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>

		<media:content url="http://www.pinaldave.com/bimg/rm1.jpg" medium="image" />

		<media:content url="http://www.pinaldave.com/bimg/rm2.jpg" medium="image" />

		<media:content url="http://www.pinaldave.com/bimg/rm3.jpg" medium="image" />

		<media:content url="http://www.pinaldave.com/bimg/rm4.jpg" medium="image" />
	</item>
		<item>
		<title>SQL SERVER &#8211; Restore Sequence and Understanding NORECOVERY and RECOVERY</title>
		<link>http://blog.sqlauthority.com/2009/07/15/sql-server-restore-sequence-and-understanding-norecovery-and-recovery/</link>
		<comments>http://blog.sqlauthority.com/2009/07/15/sql-server-restore-sequence-and-understanding-norecovery-and-recovery/#comments</comments>
		<pubDate>Wed, 15 Jul 2009 01:30:29 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[Pinal Dave]]></category>
		<category><![CDATA[Readers Question]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Backup and Restore]]></category>
		<category><![CDATA[SQL Data Storage]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Scripts]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=5895</guid>
		<description><![CDATA[I maintain a spreadsheet of questions sent by users and from that I single out a topic to write and share my knowledge and opinion. Unless and until I find an issue appealing, I do not prefer to write about it, till the issue crosses the threshold. Today the question that crossed the threshold is [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&blog=668536&post=5895&subd=sqlauthority&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p style="text-align:justify;">I maintain a spreadsheet of questions sent by users and from that I single out a topic to write and share my knowledge and opinion. Unless and until I find an issue appealing, I do not prefer to write about it, till the issue crosses the threshold. Today the question that crossed the threshold is &#8211; <strong>what is the difference between NORECOERY and RECOVERY when restoring database.</strong></p>
<p style="text-align:justify;">The fact is that one can easily go to MSDN and learn the difference, so I head myself to MSDN and read the difference. This is what the Book On Line suggests <a href="http://msdn.microsoft.com/en-us/library/ms186858.aspx" target="_blank">here</a>.</p>
<p style="padding-left:60px;text-align:justify;"><em><strong> </strong></em></p>
<p style="padding-left:60px;text-align:justify;"><em>NORECOVERY specifies that roll back not occur. This allows roll forward to continue with the next statement in the sequence.<br />
In this case, the restore sequence can restore other backups and roll them forward.<br />
RECOVERY (the default) indicates that roll back should be performed after roll forward is completed for the current backup.<br />
Recovering the database requires that the entire set of data being restored (the roll forward set) is consistent with the database. If the roll forward set has not been rolled forward far enough to be consistent with the database and RECOVERY is specified, the Database Engine issues an error.</em>
</p>
<p style="text-align:justify;">Book On Line has very clearly explained the same subject and provides succinct explanation of the difference.</p>
<p style="text-align:justify;">In other words -</p>
<p style="text-align:justify;"><em><strong>While doing RESTORE Operation if you restoring database files, always use NORECOVER option as that will keep database in state where more backup file are restored. This will also keep database offline also to prevent any changes, which can create itegrity issues. Once all backup file is restored run RESTORE command with RECOVERY option to get database online and operational.</strong></em></p>
<p style="text-align:justify;">It is also important to be acquainted with the restore sequence of how full database backup is restored.</p>
<p style="text-align:justify;">First, restore full database backup, differential database backup and all transactional log backups WITH NORECOVERY Option. After that, bring back database online using WITH RECOVERY option.</p>
<p style="text-align:justify;">Following is the sample Restore Sequence</p>
<p style="text-align:justify;"><code style="font-size:12px;"><span style="color:blue;">RESTORE DATABASE DATABASE FROM </span><span style="color:black;">full_database_backup </span><span style="color:blue;">WITH </span><span style="color:black;">NORECOVERY</span><span style="color:gray;">;<br />
</span><span style="color:blue;">RESTORE DATABASE DATABASE FROM </span><span style="color:black;">differential_backup </span><span style="color:blue;">WITH </span><span style="color:black;">NORECOVERY</span><span style="color:gray;">;<br />
</span><span style="color:blue;">RESTORE </span><span style="color:magenta;">LOG </span><span style="color:blue;">DATABASE FROM </span><span style="color:black;">log_backup </span><span style="color:blue;">WITH </span><span style="color:black;">NORECOVERY</span><span style="color:gray;">;<br />
</span><span style="color:green;">-- Repeat this till you restore last log backup<br />
</span><span style="color:blue;">RESTORE DATABASE DATABASE WITH </span><span style="color:black;">RECOVERY</span><span style="color:gray;">;</span></code>
</p>
<p style="text-align:justify;">I hope now it is very clear to you all what is restore sequence and the difference between recovery options.</p>
<p style="text-align:justify;">Reference : <strong>Pinal Dave (<a href="http://blog.sqlauthority.com/" target="_blank">http://blog.SQLAuthority.com</a>)</strong></p>
Posted in Pinal Dave, Readers Question, SQL, SQL Authority, SQL Backup and Restore, SQL Data Storage, SQL Query, SQL Scripts, SQL Server, SQL Tips and Tricks, T SQL, Technology  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/5895/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/5895/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/5895/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/5895/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/5895/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/5895/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/5895/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/5895/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/5895/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/5895/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&blog=668536&post=5895&subd=sqlauthority&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2009/07/15/sql-server-restore-sequence-and-understanding-norecovery-and-recovery/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>
	</item>
		<item>
		<title>SQL SERVER &#8211; Backup Timeline and Understanding of Database Restore Process in Full Recovery Model</title>
		<link>http://blog.sqlauthority.com/2009/07/14/sql-server-backup-timeline-and-understanding-of-database-restore-process-in-full-recovery-model/</link>
		<comments>http://blog.sqlauthority.com/2009/07/14/sql-server-backup-timeline-and-understanding-of-database-restore-process-in-full-recovery-model/#comments</comments>
		<pubDate>Tue, 14 Jul 2009 01:30:19 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[Pinal Dave]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Backup and Restore]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[SQLServer]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=5875</guid>
		<description><![CDATA[I assume you all know that there are three types of Database Backup Models, so we will not discuss on this commonly known topic today. In fact, we will just talk about how to restore database that is in full recovery model.
In general, databases backup in full recovery mode are taken in three different kinds [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&blog=668536&post=5875&subd=sqlauthority&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p style="text-align:justify;">I assume you all know that there are three types of Database Backup Models, so we will not discuss on this commonly known topic today. In fact, we will just talk about how to restore database that is in full recovery model.</p>
<p style="text-align:justify;">In general, databases backup in full recovery mode are taken in three different kinds of database files.</p>
<ol style="text-align:justify;">
<li>Full Database Backup</li>
<li>Differential Database Backup</li>
<li>Log Backup</li>
</ol>
<p style="text-align:justify;">What really perplexes most people is differential database backup.</p>
<p style="text-align:justify;">Let me narrate here a real story. One of the DBAs in local city once called me up and laughingly said that he has just found something not smart about SQL Server Product Team in terms of database backup. I just could not believe this negative remark against SQL Server Product Team so I asked him to explain me what is it. He told me that in his opinion it is an extra step when it is about Differential Database backup. I asked him how he restores his database. He replied that he starts with first full database backup and then sequentially all log backups and differential database backups. He continued his explanation and said that he has figured something interesting; that is, if he does not restore all the differential database backups and only restores log backups it just works fine. According to him this is an unnecessary step.</p>
<p style="text-align:justify;">Well, I am extremely happy to say he is wrong. He has totally failed to understand the concept of differential database backup. I called up another friend in his company and told him this story and he found it funny too! He suggested that he will explain to my friend that he needs to do all differential backups first and then all log backups after the last differential backup. I was again amazed and didn’t know what to do. He was wrong too!</p>
<p style="text-align:justify;">After interacting with many DBAs I have realized that it is quite confusing to most of the people how differential database is useful and many are not aware of the correct method to restore full recovery model. Before I start explaining please understand the following diagram where I have demonstrated time line when a backup was taken.</p>
<p style="text-align:justify;">
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/bimg/backuptimeline.jpg" alt="" width="404" height="728" /></p>
<p style="text-align:justify;">Let us remember the golden rule for restore first.</p>
<p style="text-align:justify;"><strong>&#8216;After restoring full database backup, restore latest differential database backup and all the transaction log backup after that to get database to current state.&#8217;</strong></p>
<p style="text-align:justify;">From the above-listed rule, it is very clear that there is no need to restore all the differential database backups when restoring databases. You can only restore the latest Differential database backup. Differential database backup is the backup of all the changes made in database from last full backup; it is cumulative itself. That is the reason why the size of next differential database backup is much more than the previous differential database backup. All differential database backups contain all the data of previous differential database backups. You just have to restore the latest differential database backup and right after that install all the transaction database backups to bring database to the current state.</p>
<p style="text-align:justify;">If you do not want to have differential database backup and have all the transaction log backups, in that case, you will have to install all the transactional database backups, which will be very time consuming and is not recommended when disastrous situation is there and getting server back online is the priority. In this way, differential database backups are very useful to save time as well as are very convenient to restore database. Instead of restoring many transaction database logs, which needs to be done very carefully without missing a single transaction in between, this is very convenient.</p>
<p style="text-align:justify;">In our example, there are multiple paths to get server to the current state.</p>
<p style="text-align:justify;"><strong>Path 1 (SLOWEST)</strong> : Full Database Restore &gt;&gt; Log Backup 0_1 &gt;&gt; Log Backup 1_1 to all remaining logs.</p>
<p style="text-align:justify;"><strong>Path 2 :</strong> Full Database Restore &gt;&gt; Differential Database Backup 1 &gt;&gt; Log Backup 1_1 to all remaining logs.</p>
<p style="text-align:justify;"><strong>Path 3 (FASTEST)</strong> : Full Database Restore &gt;&gt; Differential Database Backup 2 &gt;&gt; Log Backup 2_1 to all remaining logs.</p>
<p style="text-align:justify;">Let me know if my explanation is clear to you all. If there is any confusion regarding how full database backup restore works then do inform me.</p>
<p style="text-align:justify;">Reference : <strong>Pinal Dave (<a href="http://blog.sqlauthority.com/" target="_blank">http://blog.SQLAuthority.com</a>)</strong></p>
Posted in Pinal Dave, SQL, SQL Authority, SQL Backup and Restore, SQL Query, SQL Server, SQL Tips and Tricks, SQLServer, T SQL, Technology  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/5875/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/5875/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/5875/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/5875/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/5875/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/5875/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/5875/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/5875/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/5875/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/5875/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&blog=668536&post=5875&subd=sqlauthority&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2009/07/14/sql-server-backup-timeline-and-understanding-of-database-restore-process-in-full-recovery-model/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>

		<media:content url="http://www.pinaldave.com/bimg/backuptimeline.jpg" medium="image" />
	</item>
		<item>
		<title>SQL SERVER &#8211; Standby Servers and Types of Standby Servers</title>
		<link>http://blog.sqlauthority.com/2009/07/11/sql-server-standby-servers-and-types-of-standby-servers/</link>
		<comments>http://blog.sqlauthority.com/2009/07/11/sql-server-standby-servers-and-types-of-standby-servers/#comments</comments>
		<pubDate>Sat, 11 Jul 2009 01:30:32 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[Pinal Dave]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Backup and Restore]]></category>
		<category><![CDATA[SQL Data Storage]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=5849</guid>
		<description><![CDATA[Standby servers - Standby Server is a type of server that can be brought online in a situation when Primary Server goes offline and application needs continuous (high) availability of the server. There is always a need to set up a mechanism where data and objects from primary server are moved to secondary (standby) server. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&blog=668536&post=5849&subd=sqlauthority&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p style="text-align:justify;"><strong>Standby servers </strong>- Standby Server is a type of server that can be brought online in a situation when Primary Server goes offline and application needs continuous (high) availability of the server. There is always a need to set up a mechanism where data and objects from primary server are moved to secondary (standby) server. This mechanism usually involves the process of moving backup from the primary server to the secondary server using T-SQL scripts. Often, database wizards are used to set up this process.</p>
<p style="text-align:justify;">We will now glance at the various types of standby servers.</p>
<p style="text-align:justify;"><strong>Hot Standby</strong> &#8211; Hot Standby can be achieved in SQL Server using SQL Server 2005 Enterprise Edition and the later enterprise versions. SQL Server 2005 has introduced Mirroring of database that can be configured for automatic failover in a disaster situation. In the case of synchronous mirroring database is replicated to both the servers simultaneously.  This is a little expensive but provides the best high availability. In this case, both primary and standby servers have same data all the time.</p>
<p style="text-align:justify;"><strong>Warm Standby</strong> – In Warm Standby automatic failover is not configured. This is usually set up using Log Shipping or asynchronous mirroring. Sometimes warm standby is lagging by a few minutes or seconds, which results into loss of few latest updates when primary server fails and newer server needs to be failed over. Sometimes warm server that is lagging by a few transactions is brought back to the current state by applying recent transaction log.</p>
<p style="text-align:justify;"><strong>Cold Standby</strong> &#8211; Code Standby servers need to be switched manually, and sometimes all the backups as well as the required OS need to be applied. Cold Standby  just physically replaces the previous server.</p>
<p style="text-align:justify;">I am curious to know what do you all think about this these three types of standby servers. I am eager to know what kind of server setup you have at your workplace. If you can share these details, it will be very useful to all the readers. If I find your information interesting, I will create a new blog post with due credit to you.</p>
<p style="text-align:justify;">Reference : <strong>Pinal Dave (</strong><a href="http://blog.sqlauthority.com/" target="_blank"><strong>http://blog.SQLAuthority.com</strong></a><strong>)</strong></p>
Posted in Pinal Dave, SQL, SQL Authority, SQL Backup and Restore, SQL Data Storage, SQL Query, SQL Server, SQL Tips and Tricks, T SQL, Technology  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/5849/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/5849/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/5849/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/5849/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/5849/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/5849/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/5849/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/5849/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/5849/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/5849/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&blog=668536&post=5849&subd=sqlauthority&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2009/07/11/sql-server-standby-servers-and-types-of-standby-servers/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>
	</item>
		<item>
		<title>SQL SERVER &#8211; Restore or Attach Database Without .NDF or .MDF is Not Possible</title>
		<link>http://blog.sqlauthority.com/2009/04/10/sql-server-restore-or-attach-database-without-ndf-or-mdf-is-not-possible/</link>
		<comments>http://blog.sqlauthority.com/2009/04/10/sql-server-restore-or-attach-database-without-ndf-or-mdf-is-not-possible/#comments</comments>
		<pubDate>Fri, 10 Apr 2009 01:30:57 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[Pinal Dave]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Backup and Restore]]></category>
		<category><![CDATA[SQL Data Storage]]></category>
		<category><![CDATA[SQL Error Messages]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=4271</guid>
		<description><![CDATA[This article revolves around a trivial yet common issue. There might be a set of people for whom the current topic might appear to be insignificant. But I have been asked this question innumerable times, particularly from   people who are frequenting using forums or have blog related to storage and highly availability, which instigated me [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&blog=668536&post=4271&subd=sqlauthority&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p style="text-align:justify;">This article revolves around a trivial yet common issue. There might be a set of people for whom the current topic might appear to be insignificant. But I have been asked this question innumerable times, particularly from   people who are frequenting using forums or have blog related to storage and highly availability, which instigated me to write this article.</p>
<p style="text-align:justify;">Here goes this frequently asked question.</p>
<p style="text-align:justify;"><strong>Question:</strong> Is it possible to restore database if one of the files of .mdf (primary data file) or .ndf (secondary data file) is missing?</p>
<p style="text-align:justify;"><strong>Answer:</strong> In one word the answer is <strong>NO</strong>. All the .mdf and .ndf files are mandatory to attach or restore database successfully.  Even though  you have all the transactions stored in .ldf you will not be able to restore the database completely.</p>
<p>I hope this answer removes the cloud of doubt hovering over my targeted readers.</p>
<p style="text-align:justify;">Reference : <strong>Pinal Dave (<a href="http://blog.sqlauthority.com" target="_blank">http://blog.sqlauthority.com</a>)</strong></p>
<p style="text-align:justify;">
Posted in Database, Pinal Dave, SQL, SQL Authority, SQL Backup and Restore, SQL Data Storage, SQL Error Messages, SQL Query, SQL Server, SQL Tips and Tricks, T SQL, Technology  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/4271/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/4271/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/4271/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/4271/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/4271/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/4271/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/4271/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/4271/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/4271/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/4271/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&blog=668536&post=4271&subd=sqlauthority&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2009/04/10/sql-server-restore-or-attach-database-without-ndf-or-mdf-is-not-possible/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>
	</item>
		<item>
		<title>SQL SERVER &#8211; Mirrored Backup and Restore and Split File Backup</title>
		<link>http://blog.sqlauthority.com/2009/04/05/sql-server-mirrored-backup-and-restore-and-split-file-backup/</link>
		<comments>http://blog.sqlauthority.com/2009/04/05/sql-server-mirrored-backup-and-restore-and-split-file-backup/#comments</comments>
		<pubDate>Sun, 05 Apr 2009 01:30:04 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[Pinal Dave]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Backup and Restore]]></category>
		<category><![CDATA[SQL Data Storage]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Scripts]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=4670</guid>
		<description><![CDATA[Introduction
This article is based on a real life experience of the author while working with database backup and restore during his consultancy work for various organizations. We will go over the following important concepts of database backup and restore.

Conventional Backup and Restore
Spilt File Backup and Restore
Mirror File Backup
Understanding FORMAT Clause
Miscellaneous details about Backup and Restore

Conventional [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&blog=668536&post=4670&subd=sqlauthority&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><h3 style="text-align:justify;">Introduction</h3>
<p style="text-align:justify;">This article is based on a real life experience of the author while working with database backup and restore during his consultancy work for various organizations. We will go over the following important concepts of database backup and restore.</p>
<ol style="text-align:justify;">
<li>Conventional Backup and Restore</li>
<li>Spilt File Backup and Restore</li>
<li>Mirror File Backup</li>
<li>Understanding FORMAT Clause</li>
<li>Miscellaneous details about Backup and Restore</li>
</ol>
<h3 style="text-align:justify;">Conventional and Split File Backup and Restore</h3>
<p style="text-align:justify;">Just a day before working on one of the projects, I had to take a backup of one database of 14 GB. My hard drive lacked sufficient space at that moment. Fortunately, I had two 8 GB USB Drives with me. Now, the question was how to take a backup in two equal sizes, each of 7 GB, so I can fit them on each USB drive. Well, conventional backup takes one large backup in one file. However, SQL Server backup command can take backups in two or more split parts.</p>
<h3 style="text-align:justify;"><a href="http://dotnetslackers.com/articles/sql/Mirrored-Backup-and-Restore-and-Split-File-Backup.aspx" target="_blank">Read Complete Article here.</a></h3>
<p><strong>Reference : </strong><strong>Pinal Dave (<a href="http://blog.sqlauthority.com/" target="_blank">http://blog.SQLAuthority.com</a>)</strong></p>
Posted in Pinal Dave, SQL, SQL Authority, SQL Backup and Restore, SQL Data Storage, SQL Query, SQL Scripts, SQL Server, SQL Tips and Tricks, T SQL, Technology  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/4670/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/4670/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/4670/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/4670/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/4670/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/4670/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/4670/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/4670/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/4670/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/4670/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&blog=668536&post=4670&subd=sqlauthority&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2009/04/05/sql-server-mirrored-backup-and-restore-and-split-file-backup/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>
	</item>
		<item>
		<title>SQL SERVER &#8211; Very Powerful and Feature-Rich Backup, Zip and FTP Utility SQLBackupAndFTP</title>
		<link>http://blog.sqlauthority.com/2009/04/02/sql-server-very-powerful-and-feature-rich-backup-zip-and-ftp-utility-sqlbackupandftp/</link>
		<comments>http://blog.sqlauthority.com/2009/04/02/sql-server-very-powerful-and-feature-rich-backup-zip-and-ftp-utility-sqlbackupandftp/#comments</comments>
		<pubDate>Thu, 02 Apr 2009 01:30:35 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[Pinal Dave]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Add-On]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Backup and Restore]]></category>
		<category><![CDATA[SQL Data Storage]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[SQL Utility]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[FTP]]></category>

		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=4206</guid>
		<description><![CDATA[It goes without saying that Database Backup is the most important task for any Database Administrator (DBA). Naturally, large organizations always have a team of DBAs who execute Database Backup tasks. No matter how big or small an organization is, the importance of database backup remains the same across the board. It’s a common practice [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&blog=668536&post=4206&subd=sqlauthority&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p style="text-align:justify;">It goes without saying that Database Backup is the most important task for any Database Administrator (DBA). Naturally, large organizations always have a team of DBAs who execute Database Backup tasks. No matter how big or small an organization is, the importance of database backup remains the same across the board. It’s a common practice in several organizations to upload the backup to their remote location for additional safety. I totally vouch for this safety measure of having their additional backup on remote/satellite location. This redundancy comes in handy whenever a catastrophe of not having proper backup surfaces abruptly.</p>
<p style="text-align:justify;">While I was searching online for a very simple solution for one of my clients, I came across a small-sized but feature-rich application from <strong><a href="http://www.SqlBackupAndFTP.com" target="_blank">SqlBackupAndFTP.com</a></strong>. This practical application has been created by Pranas.NET (<a href="http://pranas.net" target="_blank">http://pranas.net</a>) I have made extensive use of this tool for some time now and undoubtedly, this tool is very impressive by all standards!</p>
<p style="text-align:justify;">To put it simply, <a href="http://www.SqlBackupAndFTP.com" target="_blank"><strong>SQLBackupAndFTP</strong> </a>is MS SQL Server backup software. This tool performs several tasks such as running scheduled backups of SQL Server or SQL Server Express databases, zipping the backups, storing them on a network or on a FTP server, removing old backups, and finally, sending an e-mail confirmation on job&#8217;s success or failure. Besides, SQLBackupAndFTP Free is freeware, which is free from any spyware. Best of all, this ingeniously simple tool is extremely affordable for all. You just need to install it on the server and you can get up and running really fast.</p>
<p style="text-align:justify;">Given below are some important tasks which this tool can perform using daily scheduler:<br />
•    Backup SQL Server Database<br />
•    Zip the backups<br />
•    Encrypt the backups<br />
•    FTP the backups to remove FTP server<br />
•    Move file to local area network<br />
•    Send final status of tasks in email.
</p>
<p style="text-align:justify;">Let us now see how we can take backup and move it to the desired folder.</p>
<p style="text-align:justify;"><strong>Image 1: </strong>First, connect to the desired server.<br />
<img class="alignnone" src="http://www.pinaldave.com/bimg/backup1.jpg" alt="" width="482" height="675" /></p>
<p style="text-align:justify;"><strong>Image 2:</strong> As you can see, all the settings are very easy as described in the following image. Pay attention to these very simple, one screen settings. From database selection to job scheduling, you can configure everything from this page itself.<br />
<img class="alignnone" src="http://www.pinaldave.com/bimg/backup2.jpg" alt="" width="500" height="451" /></p>
<p style="text-align:justify;"><strong>Image 3:</strong> This screen describes all the steps that are being performed. User can easily view the status of all the jobs &#8211; either success or failure &#8211; on this page.<br />
<img class="alignnone" src="http://www.pinaldave.com/bimg/backup3.jpg" alt="" width="500" height="247" /></p>
<p style="text-align:justify;"><strong>Image 4:</strong> The following screen displays the settings for advanced users who have to deal with large database.<br />
<img class="alignnone" src="http://www.pinaldave.com/bimg/backup4.jpg" alt="" width="500" height="648" /></p>
<p style="text-align:justify;"><strong>Image 5: </strong>This screen displays email regarding final status of tasks, which is sent to the user after task completion.<br />
<img class="alignnone" src="http://www.pinaldave.com/bimg/backup5.jpg" alt="" width="500" height="192" />
</p>
<p style="text-align:justify;">Now, a question that might baffle your mind is – how this tool is better than maintenance tasks available in SQL Server. Well, here goes the answer. Maintenance tasks are easy to set up for backups; however, SQLBackupAndFTP have integrated solution for encryption, FTP and email which make it superior to maintenance tasks in every aspect.</p>
<p style="text-align:justify;">I would like to present my unbiased view about this tool. At the same time, I want to give my readers a broad perspective about backup tools in general.  On comparing this tool with other backup tools I have experienced that it is not the fanciest tool to manage backups or check their health. This is one tool that smoothly performs the job in a few steps compared to native SQL Server backup, which takes numerous steps to execute the same job.</p>
<p style="text-align:justify;"><a href="http://www.SqlBackupAndFTP.com" target="_blank"><strong>SQLBackupAndFTP</strong></a> is best suited for developers/DBAs who just want to ensure that they have schedule job that takes care of backup and moves them to appropriate place. In fact, it is ideal for any SQL Server database where backups need to be sent every day to a remote FTP server. It saves maintenance time on any SQL Server version. Besides, it is especially useful for SQL Server Express 2005 and SQL Server Express 2008, as they lack built in tools for backup.</p>
<p style="text-align:justify;">This tool is compatible with almost all the known SQL Server versions. It works with SQL Server 2008 (all versions) and many of the previous versions.</p>
<p style="text-align:justify;">While testing this tool, I noticed that there are few limitations. It does not support differential or transaction backups. I also found that this tool only works on local SQL Server instances and cannot connect to another SQL Server on LAN. When I contacted support, I came to know that they are planning to release its updated version in April 2009, which will not have any such limitations.</p>
<p style="text-align:justify;">I strongly recommend this tool to all the DBAs. They must try it as it is absolutely free and does exactly what it promises. You can <strong><a href="http://sqlbackupandftp.com/download/SqlBakSetup.exe" target="_blank">download your free copy</a></strong> of the tool from here.</p>
<p style="text-align:justify;">Please share your experience about using this tool. I am eager to receive your feedback regarding this article.</p>
<p style="text-align:justify;">Reference : <strong>Pinal Dave (<a href="http://blog.sqlauthority.com/" target="_blank">http://blog.sqlauthority.com</a>)</strong></p>
Posted in Database, Pinal Dave, SQL, SQL Add-On, SQL Authority, SQL Backup and Restore, SQL Data Storage, SQL Query, SQL Server, SQL Tips and Tricks, SQL Utility, T SQL, Technology Tagged: FTP <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/4206/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/4206/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/4206/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/4206/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/4206/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/4206/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/4206/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/4206/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/4206/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/4206/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&blog=668536&post=4206&subd=sqlauthority&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2009/04/02/sql-server-very-powerful-and-feature-rich-backup-zip-and-ftp-utility-sqlbackupandftp/feed/</wfw:commentRss>
		<slash:comments>21</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>

		<media:content url="http://www.pinaldave.com/bimg/backup1.jpg" medium="image" />

		<media:content url="http://www.pinaldave.com/bimg/backup2.jpg" medium="image" />

		<media:content url="http://www.pinaldave.com/bimg/backup3.jpg" medium="image" />

		<media:content url="http://www.pinaldave.com/bimg/backup4.jpg" medium="image" />

		<media:content url="http://www.pinaldave.com/bimg/backup5.jpg" medium="image" />
	</item>
		<item>
		<title>SQL SERVER &#8211; Find Current Location of Data and Log File of All the Database</title>
		<link>http://blog.sqlauthority.com/2009/02/17/sql-server-find-current-location-of-data-and-log-file-of-all-the-database/</link>
		<comments>http://blog.sqlauthority.com/2009/02/17/sql-server-find-current-location-of-data-and-log-file-of-all-the-database/#comments</comments>
		<pubDate>Tue, 17 Feb 2009 01:30:45 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[Pinal Dave]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Backup and Restore]]></category>
		<category><![CDATA[SQL Documentation]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Scripts]]></category>
		<category><![CDATA[SQL Security]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL System Table]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=2593</guid>
		<description><![CDATA[As I am doing lots of experiments on my SQL Server test box, I sometime gets too many files in SQL Server data installation folder &#8211; the place where I have all the .mdf and .ldf files are stored. I often go to that folder and clean up all unnecessary files I have left there [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&blog=668536&post=2593&subd=sqlauthority&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p style="text-align:justify;">As I am doing lots of experiments on my SQL Server test box, I sometime gets too many files in SQL Server data installation folder &#8211; the place where I have all the .mdf and .ldf files are stored. I often go to that folder and clean up all unnecessary files I have left there taking up my hard drive space. I run following query to find out which .mdf and .ldf files are used and delete all other files. If your SQL Server is up and running OS will not let you delete .mdf and .ldf files any way giving you error that file already in use. This list also helps sometime to do documentation of which files are in being used by which database.</p>
<p style="text-align:justify;"><code style="font-size:12px;"><span style="color:blue;">SELECT </span><span style="color:black;">name</span><span style="color:gray;">, </span><span style="color:black;">physical_name </span><span style="color:blue;">AS </span><span style="color:black;">current_file_location<br />
</span><span style="color:blue;">FROM </span><span style="color:black;">sys.master_files</span></code>
</p>
<p style="text-align:justify;">Following is the output of files used by my SQL Server instance.</p>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/bimg/mastefiles.jpg" alt="" width="500" height="394" /></p>
<p style="text-align:justify;">Reference : <strong>Pinal Dave (</strong><a href="http://blog.SQLAuthority.com" target="_blank"><strong>http://blog.SQLAuthority.com</strong></a><strong>)</strong></p>
<p style="text-align:justify;">
Posted in Pinal Dave, SQL, SQL Authority, SQL Backup and Restore, SQL Documentation, SQL Query, SQL Scripts, SQL Security, SQL Server, SQL System Table, SQL Tips and Tricks, T SQL, Technology  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/2593/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/2593/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/2593/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/2593/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/2593/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/2593/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/2593/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/2593/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/2593/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/2593/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&blog=668536&post=2593&subd=sqlauthority&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2009/02/17/sql-server-find-current-location-of-data-and-log-file-of-all-the-database/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>

		<media:content url="http://www.pinaldave.com/bimg/mastefiles.jpg" medium="image" />
	</item>
		<item>
		<title>SQL SERVER &#8211; Reasons to Backup Master Database &#8211; Why Should Master Database Backedup</title>
		<link>http://blog.sqlauthority.com/2009/02/15/sql-server-reasons-to-backup-master-database-why-should-master-database-backedup/</link>
		<comments>http://blog.sqlauthority.com/2009/02/15/sql-server-reasons-to-backup-master-database-why-should-master-database-backedup/#comments</comments>
		<pubDate>Sun, 15 Feb 2009 01:30:06 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[Best Practices]]></category>
		<category><![CDATA[Pinal Dave]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Backup and Restore]]></category>
		<category><![CDATA[SQL Data Storage]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Security]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[SQL Utility]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=2582</guid>
		<description><![CDATA[The most interesting thing about writing blog at SQLAuthority.com is follow up question. Just a day before I wrote article about SQL SERVER &#8211; Restore Master Database &#8211; An Easy Solution, right following it, I received email from user requesting reason for importance of backing up master database.
Master database contains all the system level information [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&blog=668536&post=2582&subd=sqlauthority&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p style="text-align:justify;">The most interesting thing about writing blog at SQLAuthority.com is follow up question. Just a day before I wrote article about <strong><a href="http://blog.sqlauthority.com/2009/02/14/sql-server-restore-master-database-an-easy-solution/" target="_blank">SQL SERVER &#8211; Restore Master Database &#8211; An Easy Solution</a></strong>, right following it, I received email from user requesting reason for importance of backing up master database.</p>
<p style="text-align:justify;">Master database contains all the system level information of server. Information about all the login account, system configurations and information required to access all the other database are stored in master database. If master database is damaged, it will be difficult to use any other database in SQL Server and that makes it most important database of the SQL Server.</p>
<p style="text-align:justify;">Let us understand the important of the master database using an example. We will take example of SQL Server DBA and follow his timeline. Make sure to understand it correctly, as I have small question at the end of the timeline.</p>
<p style="text-align:justify;">9:00 AM &#8211; DBA takes backup of the master database.<br />
10:00 AM &#8211; DBA creates new Database named <em><strong>AfterMaster</strong></em>.<br />
11:00 AM &#8211; DBA restores the master database backup taken at 9:00 AM.<br />
12:00 PM &#8211; I have following two questions for the DBA :</p>
<p style="text-align:justify;"><em><strong>Question 1)</strong> What will be the state of the database AfterMaster? If AfterMaster database will be in active state after restoring master database?<br />
<strong>Question 2) </strong>What should be the next step after restoring master database?</em>
</p>
<p style="text-align:justify;">Let us understand the answer of question.</p>
<p style="text-align:justify;"><em><strong>Answer 1)</strong></em> Once master database is restored it will have no record of AfterMaster database in its system database and it will not recognize it.<br />
<em><strong>Answer 2)</strong></em> If master database is restored from backup all the operation which are done after last master database backup should be repeated in order to bring SQL Server in the current operational state. In our case, the database files (ldf and mdf) of AfterMaster database will still exists on server. They should be reattached to the server. You can search about how to attach mdf and ldf file at <strong><a href="http://search.sqlauthority.com" target="_blank">Search@SQLAuthority.com</a></strong>.
</p>
<p style="text-align:justify;">It is clear from our example that master database contains user login, files, filegroups and server wide settings.</p>
<p style="text-align:justify;">In summary, it is extremely important to take backup of the master database.</p>
<p style="text-align:justify;">Reference : <strong>Pinal Dave (</strong><a href="http://blog.SQLAuthority.com" target="_blank"><strong>http://blog.SQLAuthority.com</strong></a><strong>)</strong></p>
Posted in Best Practices, Pinal Dave, SQL, SQL Authority, SQL Backup and Restore, SQL Data Storage, SQL Query, SQL Security, SQL Server, SQL Tips and Tricks, SQL Utility, T SQL, Technology  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/2582/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/2582/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/2582/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/2582/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/2582/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/2582/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/2582/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/2582/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/2582/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/2582/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&blog=668536&post=2582&subd=sqlauthority&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2009/02/15/sql-server-reasons-to-backup-master-database-why-should-master-database-backedup/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>
	</item>
		<item>
		<title>SQL SERVER &#8211; Restore Master Database &#8211; An Easy Solution</title>
		<link>http://blog.sqlauthority.com/2009/02/14/sql-server-restore-master-database-an-easy-solution/</link>
		<comments>http://blog.sqlauthority.com/2009/02/14/sql-server-restore-master-database-an-easy-solution/#comments</comments>
		<pubDate>Sat, 14 Feb 2009 01:30:35 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[Pinal Dave]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Add-On]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Backup and Restore]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Scripts]]></category>
		<category><![CDATA[SQL Security]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[SQL Utility]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=2575</guid>
		<description><![CDATA[Today we will go over two step easy method to restore &#8216;master&#8217; database. It is really unusal to have need of restoring the master database. In very rare situation this need should arises. It is important to have full backup of master database, without full backup file of master database it can not be restored.
It [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&blog=668536&post=2575&subd=sqlauthority&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p style="text-align:justify;">Today we will go over two step easy method to restore &#8216;master&#8217; database. It is really unusal to have need of restoring the master database. In very rare situation this need should arises. It is important to have full backup of master database, without full backup file of master database it can not be restored.</p>
<p style="text-align:justify;">It is necessary to start SQL Server in single user mode before master database can be restored. It is very easy to start SQL Server server in single user mode. Follow the tutorial <strong><a href="http://blog.sqlauthority.com/2009/02/10/sql-server-start-sql-server-instance-in-single-user-mode/" target="_blank">SQL SERVER &#8211; Start SQL Server Instance in Single User Mode</a></strong>.</p>
<p style="text-align:justify;">Once SQL Server instance is running in single user mode, immediately connect it using sqlcmd and run following command to restore the master database.</p>
<p style="text-align:justify;"><code style="font-size:12px;"><span style="color:blue;">RESTORE DATABASE </span><span style="color:black;">master </span><span style="color:blue;">FROM DISK = </span><span style="color:red;">'C:\BackupLocation\master.back' </span><span style="color:blue;">WITH </span><span style="color:magenta;">REPLACE</span><span style="color:gray;">;<br />
</span><span style="color:black;">GO </span></code>
</p>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/bimg/restoremaster.jpg" alt="" width="500" height="251" /></p>
<p style="text-align:justify;">I have tested it couple of times and it has worked fine for me. If you encounter any error please leave a comment and I will do my best to solve it.</p>
<p style="text-align:justify;">Reference : <strong>Pinal Dave (</strong><a href="http://blog.SQLAuthority.com" target="_blank"><strong>http://blog.SQLAuthority.com</strong></a><strong>)</strong></p>
Posted in Pinal Dave, SQL, SQL Add-On, SQL Authority, SQL Backup and Restore, SQL Query, SQL Scripts, SQL Security, SQL Server, SQL Tips and Tricks, SQL Utility, T SQL, Technology  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/2575/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/2575/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/2575/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/2575/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/2575/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/2575/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/2575/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/2575/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/2575/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/2575/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&blog=668536&post=2575&subd=sqlauthority&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2009/02/14/sql-server-restore-master-database-an-easy-solution/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>

		<media:content url="http://www.pinaldave.com/bimg/restoremaster.jpg" medium="image" />
	</item>
		<item>
		<title>SQLAuthority Author Visit &#8211; Ahmedabad SQL Server User Group Meeting &#8211; November 2008</title>
		<link>http://blog.sqlauthority.com/2008/12/05/sqlauthority-author-visit-ahmedabad-sql-server-user-group-meeting-november-2008-2/</link>
		<comments>http://blog.sqlauthority.com/2008/12/05/sqlauthority-author-visit-ahmedabad-sql-server-user-group-meeting-november-2008-2/#comments</comments>
		<pubDate>Fri, 05 Dec 2008 01:30:49 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[Best Practices]]></category>
		<category><![CDATA[DBA]]></category>
		<category><![CDATA[Data Warehousing]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[MVP]]></category>
		<category><![CDATA[Pinal Dave]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Backup and Restore]]></category>
		<category><![CDATA[SQL Download]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Scripts]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[SQL User Group]]></category>
		<category><![CDATA[SQLAuthority Author Visit]]></category>
		<category><![CDATA[SQLAuthority News]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Openday]]></category>

		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=1608</guid>
		<description><![CDATA[Ahmedabad SQL Server User Group Meeting was organized on November 29, 2008 at famous C.G. Road in Ahmedabad. We had great response and wonderful back to back technical sessions. The highlight of whole meeting was participation of UG President Jacob Sebastian - SQL MVP from New York.
Meeting started with introduction and welcome to all the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&blog=668536&post=1608&subd=sqlauthority&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p style="text-align:justify;">Ahmedabad SQL Server User Group Meeting was organized on November 29, 2008 at famous C.G. Road in Ahmedabad. We had great response and wonderful back to back technical sessions. The highlight of whole meeting was participation of UG President <strong><a href="http://www.sqlserverandxml.com" target="_blank">Jacob Sebastian</a> </strong>- SQL MVP from New York.</p>
<p style="text-align:justify;">Meeting started with introduction and welcome to all the members from <strong>SQL Server MVP &#8211; <a href="http://blog.sqlauthority.com" target="_blank">Pinal Dave</a></strong><a href="http://blog.sqlauthority.com" target="_blank"> </a>and followed by technical session of <strong>&#8220;SQL Server 2008 &#8211; Backup and Compression&#8221;</strong> by Pinal Dave. This session was very special because not every database user is aware of the special feature of SQL Server 2008 and how it can improve the life of SQL Administrator.</p>
<p style="text-align:justify;"><strong><a href="http://www.pinaldave.com/bimg/SQLAuthorityUGNov2008.pdf" target="_blank">Download the PDF of the SQL Server Presentation</a></strong></p>
<p style="text-align:justify;"><em>[Please leave a comment in this thread if you are interested in SQL script which I had used in this demo presentation.</em>]</p>
<p style="text-align:justify;">I am very much encouraged as a User Group Leader because one of the member of UG <strong>Tejas Shah</strong> presented his very first technical session today. Tejas Shah delivered excellent session of <strong>&#8220;Introduction to Service Broker&#8221;</strong>. It is very new subject and UG members liked it.</p>
<p style="text-align:justify;">The most awaited session was presented by SQL Server MVP &#8211; <strong>Pinal Dave</strong> where he discussed <span style="color:#333300;"><em><strong>&#8220;<span style="color:#800000;">How to become MVP?&#8221;</span></strong></em><span style="color:#800000;">.</span></span> Pinal explained the advantages and responsibility of becoming MVP. There were many questions regarding this subject. I think UG members and SQL enthusiastic were really into learning how to become MVP. I did my best to answer all the questions which I had received. <em>Community Service</em> is the short answer of this subject.</p>
<p style="text-align:justify;">Pinal Dave shared his experience of attending <strong>MVP Open Day 2008, Goa</strong>. There were nearly 15 brand new photographs of the Open Day. To know more about MVP Open Day 2008 please visit following article.</p>
<p style="text-align:justify;"><strong><a rel="bookmark" href="http://blog.sqlauthority.com/2008/11/19/sqlauthority-news-author-visit-south-asia-mvp-open-day-2008-goa-group-photo/" target="_blank">SQLAuthority News &#8211; Author Visit &#8211; South Asia MVP Open Day 2008 &#8211; Goa &#8211; Group Photo</a></strong></p>
<p style="text-align:justify;">UG president <strong>Jacob </strong>who is New York participated in this meeting using GoToMeeting and discussed his experience of attending PASS conference. This was very special as this was first time when we had live presentation using Audio Video community tools.</p>
<p style="text-align:justify;">Well last but not least, we had our ice creams. Ice Cream was from Havmore and flavor was &#8216;lonavali&#8217;. Let me know if you have any suggestions. Again, if you are interested in participating in UG meetings, please let me know. It is free and good networking with other tech developers.</p>
<p style="text-align:justify;">Pinal Dave UG Introduction</p>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/bimg/ugnov8/ugnov.jpg" alt="" width="500" height="375" /></p>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/bimg/ugnov8/ugnov2.jpg" alt="" width="500" height="375" /></p>
<p style="text-align:justify;">Pinal Dave Technical Session</p>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/bimg/ugnov8/ugnov3.jpg" alt="" width="500" height="375" /></p>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/bimg/ugnov8/ugnov4.jpg" alt="" width="500" height="375" /></p>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/bimg/ugnov8/ugnov5.jpg" alt="" width="500" height="375" /></p>
<p style="text-align:justify;">Tejas Shah on Service Broker</p>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/bimg/ugnov8/ugnov6.jpg" alt="" width="500" height="375" /></p>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/bimg/ugnov8/ugnov7.jpg" alt="" width="500" height="375" /></p>
<p style="text-align:justify;">UG Group Photos</p>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/bimg/ugnov8/ugnov8.jpg" alt="" width="500" height="375" /></p>
<p style="text-align:justify;">Reference : <strong>Pinal Dave (</strong><a href="http://blog.SQLAuthority.com" target="_blank"><strong>http://blog.SQLAuthority.com</strong></a><strong>)</strong></p>
Posted in Best Practices, Data Warehousing, Database, DBA, MVP, Pinal Dave, SQL, SQL Authority, SQL Backup and Restore, SQL Download, SQL Query, SQL Scripts, SQL Server, SQL Tips and Tricks, SQL User Group, SQLAuthority Author Visit, SQLAuthority News, T SQL, Technology Tagged: Openday <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/1608/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/1608/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/1608/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/1608/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/1608/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/1608/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/1608/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/1608/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/1608/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/1608/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&blog=668536&post=1608&subd=sqlauthority&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2008/12/05/sqlauthority-author-visit-ahmedabad-sql-server-user-group-meeting-november-2008-2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>

		<media:content url="http://www.pinaldave.com/bimg/ugnov8/ugnov.jpg" medium="image" />

		<media:content url="http://www.pinaldave.com/bimg/ugnov8/ugnov2.jpg" medium="image" />

		<media:content url="http://www.pinaldave.com/bimg/ugnov8/ugnov3.jpg" medium="image" />

		<media:content url="http://www.pinaldave.com/bimg/ugnov8/ugnov4.jpg" medium="image" />

		<media:content url="http://www.pinaldave.com/bimg/ugnov8/ugnov5.jpg" medium="image" />

		<media:content url="http://www.pinaldave.com/bimg/ugnov8/ugnov6.jpg" medium="image" />

		<media:content url="http://www.pinaldave.com/bimg/ugnov8/ugnov7.jpg" medium="image" />

		<media:content url="http://www.pinaldave.com/bimg/ugnov8/ugnov8.jpg" medium="image" />
	</item>
		<item>
		<title>SQLAuthority News &#8211; Author Visit &#8211; Ahmedabad SQL Server User Group Meeting &#8211; November 2008</title>
		<link>http://blog.sqlauthority.com/2008/11/29/sqlauthority-news-author-visit-ahmedabad-sql-server-user-group-meeting-november-2008/</link>
		<comments>http://blog.sqlauthority.com/2008/11/29/sqlauthority-news-author-visit-ahmedabad-sql-server-user-group-meeting-november-2008/#comments</comments>
		<pubDate>Sat, 29 Nov 2008 01:30:56 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[MVP]]></category>
		<category><![CDATA[Pinal Dave]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Backup and Restore]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[SQL User Group]]></category>
		<category><![CDATA[SQLAuthority Author Visit]]></category>
		<category><![CDATA[SQLAuthority News]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Openday]]></category>

		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=1580</guid>
		<description><![CDATA[Today is special day for SQL Server enthusiastic as we will have SQL Server User Group Meeting today in Ahmedabad. Today in User Group we will have UG President Jacob Sebastian (MVP) participating from New York and UG Vice President Pinal Dave (MVP) will talk about &#8220;How to become MVP?&#8221;
Agenda for today&#8217;s meeting is as [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&blog=668536&post=1580&subd=sqlauthority&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p style="text-align:justify;">Today is special day for SQL Server enthusiastic as we will have SQL Server User Group Meeting today in Ahmedabad. Today in User Group we will have UG President <a href="http://sqlserverandxml.com" target="_blank">Jacob Sebastian</a> (MVP) participating from New York and UG Vice President <a href="http://blog.SQLAuthority.com" target="_blank">Pinal Dave</a> (MVP) will talk about &#8220;How to become MVP?&#8221;</p>
<p style="text-align:justify;">Agenda for today&#8217;s meeting is as following:</p>
<p style="text-align:justify;">Agenda:<br />
1) Introduction by <strong>Pinal Dave</strong><br />
2) Direct from New York &#8211; Live Meeting by<strong> Jacob Sebastian</strong>- SQL Pass Roundup and Other News<br />
3) Technical Session by <strong>Pinal Dave</strong> &#8211; Compressed Backup and Restore Techniques<br />
4) Technical Session by <strong>Tejas Shah</strong> &#8211; What is Service Broker?<br />
5) Information Session by <strong>Pinal Dave</strong> &#8211; <strong>What is MVP? </strong>- MVP Open Day 2008 &#8211; Goa<br />
6) Question and Answers<br />
7) Ice Cream
</p>
<p style="text-align:justify;">Make sure to reach at location at sharp 6:00 PM as we will start on time and you do not want to miss the session by any of leading speaker. I will share few of the special images of MVP Open Day 2008 held at Goa.</p>
<p style="text-align:justify;"><strong>SQL Server User Group Meeting &#8211; November 2008</strong></p>
<p style="text-align:justify;"><strong>Location :</strong> 401, TIME SQUARE, CG road, Op Bazar Calcutta, Ahmedabad, India</p>
<p style="text-align:justify;"><strong>Date and Time :</strong> November 29, 2008 6:00 PM onwards <em><strong>(6:00 PM sharp)</strong></em></p>
<p style="text-align:justify;">Hope to see all of you there.</p>
<p style="text-align:justify;">If you with to attend the meeting, please register your name by sending an email to jacob.reliancesp[at]gmail.com latest by Saturday 12 Noon.</p>
<p style="text-align:justify;">Reference : <strong>Pinal Dave (</strong><a href="http://blog.SQLAuthority.com" target="_blank"><strong>http://blog.SQLAuthority.com</strong></a><strong>)</strong></p>
Posted in MVP, Pinal Dave, SQL, SQL Authority, SQL Backup and Restore, SQL Query, SQL Server, SQL Tips and Tricks, SQL User Group, SQLAuthority Author Visit, SQLAuthority News, T SQL, Technology Tagged: Openday <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/1580/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/1580/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/1580/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/1580/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/1580/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/1580/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/1580/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/1580/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/1580/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/1580/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&blog=668536&post=1580&subd=sqlauthority&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2008/11/29/sqlauthority-news-author-visit-ahmedabad-sql-server-user-group-meeting-november-2008/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>
	</item>
		<item>
		<title>SQL SERVER &#8211; Delete Backup History &#8211; Cleanup Backup History</title>
		<link>http://blog.sqlauthority.com/2008/11/11/sql-server-delete-backup-history-cleanup-backup-history/</link>
		<comments>http://blog.sqlauthority.com/2008/11/11/sql-server-delete-backup-history-cleanup-backup-history/#comments</comments>
		<pubDate>Tue, 11 Nov 2008 01:30:32 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[Best Practices]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[Pinal Dave]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Backup and Restore]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Scripts]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Stored Procedure]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=1491</guid>
		<description><![CDATA[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 [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&blog=668536&post=1491&subd=sqlauthority&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p style="text-align:justify;">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.</p>
<p><code style="font-size:12px;"><span style="color:blue;">USE </span><span style="color:black;">msdb<br />
GO<br />
</span><span style="color:blue;">DECLARE </span><span style="color:#434343;">@DaysToKeepHistory </span><span style="color:black;">DATETIME<br />
</span><span style="color:blue;">SET </span><span style="color:#434343;">@DaysToKeepHistory </span><span style="color:blue;">= </span><span style="color:magenta;">CONVERT</span><span style="color:gray;">(</span><span style="color:blue;">VARCHAR</span><span style="color:gray;">(</span><span style="color:black;">10</span><span style="color:gray;">), </span><span style="color:magenta;">DATEADD</span><span style="color:gray;">(</span><span style="color:black;">dd</span><span style="color:gray;">, -</span><span style="color:black;">30</span><span style="color:gray;">, </span><span style="color:magenta;">GETDATE</span><span style="color:gray;">()), </span><span style="color:black;">101</span><span style="color:gray;">)<br />
</span><span style="color:blue;">EXEC </span><span style="color:darkred;">sp_delete_backuphistory </span><span style="color:#434343;">@DaysToKeepHistory<br />
</span><span style="color:black;">GO </span></code></p>
<p style="text-align:justify;">Reference: <strong>Pinal Dave (<a href="http://www.sqlauthority.com/" target="_blank">http://www.SQLAuthority.com</a>)</strong><em><br />
</em></p>
Posted in Best Practices, Database, Pinal Dave, SQL, SQL Authority, SQL Backup and Restore, SQL Query, SQL Scripts, SQL Server, SQL Stored Procedure, SQL Tips and Tricks, T SQL, Technology  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/1491/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/1491/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/1491/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/1491/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/1491/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/1491/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/1491/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/1491/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/1491/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/1491/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&blog=668536&post=1491&subd=sqlauthority&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2008/11/11/sql-server-delete-backup-history-cleanup-backup-history/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>
	</item>
		<item>
		<title>SQLAuthority News &#8211; Book Review &#8211; Pro SQL Server 2005 Replication (Definitive Guide)</title>
		<link>http://blog.sqlauthority.com/2008/10/13/sqlauthority-news-book-review-pro-sql-server-2005-replication-definitive-guide/</link>
		<comments>http://blog.sqlauthority.com/2008/10/13/sqlauthority-news-book-review-pro-sql-server-2005-replication-definitive-guide/#comments</comments>
		<pubDate>Mon, 13 Oct 2008 01:30:31 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[DBA]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[Pinal Dave]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Backup and Restore]]></category>
		<category><![CDATA[SQL Data Storage]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[SQLAuthority Book Review]]></category>
		<category><![CDATA[SQLAuthority News]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[SQL Replication]]></category>

		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=1285</guid>
		<description><![CDATA[
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 [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&blog=668536&post=1285&subd=sqlauthority&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p style="text-align:justify;"><img class="alignleft" style="margin:10px;" src="http://www.pinaldave.com/blogfolder/proreplication.jpg" alt="" width="157" height="209" /></p>
<p style="text-align:justify;"><strong>Pro SQL Server 2005 Replication (Definitive Guide) (Hardcover)<br />
<em>by Sujoy Paul (Author) </em></strong>
</p>
<p style="text-align:justify;"><a href="http://www.amazon.com/dp/1590596501/" target="_blank">Link to Amazon</a> (This is not affiliate link)</p>
<p style="text-align:justify;"><strong>Quick Review:</strong><br />
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 one place.</p>
<p style="text-align:justify;"><strong>Detail Review: </strong><br />
Replication is the process of sharing information so as to ensure consistency between redundant resources, such as software or hardware components, to improve reliability, fault-tolerance, or accessibility. Database replication can be used on many database management systems, usually with a master/slave relationship between the original and the copies. The master logs the updates, which then ripple through to the slaves. The slave outputs a message stating that it has received the update successfully, thus allowing the sending of subsequent updates.
</p>
<p style="text-align:justify;">This books talks about different replication types and methods. This book explains different scenarios where types of replication can be used. Sujoy Paul (SQL Server – MCP) explains the concept with many screenshots and simple examples. This book is not limited to replication types only but it also covers replication between heterogeneous databases and other objects.</p>
<p style="text-align:justify;"><strong>Pros :</strong></p>
<ul style="text-align:justify;">
<li>Lots of screen shots</li>
<li>Lots of explanation of how different procedures works</li>
<li>Good coverage of different kind of replications</li>
<li>Step by Step guidance</li>
<li>Complete coverage of any methodology</li>
<li>Truly useful to novice programmers</li>
</ul>
<p style="text-align:justify;"><strong>Cons:</strong></p>
<ul style="text-align:justify;">
<li>No discussion about potential errors can come across during replication process</li>
<li>Some of the screen shots are hard to read (Apress should look into this matter)</li>
<li>Some of the chapters are very blurry</li>
</ul>
<p style="text-align:justify;">Overall, this is great book for any novice developer who is beginning in the world of replication. Though this book covers many screenshots and material directly from Book On Line this is great collection of all the concept at any place. I have personally used this book when I was new DBA and have learned replication basics from this book.</p>
<p style="text-align:justify;"><strong>Stars: 4 Stars</strong></p>
<p style="text-align:justify;"><strong>Summary: </strong>This a comprehensive single source of information will save lots of time as there is no need to go through multiple books to implement and maintain replication solutions.</p>
<p style="text-align:justify;">Reference : <strong>Pinal Dave (</strong><a href="http://blog.SQLAuthority.com" target="_blank"><strong>http://blog.SQLAuthority.com</strong></a><strong>)</strong></p>
Posted in Database, DBA, Pinal Dave, SQL, SQL Authority, SQL Backup and Restore, SQL Data Storage, SQL Query, SQL Server, SQL Tips and Tricks, SQLAuthority Book Review, SQLAuthority News, T SQL, Technology Tagged: SQL Replication <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/1285/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/1285/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/1285/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/1285/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/1285/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/1285/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/1285/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/1285/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/1285/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/1285/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&blog=668536&post=1285&subd=sqlauthority&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2008/10/13/sqlauthority-news-book-review-pro-sql-server-2005-replication-definitive-guide/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>

		<media:content url="http://www.pinaldave.com/blogfolder/proreplication.jpg" medium="image" />
	</item>
		<item>
		<title>SQL SERVER &#8211; Behind the Scene of SQL Server Activity of &#8211; Transaction Log &#8211; Shrinking Log</title>
		<link>http://blog.sqlauthority.com/2008/08/21/sql-server-behind-the-scene-of-sql-server-activity-of-transaction-log-shrinking-log/</link>
		<comments>http://blog.sqlauthority.com/2008/08/21/sql-server-behind-the-scene-of-sql-server-activity-of-transaction-log-shrinking-log/#comments</comments>
		<pubDate>Thu, 21 Aug 2008 01:30:57 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[Pinal Dave]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Backup and Restore]]></category>
		<category><![CDATA[SQL Documentation]]></category>
		<category><![CDATA[SQL Performance]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Scripts]]></category>
		<category><![CDATA[SQL Security]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server DBCC]]></category>
		<category><![CDATA[SQL Stored Procedure]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=864</guid>
		<description><![CDATA[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 [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&blog=668536&post=864&subd=sqlauthority&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p style="text-align:justify;"><a href="http://blog.sqlauthority.com/2006/12/30/sql-server-shrinking-truncate-log-file-log-full/#comment-41806" target="_blank">Imran Mohammed</a> 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.</p>
<p style="text-align:justify;"><strong>Question from <a href="http://blog.sqlauthority.com/2006/12/30/sql-server-shrinking-truncate-log-file-log-full/#comment-41801" target="_blank">lauraV</a></strong></p>
<p style="padding-left:30px;text-align:justify;"><em>Please help me understand. I am taking a full backup once a day, and transaction logs once every hour. Why is my LDF file not retaining a “normal” size? It continues to grow. I do not want to break the chain and use truncate only, though I have done this and it fixes the problem. I would very much like to understand the underlying problem.<br />
thank you in advance</em>
</p>
<p style="text-align:justify;">I suggest to all my readers to read the answer from Imran, this really explains what really goes on behind the scene of Transaction Log. I have highlighted some of the important keylines and keywords in his answer to lauraV.</p>
<p style="text-align:justify;"><strong>Answer from <a href="http://blog.sqlauthority.com/2006/12/30/sql-server-shrinking-truncate-log-file-log-full/#comment-41806" target="_blank">Imran Mohammed</a></strong></p>
<p style="padding-left:30px;text-align:justify;"><em>@LauraV.</em></p>
<p style="padding-left:30px;text-align:justify;"><em>You did not mention which version of SQL Server you are using, Either 2000 or 2005, ( would be easy for us to narrow our answer to questions)</em></p>
<p style="padding-left:30px;text-align:justify;"><strong><em>When ever you take transactional log backup, no matter if you scheduled it or if you take it manually, SQL Server by default will empty transactional log. Meaning after the transactional backup ( Be Careful NOT FULL BACKUP) SQL Server will remove inactive transactions from logfile.</em></strong></p>
<p style="padding-left:30px;text-align:justify;"><em>Which means your transaction file is empty after you take transactional log backup, Empty doesnot mean your logfile became small, NO. the size of the log file will still be the same but it will be empty, all you have to do is shrink logfile, run below command,</em></p>
<p style="padding-left:30px;text-align:justify;"><code style="font-size:12px;"><span style="color:blue;">USE </span><span style="color:black;">database_name<br />
</span><span style="color:blue;">DBCC </span><span style="color:black;">shrinkfile </span><span style="color:gray;">(</span><span style="color:black;">logfilename</span><span style="color:gray;">, </span><span style="color:black;">1</span><span style="color:gray;">)</span></code>
</p>
<p style="padding-left:30px;text-align:justify;"><em>and it will shrink the log file to its minimum size possible,</em></p>
<p style="padding-left:30px;text-align:justify;"><strong><em>In SQL Server 2000:</em></strong></p>
<p style="padding-left:30px;text-align:justify;"><em>Right click database name -&gt; all task -&gt; backup -&gt; in the dialog box, select transactional backup, and click on options ( at the top left side of the box) you will see “remove inactive entries from Transactional log”.</em></p>
<p style="padding-left:30px;text-align:justify;"><em>This means when you take transactional Log backup, SQL Server is removing all inactive entries from SQL Server log file. This is default setting.</em></p>
<p style="padding-left:30px;text-align:justify;"><strong><em>In SQL Server 2005:</em></strong></p>
<p style="padding-left:30px;text-align:justify;"><em>Right Click database name-&gt;task -&gt;Backup in the Dialog box, select backup type Transactional backup, and click options tab (at left side up) and under Transaction log section you will see “Truncate the Transaction log”.</em></p>
<p style="padding-left:30px;text-align:justify;"><em>Which mean when SQL Server 2005 performs transactional backup it truncates logfile. This is also default setting.</em></p>
<p style="padding-left:30px;text-align:justify;"><em>NO matter if you use SQL Server 2000 or SQL Server 2005, SQL Server by default (can be changed) will truncate log after performing Transactional backup.</em></p>
<p style="padding-left:30px;text-align:justify;"><em>So simple solution will be shrink log file after you take transactional log backup. You dont have to do it manually You can send this as a response to this transactional bacup job, when ever this job succeed, response to that would be run this script </em></p>
<p style="padding-left:30px;text-align:justify;"><code style="font-size:12px;"><span style="color:blue;">USE </span><span style="color:black;">databasename<br />
</span><span style="color:blue;">DBCC </span><span style="color:black;">shrinkfile </span><span style="color:gray;">( </span><span style="color:black;">logfile_name</span><span style="color:gray;">, </span><span style="color:black;">1</span><span style="color:gray;">)</span></code>
</p>
<p style="padding-left:30px;text-align:justify;"><em>That might work.</em></p>
<p style="padding-left:30px;text-align:justify;"><em>I will take one more minute to explain what is this active and inactive transaction in the logfile . Please correct me if I am wrong.</em></p>
<p style="padding-left:30px;text-align:justify;"><em>This is how SQL Server works,</em></p>
<p style="text-align:justify;"><strong>Note from Pinal &#8211; Following 4 paragraph is the most interesting part of whole discussion.</strong></p>
<p style="padding-left:30px;text-align:justify;"><em>When a transaction comes to SQL Server, it first comes to transactional log buffer, and then it is hardened to disk ( log file, .ldf ) and then it is written to data file ( .mdf). Then we say the transaction is committed or it is inactive, because the transaction performed all the actions that it should.</em></p>
<p style="padding-left:30px;text-align:justify;"><em>On the other hand, when a transaction comes to SQL Server and it is entered into log buffer and also in transactional log, but not yet entered in data file, its still in the process, then we will say this transaction as active transaction.</em></p>
<p style="padding-left:30px;text-align:justify;"><em>One important point to think is, all the inactive transactions in the log file ( transactions which completed their tasks and are entered in data file) are also present in data file, and SQL Server is smart enough to think, inactive transactions are already in data file and also, they have been backed up( by transactional log backup) hence it thinks, this is the time to get rid of this data and it removes all the inactive transactions.</em></p>
<p style="padding-left:30px;text-align:justify;"><em>But for Active transactions, which are either incomplete or could not complete because of disaster ( sudden power failure….) will be stored in transactional log and will be called acive transactions untill they are entered in data file.</em></p>
<p style="padding-left:30px;text-align:justify;"><em>This will be little bit confusing…</em></p>
<p style="padding-left:30px;text-align:justify;"><em>Read more about this in books online.</em></p>
<p style="padding-left:30px;text-align:justify;"><em>Hope this helps.<br />
Imran.</em>
</p>
<p style="text-align:justify;">Reference : <strong>Pinal Dave (</strong><a href="http://blog.SQLAuthority.com" target="_blank"><strong>http://blog.SQLAuthority.com</strong></a><strong>)</strong></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/sqlauthority.wordpress.com/864/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/sqlauthority.wordpress.com/864/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/864/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/864/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/864/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/864/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/864/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/864/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/864/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/864/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/864/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/864/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&blog=668536&post=864&subd=sqlauthority&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2008/08/21/sql-server-behind-the-scene-of-sql-server-activity-of-transaction-log-shrinking-log/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>
	</item>
		<item>
		<title>SQL SERVER &#8211; 2008 &#8211; Download and Install Samples Database AdventureWorks 2005 &#8211; Detail Tutorial</title>
		<link>http://blog.sqlauthority.com/2008/08/10/sql-server-2008-download-and-install-samples-database-adventureworks-2005-detail-tutorial/</link>
		<comments>http://blog.sqlauthority.com/2008/08/10/sql-server-2008-download-and-install-samples-database-adventureworks-2005-detail-tutorial/#comments</comments>
		<pubDate>Sun, 10 Aug 2008 01:30:17 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[Pinal Dave]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Add-On]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Backup and Restore]]></category>
		<category><![CDATA[SQL Documentation]]></category>
		<category><![CDATA[SQL Download]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Scripts]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[SQL Utility]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[AdventureWorks]]></category>

		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=802</guid>
		<description><![CDATA[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&#8217;s opensource site of Codeplex. Visit following link to visit [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&blog=668536&post=802&subd=sqlauthority&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p style="text-align:justify;">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.</p>
<p style="text-align:justify;">Sample database are now moved to Microsoft&#8217;s opensource site of Codeplex. Visit following link to visit the Sample Database page.</p>
<p style="text-align:justify;"><strong><a href="http://www.codeplex.com/MSFTDBProdSamples/Release/ProjectReleases.aspx?ReleaseId=14274" target="_blank">CodePlex SQL Server Sample Database</a></strong></p>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/blogfolder/samples2008/samples2008web.gif" alt="" width="412" height="756" /></p>
<p style="text-align:justify;">There are two different method to setup sample database. 1) Running SQL Script 2) Restoring Database Backup. There are few common steps in both the process. We will see the common process first and then after see both the method to setup sample database in detail.</p>
<p style="text-align:justify;"><strong>Common Steps:</strong></p>
<p style="text-align:justify;">Download the .msi package from codeplex based on your operating system and your SQL Server version. I have used Adventureworks DB version of 2005 as that is what was question from user. If you download version of 2008 it can only be installed in version of 2008.</p>
<p style="text-align:justify;">Most of the images are self explanatory so I will let images explain most of the details.</p>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/blogfolder/samples2008/samples2008.gif" alt="" width="499" height="392" /></p>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/blogfolder/samples2008/samples20081.gif" alt="" width="499" height="392" /></p>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/blogfolder/samples2008/samples20083.gif" alt="" width="499" height="392" /></p>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/blogfolder/samples2008/samples20085.gif" alt="" width="499" height="392" /></p>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/blogfolder/samples2008/samples20086.gif" alt="" width="500" height="340" /></p>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/blogfolder/samples2008/samples20087.gif" alt="" width="500" height="526" /></p>
<p style="text-align:justify;">Above image displays the location where Sample Database is installed. Please note the location of same database as &#8220;<strong>C:\Program Files\Microsoft SQL Server\100\Tools\Samples\AdventureWorks OLTP</strong>&#8220;</p>
<p style="text-align:justify;"><strong>Method 1 : Using T-SQL Script</strong></p>
<p style="text-align:justify;">Open SQL Server Management Studio and open the file instawdb from the location where sample database are extracted &#8220;<strong>C:\Program Files\Microsoft SQL Server\100\Tools\Samples\AdventureWorks OLTP</strong>&#8220;.</p>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/blogfolder/samples2008/samples20088.gif" alt="" width="500" height="327" /></p>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/blogfolder/samples2008/samples20089.gif" alt="" width="500" height="606" /></p>
<p style="text-align:justify;">Now make sure that you find variable @data_path and change its values to the location of the database. This is very important task otherwise your database will be created with empty tables.</p>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/blogfolder/samples2008/samples200810.gif" alt="" width="500" height="274" /></p>
<p style="text-align:justify;">Once script is successfully ran, following resultset will be returned.</p>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/blogfolder/samples2008/samples200811.gif" alt="" width="499" height="175" /></p>
<p style="text-align:justify;">Check AdventureWorks database in object explorer.</p>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/blogfolder/samples2008/samples200812.gif" alt="" width="500" height="302" /></p>
<p style="text-align:justify;"><strong>Method 2 : Restoring Database Backup</strong></p>
<p style="text-align:justify;">This method requires to create empty database initially and then after restoring it from backup. Please pay attention to radio buttons and checkbox on the screen as it is very important to select right options when restoring database.</p>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/blogfolder/samples2008/samples200813.gif" alt="" width="379" height="358" /></p>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/blogfolder/samples2008/samples200814.gif" alt="" width="500" height="449" /></p>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/blogfolder/samples2008/samples200815.gif" alt="" width="500" height="445" /></p>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/blogfolder/samples2008/samples200816.gif" alt="" width="500" height="508" /></p>
<p style="text-align:justify;">Location of Database backup is where sample database are extracted &#8220;<strong>C:\Program Files\Microsoft SQL Server\100\Tools\Samples\AdventureWorks OLTP</strong>&#8220;.</p>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/blogfolder/samples2008/samples200817.gif" alt="" width="427" height="852" /></p>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/blogfolder/samples2008/samples200818.gif" alt="" width="500" height="362" /></p>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/blogfolder/samples2008/samples200819.gif" alt="" width="500" height="449" /></p>
<p style="text-align:justify;">Following screen is most important, make sure to select options displayed in the screen or database will not be restored.</p>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/blogfolder/samples2008/samples200820.gif" alt="" width="500" height="449" /></p>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/blogfolder/samples2008/samples200821.gif" alt="" width="500" height="449" /></p>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/blogfolder/samples2008/samples200822.gif" alt="" width="500" height="449" /></p>
<p style="text-align:justify;">Check AdventureWorks database in object explorer.</p>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/blogfolder/samples2008/samples200823.gif" alt="" width="498" height="388" /></p>
<p style="text-align:justify;">If you want to install AdventureWorks database version 2008, the methods works fine. There are additional sample database are available in the same package and they can be installed in similar way. If you want to install Northwind database follow my previous article <strong><a href="http://blog.sqlauthority.com/2007/06/15/sql-server-2005-northwind-database-or-adventureworks-database-samples-databases-part-2/" target="_blank">SQL SERVER &#8211; 2005 NorthWind Database or AdventureWorks Database &#8211; Samples Databases &#8211; Part 2</a></strong>.</p>
<p style="text-align:justify;">Let me know what is your experience while setting up sample database with SQL Server 2008. Additionally, let me know what you think about this in depth explanation of process of setting up sample database.</p>
<p style="text-align:justify;">Reference : <strong>Pinal Dave (</strong><a href="http://blog.SQLAuthority.com" target="_blank"><strong>http://blog.SQLAuthority.com</strong></a><strong>)</strong></p>
<p style="text-align:justify;">
<p style="text-align:justify;">
<p style="text-align:justify;">
<p style="text-align:justify;">
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/sqlauthority.wordpress.com/802/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/sqlauthority.wordpress.com/802/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/802/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/802/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/802/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/802/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/802/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/802/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/802/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/802/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/802/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/802/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&blog=668536&post=802&subd=sqlauthority&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2008/08/10/sql-server-2008-download-and-install-samples-database-adventureworks-2005-detail-tutorial/feed/</wfw:commentRss>
		<slash:comments>42</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>

		<media:content url="http://www.pinaldave.com/blogfolder/samples2008/samples2008web.gif" medium="image" />

		<media:content url="http://www.pinaldave.com/blogfolder/samples2008/samples2008.gif" medium="image" />

		<media:content url="http://www.pinaldave.com/blogfolder/samples2008/samples20081.gif" medium="image" />

		<media:content url="http://www.pinaldave.com/blogfolder/samples2008/samples20083.gif" medium="image" />

		<media:content url="http://www.pinaldave.com/blogfolder/samples2008/samples20085.gif" medium="image" />

		<media:content url="http://www.pinaldave.com/blogfolder/samples2008/samples20086.gif" medium="image" />

		<media:content url="http://www.pinaldave.com/blogfolder/samples2008/samples20087.gif" medium="image" />

		<media:content url="http://www.pinaldave.com/blogfolder/samples2008/samples20088.gif" medium="image" />

		<media:content url="http://www.pinaldave.com/blogfolder/samples2008/samples20089.gif" medium="image" />

		<media:content url="http://www.pinaldave.com/blogfolder/samples2008/samples200810.gif" medium="image" />

		<media:content url="http://www.pinaldave.com/blogfolder/samples2008/samples200811.gif" medium="image" />

		<media:content url="http://www.pinaldave.com/blogfolder/samples2008/samples200812.gif" medium="image" />

		<media:content url="http://www.pinaldave.com/blogfolder/samples2008/samples200813.gif" medium="image" />

		<media:content url="http://www.pinaldave.com/blogfolder/samples2008/samples200814.gif" medium="image" />

		<media:content url="http://www.pinaldave.com/blogfolder/samples2008/samples200815.gif" medium="image" />

		<media:content url="http://www.pinaldave.com/blogfolder/samples2008/samples200816.gif" medium="image" />

		<media:content url="http://www.pinaldave.com/blogfolder/samples2008/samples200817.gif" medium="image" />

		<media:content url="http://www.pinaldave.com/blogfolder/samples2008/samples200818.gif" medium="image" />

		<media:content url="http://www.pinaldave.com/blogfolder/samples2008/samples200819.gif" medium="image" />

		<media:content url="http://www.pinaldave.com/blogfolder/samples2008/samples200820.gif" medium="image" />

		<media:content url="http://www.pinaldave.com/blogfolder/samples2008/samples200821.gif" medium="image" />

		<media:content url="http://www.pinaldave.com/blogfolder/samples2008/samples200822.gif" medium="image" />

		<media:content url="http://www.pinaldave.com/blogfolder/samples2008/samples200823.gif" medium="image" />
	</item>
		<item>
		<title>SQL SERVER &#8211; mssqlsystemresource &#8211; Resource Database</title>
		<link>http://blog.sqlauthority.com/2008/07/27/sql-server-mssqlsystemresource-resource-database/</link>
		<comments>http://blog.sqlauthority.com/2008/07/27/sql-server-mssqlsystemresource-resource-database/#comments</comments>
		<pubDate>Sun, 27 Jul 2008 01:30:55 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[Pinal Dave]]></category>
		<category><![CDATA[Readers Question]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Backup and Restore]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Scripts]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL System Table]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=738</guid>
		<description><![CDATA[Just a day ago I received following email
&#8220;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&#8221;
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 [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&blog=668536&post=738&subd=sqlauthority&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p style="text-align:justify;">Just a day ago I received following email</p>
<p style="text-align:justify;">&#8220;Dear Pinal,</p>
<p style="text-align:justify;">While I was exploring my computer in directory C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data I have found database mssqlsystemresource. <strong>What is mssqlsystemresource?</strong></p>
<p style="text-align:justify;">Thanks,</p>
<p style="text-align:justify;">Joseph Kazeka&#8221;</p>
<p style="text-align:justify;">Simple question like this are very interesting. <strong>mssqlsystemresource is Resource Database</strong>. It is read only database and contains system objects (i.e. sys.objects, sys.modules and other sys schema objects). Resource database does not contain any of user data.</p>
<p style="text-align:justify;">The purpose of resource database is to facilitates upgrading to new version of SQL Server without any hassle. In previous versions whenever version of SQL Server was upgraded all the previous version system objects needs to be dropped and new version system objects to be created. With additional of resource database when SQL Server is to be upgraded to new version resource database has to be simple replaced as file system level (using OS). If new version is creating problems rolling back can be done very easily, just replace resource database with previous version.</p>
<p style="text-align:justify;">For each SQL instance there is only one resource file. Resource file location should be same as master database. This databse is hidden from the user. It can not be viewed in Object Explorer or with the use of sp_helpDb or any other way. SQL Server itself can not backup this database. This database has to be backed up using filesystem backup.</p>
<p style="text-align:justify;">Another interesting fact about Resource Database is its fixed ID 32767. Run following T-SQL script to see some of the properties of the Resource Database.</p>
<p style="text-align:justify;"><code style="font-size:12px;"><span style="color:blue;">SELECT </span><span style="color:magenta;">SERVERPROPERTY</span><span style="color:gray;">(</span><span style="color:red;">'ResourceVersion'</span><span style="color:gray;">)<br />
</span><span style="color:blue;">AS </span><span style="color:black;">[Resource Version]</span><span style="color:gray;">;<br />
</span><span style="color:black;">GO<br />
</span><span style="color:blue;">SELECT </span><span style="color:magenta;">SERVERPROPERTY</span><span style="color:gray;">(</span><span style="color:red;">'ResourceLastUpdateDateTime'</span><span style="color:gray;">)<br />
</span><span style="color:blue;">AS </span><span style="color:black;">[Resource Last Update DateTime]</span><span style="color:gray;">;<br />
</span><span style="color:black;">GO<br />
</span><span style="color:blue;">SELECT </span><span style="color:black;">OBJECT_DEFINITION</span><span style="color:gray;">(</span><span style="color:magenta;">OBJECT_ID</span><span style="color:gray;">(</span><span style="color:red;">'sys.objects'</span><span style="color:gray;">))<br />
</span><span style="color:blue;">AS </span><span style="color:black;">[SQL Definitions]</span><span style="color:gray;">;<br />
</span><span style="color:black;">GO</span></code>
</p>
<p style="text-align:justify;"><img class="alignnone" src="http://www.pinaldave.com/blogfolder/ResourceDatabase.png" alt="" width="445" height="370" /></p>
<p style="text-align:justify;">Reference : <strong>Pinal Dave (</strong><a href="http://blog.SQLAuthority.com" target="_blank"><strong>http://blog.SQLAuthority.com</strong></a><strong>)</strong></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/sqlauthority.wordpress.com/738/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/sqlauthority.wordpress.com/738/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/738/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/738/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/738/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/738/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/738/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/738/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/738/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/738/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/738/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/738/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&blog=668536&post=738&subd=sqlauthority&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2008/07/27/sql-server-mssqlsystemresource-resource-database/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>

		<media:content url="http://www.pinaldave.com/blogfolder/ResourceDatabase.png" medium="image" />
	</item>
		<item>
		<title>SQL SERVER &#8211; FIX &#8211; 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.</title>
		<link>http://blog.sqlauthority.com/2008/07/21/sql-server-fix-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/</link>
		<comments>http://blog.sqlauthority.com/2008/07/21/sql-server-fix-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/#comments</comments>
		<pubDate>Mon, 21 Jul 2008 01:30:10 +0000</pubDate>
		<dc:creator>pinaldave</dc:creator>
				<category><![CDATA[Pinal Dave]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Authority]]></category>
		<category><![CDATA[SQL Backup and Restore]]></category>
		<category><![CDATA[SQL Data Storage]]></category>
		<category><![CDATA[SQL Error Messages]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Scripts]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Tips and Tricks]]></category>
		<category><![CDATA[T SQL]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=718</guid>
		<description><![CDATA[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. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&blog=668536&post=718&subd=sqlauthority&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p style="text-align:justify;"><span style="color:#ff0000;"><em>ERROR : 9004 An error occurred while processing the log for database.<br />
If possible, restore from backup.<br />
If a backup is not available, it might be necessary to rebuild the log.</em></span>
</p>
<p style="text-align:justify;">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. I have solved this error using following methods. Hope this will help anybody who is facing the same error.</p>
<p style="text-align:justify;">Microsoft suggest there are two solution to this problem.</p>
<p style="text-align:justify;"><em><strong>1) Restore from a backup.</strong></em></p>
<ul style="text-align:justify;">
<li>Create Empty Database with same name and physical files (.ldf and .mdf).</li>
<li>Shut down SQL Server.</li>
<li>Replace the files which you want to attach with this new empty database files.</li>
<li>Start SQL Server.</li>
<li>Database will be in suspect mode which means so far everything going as it should be.</li>
<li>Next is to put database in emergency mode. ALTER DATABASE &lt;DatabaseName&gt; SET EMERGENCY will change the database status to emergency.</li>
<li>A database which is in emergency mode can be repaired with allowing some data loss. DBCC CHECKDB REPAIR_ALLOW_DATA_LOSS will do the task.</li>
<li>In this process some of the data may be lost but database will in working condition with most of the data retrieved from log.</li>
</ul>
<p style="text-align:justify;"><em><strong>2) Rebuild the log.</strong></em></p>
<ul style="text-align:justify;">
<li>Create database using CREATE DATABASE FOR ATTACH_REBUILD_LOG.</li>
<li>This may fix the problem right away if database which is attempted to be attach is shut down properly. If database is corrupt it will be not restored correctly.</li>
<li>Next DBCC CHECKDB REPAIR_ALLOW_DATA_LOSS should be ran to bring back the database operational. This may loose some data but it may bring back database in working condition.</li>
<li>In this option as log is rebuilt SQL Server does not use log file to retrieve any data. In this process none of the log operation like transaction rollback will work.</li>
</ul>
<p style="text-align:justify;">I prefer to use the first method if it works. First method has worked sevral time without any issue. Syntax of the CREATE database can be found on <strong><a href="http://msdn.microsoft.com/en-us/library/ms176061.aspx" target="_blank">Book Online</a></strong> for further guidance.</p>
<p style="text-align:justify;">Reference : <strong>Pinal Dave (</strong><a href="http://blog.SQLAuthority.com" target="_blank"><strong>http://blog.SQLAuthority.com</strong></a><strong>)</strong></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/sqlauthority.wordpress.com/718/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/sqlauthority.wordpress.com/718/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sqlauthority.wordpress.com/718/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sqlauthority.wordpress.com/718/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sqlauthority.wordpress.com/718/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sqlauthority.wordpress.com/718/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sqlauthority.wordpress.com/718/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sqlauthority.wordpress.com/718/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sqlauthority.wordpress.com/718/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sqlauthority.wordpress.com/718/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sqlauthority.wordpress.com/718/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sqlauthority.wordpress.com/718/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.sqlauthority.com&blog=668536&post=718&subd=sqlauthority&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://blog.sqlauthority.com/2008/07/21/sql-server-fix-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/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aa5a2264e8a27d802bb22ab6ccf688?s=96&#38;d=identicon" medium="image">
			<media:title type="html">pinaldave</media:title>
		</media:content>
	</item>
	</channel>
</rss>