<?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>Kotako&#039;s Notes</title>
	<atom:link href="http://kotako.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://kotako.wordpress.com</link>
	<description>Just notes...</description>
	<lastBuildDate>Tue, 05 Oct 2010 10:53:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='kotako.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Kotako&#039;s Notes</title>
		<link>http://kotako.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://kotako.wordpress.com/osd.xml" title="Kotako&#039;s Notes" />
	<atom:link rel='hub' href='http://kotako.wordpress.com/?pushpress=hub'/>
		<item>
		<title>SQL Server &#8211; about model database</title>
		<link>http://kotako.wordpress.com/2010/10/05/sql-server-about-model-database/</link>
		<comments>http://kotako.wordpress.com/2010/10/05/sql-server-about-model-database/#comments</comments>
		<pubDate>Tue, 05 Oct 2010 08:59:27 +0000</pubDate>
		<dc:creator>kotako</dc:creator>
		
		<guid isPermaLink="false">http://kotako.wordpress.com/?p=193</guid>
		<description><![CDATA[Today I read a good article from Tibor Karaszi about the model database. http://sqlblog.com/blogs/tibor_karaszi/archive/2009/11/18/do-you-perform-log-backup-for-the-model-database.aspx I remembered that once while troubleshooting a disk space issue I saw a model database with a transaction log of 11 GB! So&#8230; I put this article on my useful notes and will always set the model database in simple recovery [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kotako.wordpress.com&amp;blog=8566347&amp;post=193&amp;subd=kotako&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Today I read a good article from Tibor Karaszi about the model database.</p>
<p><a href="http://sqlblog.com/blogs/tibor_karaszi/archive/2009/11/18/do-you-perform-log-backup-for-the-model-database.aspx">http://sqlblog.com/blogs/tibor_karaszi/archive/2009/11/18/do-you-perform-log-backup-for-the-model-database.aspx</a></p>
<p>I remembered that once while troubleshooting a disk space issue I saw a model database with a transaction log of 11 GB! <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  </p>
<p>So&#8230; I put this article on my useful notes and will always set the model database in simple recovery model as a best practice.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/kotako.wordpress.com/193/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/kotako.wordpress.com/193/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/kotako.wordpress.com/193/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/kotako.wordpress.com/193/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/kotako.wordpress.com/193/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/kotako.wordpress.com/193/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/kotako.wordpress.com/193/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/kotako.wordpress.com/193/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/kotako.wordpress.com/193/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/kotako.wordpress.com/193/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/kotako.wordpress.com/193/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/kotako.wordpress.com/193/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/kotako.wordpress.com/193/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/kotako.wordpress.com/193/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kotako.wordpress.com&amp;blog=8566347&amp;post=193&amp;subd=kotako&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://kotako.wordpress.com/2010/10/05/sql-server-about-model-database/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/58bb125aaefc65f1653509f43f7d790a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kotako</media:title>
		</media:content>
	</item>
		<item>
		<title>Convert LiteSpeed Backups to SQL Server Backups and restore them</title>
		<link>http://kotako.wordpress.com/2010/03/02/convert-litespeed-backups-to-sql-server-backups-and-restore-them/</link>
		<comments>http://kotako.wordpress.com/2010/03/02/convert-litespeed-backups-to-sql-server-backups-and-restore-them/#comments</comments>
		<pubDate>Tue, 02 Mar 2010 11:45:35 +0000</pubDate>
		<dc:creator>kotako</dc:creator>
				<category><![CDATA[LiteSpeed]]></category>
		<category><![CDATA[RESTORE]]></category>
		<category><![CDATA[SQL 2005]]></category>

		<guid isPermaLink="false">http://kotako.wordpress.com/?p=181</guid>
		<description><![CDATA[With extractor.exe we can create MTF compliant SQL Server backup files from LiteSpeed backup files. The devices created by the extractor utility can be restored on any SQL Server using the native RESTORE DATABASE commands. Example: (On a default installation extractor.exe is located on: %PROGRAM_FILES%\Quest Software\LiteSpeed\SQL Server\ ) extractor.exe -F "Drive:\PATH\DBNAME_Full.bak" -E "Drive:\PATH\DBNAME_Full_native.bak" -N 1 [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kotako.wordpress.com&amp;blog=8566347&amp;post=181&amp;subd=kotako&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>With <strong>extractor.exe</strong> we can create MTF compliant SQL Server backup files from LiteSpeed backup files.<br />
The devices created by the extractor utility can be restored on any SQL Server using the native RESTORE DATABASE commands.</p>
<p>Example:</p>
<p>(On a default installation extractor.exe is located on:<strong> %PROGRAM_FILES%\Quest Software\LiteSpeed\SQL Server\</strong> )</p>
<p><code>extractor.exe  -F "Drive:\PATH\DBNAME_Full.bak" -E "Drive:\PATH\DBNAME_Full_native.bak" -N 1</code></p>
<p>-F the name of the LiteSpeed backup device file to be extracted<br />
-E this is the base file created by the extractor.exe, containing the native SQL Server backup</p>
<p>We have the  native SQL Server backup files generated on the specified folder.</p>
<p>Now let&#8217;s do the restore:</p>
<p><code>RESTORE DATABASE DBNAME FROM<br />
DISK = N'Drive:\PATH\DBNAME_Full_native.bak0',<br />
DISK = N'Drive:\PATH\DBNAME_Full_native.bak1'<br />
WITH  FILE = 1,<br />
MOVE 'DBNAME' TO 'Drive:\DBLocationPath\DBNAME.mdf',<br />
MOVE 'DBNAME_log' TO 'Drive:\DBLocationPath\DBNAME_log.ldf',<br />
NOUNLOAD,  STATS = 10<br />
GO</code></p>
<p>Done</p>
<br />Filed under: <a href='http://kotako.wordpress.com/category/litespeed/'>LiteSpeed</a>, <a href='http://kotako.wordpress.com/category/microsoft/sql-2005/restore/'>RESTORE</a>, <a href='http://kotako.wordpress.com/category/microsoft/sql-2005/'>SQL 2005</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/kotako.wordpress.com/181/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/kotako.wordpress.com/181/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/kotako.wordpress.com/181/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/kotako.wordpress.com/181/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/kotako.wordpress.com/181/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/kotako.wordpress.com/181/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/kotako.wordpress.com/181/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/kotako.wordpress.com/181/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/kotako.wordpress.com/181/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/kotako.wordpress.com/181/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/kotako.wordpress.com/181/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/kotako.wordpress.com/181/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/kotako.wordpress.com/181/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/kotako.wordpress.com/181/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kotako.wordpress.com&amp;blog=8566347&amp;post=181&amp;subd=kotako&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://kotako.wordpress.com/2010/03/02/convert-litespeed-backups-to-sql-server-backups-and-restore-them/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/58bb125aaefc65f1653509f43f7d790a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kotako</media:title>
		</media:content>
	</item>
		<item>
		<title>Simple, but important &#8211; RESTORE with T-SQL</title>
		<link>http://kotako.wordpress.com/2010/01/13/simple-but-important-do-restore-with-t-sql/</link>
		<comments>http://kotako.wordpress.com/2010/01/13/simple-but-important-do-restore-with-t-sql/#comments</comments>
		<pubDate>Wed, 13 Jan 2010 12:43:46 +0000</pubDate>
		<dc:creator>kotako</dc:creator>
				<category><![CDATA[RESTORE]]></category>
		<category><![CDATA[point in time]]></category>
		<category><![CDATA[SQL 2005]]></category>

		<guid isPermaLink="false">http://kotako.wordpress.com/?p=162</guid>
		<description><![CDATA[Let&#8217;s do a restore of our AdventureWorks to a point in time &#8211; well we will stop at 4.15 PM &#8211; to see only Mytable1 and Mytable2 What we have: 1. A full backup of Adventure Works from 2.00 PM 2. A diffrential backup from 3.00 PM 3. A set of transaction log backups from [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kotako.wordpress.com&amp;blog=8566347&amp;post=162&amp;subd=kotako&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Let&#8217;s do a restore of our AdventureWorks to a point in time <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  &#8211; well we will stop at 4.15 PM &#8211; to see only Mytable1 and Mytable2</p>
<p>What we have:<br />
1. A full backup of Adventure Works from 2.00 PM<br />
2. A diffrential backup from 3.00 PM<br />
3. A set of transaction log backups from 4.02 PM, 4.30 PM, 5.00 PM and 5.30 PM</p>
<p>At 3.59 PM we created the table Mytable1<br />
At 4.10 PM &#8211; Mytable2<br />
At 4.19 PM &#8211; Mytable3<br />
At 4.26 PM &#8211; Mytable4<br />
At 4.34 PM &#8211; Mytable5<br />
At 4.46 PM &#8211; Mytable6<br />
At 5.10 PM &#8211; Mytable7</p>
<p>First &#8211; restore the full backup and specify the STANDBY option. STANDBY leaves the database in a standby state, in which the database is available for limited read-only access. After a RESTORE WITH STANDBY operation, the undo file is automatically deleted by the next RESTORE operation.</p>
<p><code><strong>RESTORE DATABASE AdventureWorks<br />
FROM DISK = 'Drive:\folder\MSSQLBackup\Full\AdventureWorks_backup_201001121400.bak'<br />
WITH REPLACE,<br />
STANDBY = 'Drive:\folder\MSSQLBackup\Full\UNDO_AdventureWorks_backup_201001121400.bak',<br />
MOVE 'AdventureWorks_Data' TO 'Drive:\folder\AdventureWorks.mdf',<br />
MOVE 'AdventureWorks_log' TO 'Drive:\folder\AdventureWorks_log.ldf'<br />
GO</strong></code></p>
<p>Restore the differential backup:</p>
<p><code><strong>RESTORE DATABASE AdventureWorks<br />
FROM DISK = 'Drive:\folder\MSSQLBackup\Diff\AdventureWorks_backup_201001121500.bak'<br />
WITH REPLACE,<br />
STANDBY = 'Drive:\folder\MSSQLBackup\Diff\UNDO_AdventureWorks_backup_201001121500.bak'<br />
GO</strong><br />
</code><br />
Apply the first transaction log backup from 4.02 PM:</p>
<p><code><strong>RESTORE LOG AdventureWorks<br />
FROM DISK = 'Drive:\folder\MSSQLBackup\Log\AdventureWorks_backup_201001121602.trn'<br />
WITH REPLACE,<br />
STANDBY = 'Drive:\folder\MSSQLBackup\Log\UNDO_AdventureWorks_backup_201001121602.trn'<br />
GO</strong></code></p>
<p>Let&#8217;s see what we have &#8211; we see the table Mytable1 now <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Apply the transaction log from 4.30 PM, but I want to have only Mytable1 and Mytable2, so we will stop at 4.15 PM:</p>
<p><code><strong>RESTORE LOG AdventureWorks<br />
FROM DISK = 'Drive:\folder\MSSQLBackup\Log\AdventureWorks_backup_201001121630.trn'<br />
WITH RECOVERY,<br />
STOPAT = N'2010-01-12 16:15:00.000'</strong></code></p>
<p>Done! <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>RECOVERY instructs the restore operation to roll back any uncommitted transactions. After the recovery process, the database is ready for use. If neither NORECOVERY, RECOVERY, nor STANDBY is specified, RECOVERY is the default.</p>
<p>How to view the format of the date:</p>
<p><code><strong>SELECT CURRENT_TIMESTAMP<br />
GO</strong></code></p>
<p>or</p>
<p><code><strong>SELECT GETDATE()<br />
GO</strong></code></p>
<br />Posted in RESTORE Tagged: point in time, RESTORE, SQL 2005 <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/kotako.wordpress.com/162/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/kotako.wordpress.com/162/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/kotako.wordpress.com/162/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/kotako.wordpress.com/162/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/kotako.wordpress.com/162/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/kotako.wordpress.com/162/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/kotako.wordpress.com/162/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/kotako.wordpress.com/162/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/kotako.wordpress.com/162/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/kotako.wordpress.com/162/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/kotako.wordpress.com/162/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/kotako.wordpress.com/162/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/kotako.wordpress.com/162/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/kotako.wordpress.com/162/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kotako.wordpress.com&amp;blog=8566347&amp;post=162&amp;subd=kotako&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://kotako.wordpress.com/2010/01/13/simple-but-important-do-restore-with-t-sql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/58bb125aaefc65f1653509f43f7d790a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kotako</media:title>
		</media:content>
	</item>
		<item>
		<title>Paul Randal&#8217;s article &#8211; TechEd Demo: Creating, detaching, re-attaching, and fixing a suspect database</title>
		<link>http://kotako.wordpress.com/2010/01/06/paul-randals-article-teched-demo-creating-detaching-re-attaching-and-fixing-a-suspect-database/</link>
		<comments>http://kotako.wordpress.com/2010/01/06/paul-randals-article-teched-demo-creating-detaching-re-attaching-and-fixing-a-suspect-database/#comments</comments>
		<pubDate>Wed, 06 Jan 2010 10:58:42 +0000</pubDate>
		<dc:creator>kotako</dc:creator>
				<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[repair]]></category>
		<category><![CDATA[SQL 2005]]></category>

		<guid isPermaLink="false">http://kotako.wordpress.com/?p=157</guid>
		<description><![CDATA[TechEd Demo: Creating, detaching, re-attaching, and fixing a suspect database I liked this article. Especially this: &#8220;After doing an emergency-mode repair, transactions that were active at the time the log was damaged will not get a chance to roll-back, most likely. In this case, I know what was going on when the crash occured, but [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kotako.wordpress.com&amp;blog=8566347&amp;post=157&amp;subd=kotako&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.sqlskills.com/blogs/paul/post/TechEd-Demo-Creating-detaching-re-attaching-and-fixing-a-suspect-database.aspx">TechEd Demo: Creating, detaching, re-attaching, and fixing a suspect database</a></p>
<p>I liked this article. Especially this:</p>
<p>&#8220;After doing an emergency-mode repair, transactions that were active at the time the log was damaged will not get a chance to roll-back, most likely. In this case, I know what was going on when the crash occured, but what about on a busy OLTP system with hundreds or thousands of active transactions? What state will the data be in?&#8221;</p>
<p>&#8220;Yes, you can recover from a detached suspect database, but it&#8217;s not pretty and you have to be very careful. The best course of action is always to have a comprehensive backup strategy that allows you to restore as quickly as possible. If you do have a suspect database and no backups, use EMERGENCY mode to access and/or repair the database. Hopefully this article will help people that find themselves in these situations.&#8221;</p>
<br />Posted in Microsoft, repair, SQL 2005  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/kotako.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/kotako.wordpress.com/157/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/kotako.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/kotako.wordpress.com/157/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/kotako.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/kotako.wordpress.com/157/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/kotako.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/kotako.wordpress.com/157/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/kotako.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/kotako.wordpress.com/157/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/kotako.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/kotako.wordpress.com/157/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/kotako.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/kotako.wordpress.com/157/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kotako.wordpress.com&amp;blog=8566347&amp;post=157&amp;subd=kotako&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://kotako.wordpress.com/2010/01/06/paul-randals-article-teched-demo-creating-detaching-re-attaching-and-fixing-a-suspect-database/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/58bb125aaefc65f1653509f43f7d790a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kotako</media:title>
		</media:content>
	</item>
		<item>
		<title>SQL query &#8211; how long will it take?</title>
		<link>http://kotako.wordpress.com/2010/01/04/sql-query-how-long-will-it-take/</link>
		<comments>http://kotako.wordpress.com/2010/01/04/sql-query-how-long-will-it-take/#comments</comments>
		<pubDate>Mon, 04 Jan 2010 08:40:39 +0000</pubDate>
		<dc:creator>kotako</dc:creator>
				<category><![CDATA[dynamic management views]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[SQL 2005]]></category>

		<guid isPermaLink="false">http://kotako.wordpress.com/?p=140</guid>
		<description><![CDATA[Понякога се налага да изпълняваме команди, които отнемат доста време и за да имаме ясна представа докъде са стигнали: SELECT database_id, command, percent_complete from sys.dm_exec_requests WHERE session_id = spid sys.dm_exec_requests &#8211; returns one row for each request executing within SQL Server database_id &#8211; ID of the database the request is running under command &#8211; identifies [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kotako.wordpress.com&amp;blog=8566347&amp;post=140&amp;subd=kotako&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Понякога се налага да изпълняваме команди, които отнемат доста време и за да имаме ясна представа докъде са стигнали:</p>
<p><code><strong>SELECT database_id, command, percent_complete from sys.dm_exec_requests WHERE session_id = spid</strong></code></p>
<p><strong>sys.dm_exec_requests</strong> &#8211; returns one row for each request executing within SQL Server<br />
<strong>database_id</strong> &#8211; ID of the database the request is running under<br />
<strong>command</strong> &#8211; identifies the type of command that is being processed<br />
<strong>percent_complete</strong> &#8211; Percent of work completed for certain operations, rollbacks included.<br />
This does not provide progress data for queries.</p>
<p>Source: <a href="http://msdn.microsoft.com/en-us/library/ms177648%28SQL.90%29.aspx">MSDN sys.dm_exec_requests</a></p>
<br />Posted in dynamic management views, Microsoft, SQL 2005 Tagged: dynamic management views, Microsoft, SQL 2005 <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/kotako.wordpress.com/140/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/kotako.wordpress.com/140/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/kotako.wordpress.com/140/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/kotako.wordpress.com/140/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/kotako.wordpress.com/140/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/kotako.wordpress.com/140/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/kotako.wordpress.com/140/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/kotako.wordpress.com/140/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/kotako.wordpress.com/140/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/kotako.wordpress.com/140/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/kotako.wordpress.com/140/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/kotako.wordpress.com/140/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/kotako.wordpress.com/140/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/kotako.wordpress.com/140/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kotako.wordpress.com&amp;blog=8566347&amp;post=140&amp;subd=kotako&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://kotako.wordpress.com/2010/01/04/sql-query-how-long-will-it-take/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/58bb125aaefc65f1653509f43f7d790a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">kotako</media:title>
		</media:content>
	</item>
	</channel>
</rss>
