<?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/"
	>

<channel>
	<title>Restart &#8211; Database Research &amp; Development</title>
	<atom:link href="https://www.dbrnd.com/tag/restart/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.dbrnd.com</link>
	<description>BIGData &#124; NoSQL &#124; MSSQL &#124; MySQL &#124; PostgreSQL</description>
	<lastBuildDate>Wed, 01 Feb 2017 03:09:35 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0.6</generator>
	<item>
		<title>SQL Server: After Restart, Database in &#8220;In Recovery&#8221; status, Can&#8217;t Access it</title>
		<link>https://www.dbrnd.com/2017/02/sql-server-after-restart-database-in-in-recovery-status-cant-access-it-database-crashed/</link>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Wed, 01 Feb 2017 16:16:59 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[Database Crashed]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[dbrnd]]></category>
		<category><![CDATA[error log file]]></category>
		<category><![CDATA[In Recovery Mode]]></category>
		<category><![CDATA[Restart]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server Administrator]]></category>
		<category><![CDATA[SQL Server Monitoring]]></category>
		<category><![CDATA[SQL Server Tips and Tricks]]></category>
		<category><![CDATA[SQL Server Tuning]]></category>
		<category><![CDATA[TSQL]]></category>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=3803</guid>

					<description><![CDATA[This is a known issue with SQL Server. Here, I am sharing one situation when I have faced this issue and What are the possible causes to stuck SQL Server Database in &#8220;In Recovery&#8221; status/mode. A few days ago, one of our Junior Database Developer was doing some activity in SQL Server 2012 Express Edition. [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F02%2Fsql-server-after-restart-database-in-in-recovery-status-cant-access-it-database-crashed%2F&amp;linkname=SQL%20Server%3A%20After%20Restart%2C%20Database%20in%20%E2%80%9CIn%20Recovery%E2%80%9D%20status%2C%20Can%E2%80%99t%20Access%20it" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F02%2Fsql-server-after-restart-database-in-in-recovery-status-cant-access-it-database-crashed%2F&amp;linkname=SQL%20Server%3A%20After%20Restart%2C%20Database%20in%20%E2%80%9CIn%20Recovery%E2%80%9D%20status%2C%20Can%E2%80%99t%20Access%20it" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F02%2Fsql-server-after-restart-database-in-in-recovery-status-cant-access-it-database-crashed%2F&amp;linkname=SQL%20Server%3A%20After%20Restart%2C%20Database%20in%20%E2%80%9CIn%20Recovery%E2%80%9D%20status%2C%20Can%E2%80%99t%20Access%20it" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F02%2Fsql-server-after-restart-database-in-in-recovery-status-cant-access-it-database-crashed%2F&amp;linkname=SQL%20Server%3A%20After%20Restart%2C%20Database%20in%20%E2%80%9CIn%20Recovery%E2%80%9D%20status%2C%20Can%E2%80%99t%20Access%20it" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_reddit" href="https://www.addtoany.com/add_to/reddit?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F02%2Fsql-server-after-restart-database-in-in-recovery-status-cant-access-it-database-crashed%2F&amp;linkname=SQL%20Server%3A%20After%20Restart%2C%20Database%20in%20%E2%80%9CIn%20Recovery%E2%80%9D%20status%2C%20Can%E2%80%99t%20Access%20it" title="Reddit" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F02%2Fsql-server-after-restart-database-in-in-recovery-status-cant-access-it-database-crashed%2F&amp;linkname=SQL%20Server%3A%20After%20Restart%2C%20Database%20in%20%E2%80%9CIn%20Recovery%E2%80%9D%20status%2C%20Can%E2%80%99t%20Access%20it" title="Pocket" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F02%2Fsql-server-after-restart-database-in-in-recovery-status-cant-access-it-database-crashed%2F&#038;title=SQL%20Server%3A%20After%20Restart%2C%20Database%20in%20%E2%80%9CIn%20Recovery%E2%80%9D%20status%2C%20Can%E2%80%99t%20Access%20it" data-a2a-url="https://www.dbrnd.com/2017/02/sql-server-after-restart-database-in-in-recovery-status-cant-access-it-database-crashed/" data-a2a-title="SQL Server: After Restart, Database in “In Recovery” status, Can’t Access it"></a></p><p>This is a known issue with SQL Server.</p>
<p>Here, I am sharing one situation when I have faced this issue and What are the possible causes to stuck SQL Server Database in &#8220;In Recovery&#8221; status/mode.</p>
<blockquote><p>A few days ago, one of our Junior Database Developer was doing some activity in SQL Server 2012 Express Edition.<br />
The Task was, To test the Index Rebuild on 6GB of Table.<br />
Without knowing the SQL Server Version, He executed Index Rebuild on that Table and execution started. </p></blockquote>
<blockquote><p>SQL Server Express Edition can allocate only 10GB to each database.</p></blockquote>
<blockquote><p>The operation Index Rebuild require more disk space for rewriting the Table Indexes.<br />
He was doing this exercise on VM of Azure Cloud and RAM is only 1 GB.<br />
The operation was going on and size reached to max limit (10GB).</p></blockquote>
<blockquote><p>Now, SQL Server Engine had to raise one exception like &#8220;Does not sufficient space&#8221;, but before that It had to rollback the operation and It took a couple of minutes.<br />
But meanwhile, Developer came to know that He executed Rebuild Index on SQL Server Express Edition, which may cause a problem of size because already Database size is 6GB.</p></blockquote>
<blockquote><p>Without checking anything, He cancelled the running execution of Rebuild Index Query.<br />
The SQL Server Engine already started one process to Rollback the query, but now It has one explicit request to cancel the Query.</p></blockquote>
<blockquote><p>
A Developer waited for a couple of minutes, but he felt that Database Server was stuck and He restarted the service of SQL Server.</p></blockquote>
<blockquote><p>Restarted SQL Server Service, This is one of the biggest mistakes that he did. </p></blockquote>
<blockquote><p>SQL Server was performing few transactions and he restarted SQL Server Service, which makes your database in &#8220;In Recovery&#8221; mode.</p></blockquote>
<blockquote><p>When he came back to SSMS and found that Database was in &#8220;In Recovery&#8221; mode and He was not able to access that database.</p></blockquote>
<p>He presented the whole situation to me and was telling that Database might be crashed. </p>
<p><strong>Is Database Crashed?</strong></p>
<blockquote><p>No, Internally SQL Server was restoring the database pending operations or transactions.<br />
We should wait for a couple of minutes and automatically SQL Server will restore the database. </p>
<p>This happened because the developer restarted the service when SQL Server was performing a big transaction operation.<br />
There can be also another reason like Transaction log file is very large.</p></blockquote>
<p><strong>How to check, SQL Server weather Restoring Database or Not?</strong></p>
<p>You can check recent error log file of SQL Server, where you can find recent log like below messages.<br />
You can find some progress (%) which SQL Server actually restoring your database so wait for a couple of minutes. </p>
<pre class="crayon-plain-tag">Login failed for user 'sa'. Reason: Failed to open the explicitly specified database 'db_rnd'. 
2016-10-06 00:03:26.85 spid16s     Recovery of database 'db_rnd' (5) is 4% complete (approximately 570 seconds remain). Phase 2 of 3. This is an informational message only. No user action is required.
2016-10-06 00:03:27.74 Logon       Error: 18456, Severity: 14, State: 38.
2016-10-06 00:03:27.74 Logon       Login failed for user 'sa'. Reason: Failed to open the explicitly specified database 'db_rnd'. 
2016-10-06 00:03:29.76 Logon       Error: 18456, Severity: 14, State: 38.
2016-10-06 00:03:29.76 Logon       Login failed for user 'sa'. Reason: Failed to open the explicitly specified database 'db_rnd'. 
2016-10-06 00:03:31.01 spid16s     Recovery of database 'db_rnd' (5) is 5% complete (approximately 530 seconds remain). Phase 2 of 3. This is an informational message only. No user action is required.
2016-10-06 00:03:31.96 Logon       Error: 18456, Severity: 14, State: 38.
2016-10-06 00:03:31.96 Logon       Login failed for user 'sa'. Reason: Failed to open the explicitly specified database 'db_rnd'. 
2016-10-06 00:03:33.98 Logon       Error: 18456, Severity: 14, State: 38.
2016-10-06 00:03:33.98 Logon       Login failed for user 'sa'. Reason: Failed to open the explicitly specified database 'db_rnd'. 
2016-10-06 00:03:34.62 spid16s     Recovery of database 'db_rnd' (5) is 6% complete (approximately 494 seconds remain). Phase 2 of 3. This is an informational message only. No user action is required.
2016-10-06 00:03:36.38 Logon       Error: 18456, Severity: 14, State: 38.
2016-10-06 00:03:36.38 Logon       Login failed for user 'sa'. Reason: Failed to open the explicitly specified database 'db_rnd'. 
2016-10-06 00:03:38.39 Logon       Error: 18456, Severity: 14, State: 38.
2016-10-06 00:03:38.39 Logon       Login failed for user 'sa'. Reason: Failed to open the explicitly specified database 'db_rnd'. 
2016-10-06 00:03:38.54 spid16s     Recovery of database 'db_rnd' (5) is 7% complete (approximately 471 seconds remain). Phase 2 of 3. This is an informational message only. No user action is required.
2016-10-06 00:03:41.23 Logon       Error: 18456, Severity: 14, State: 38.
2016-10-06 00:03:41.23 Logon       Login failed for user 'sa'. Reason: Failed to open the explicitly specified database 'db_rnd'. 
2016-10-06 00:03:42.35 spid16s     Recovery of database 'db_rnd' (5) is 8% complete (approximately 451 seconds remain). Phase 2 of 3. This is an informational message only. No user action is required.
2016-10-06 00:03:43.27 Logon       Error: 18456, Severity: 14, State: 38.
2016-10-06 00:03:43.27 Logon       Login failed for user 'sa'. Reason: Failed to open the explicitly specified database 'db_rnd'. 
2016-10-06 00:03:46.29 Logon       Error: 18456, Severity: 14, State: 38.
2016-10-06 00:03:46.29 Logon       Login failed for user 'sa'. Reason: Failed to open the explicitly specified database 'db_rnd'. 
2016-10-06 00:03:46.58 spid16s     Recovery of database 'db_rnd' (5) is 9% complete (approximately 440 seconds remain). Phase 2 of 3. This is an informational message only. No user action is required.
2016-10-06 00:03:48.32 Logon       Error: 18456, Severity: 14, State: 38.
2016-10-06 00:03:48.32 Logon       Login failed for user 'sa'. Reason: Failed to open the explicitly specified database 'db_rnd'. 
2016-10-06 00:03:50.60 spid16s     Recovery of database 'db_rnd' (5) is 10% complete (approximately 427 seconds remain). Phase 2 of 3. This is an informational message only. No user action is required.
2016-10-06 00:03:51.43 Logon       Error: 18456, Severity: 14, State: 38.
2016-10-06 00:03:51.43 Logon       Login failed for user 'sa'. Reason: Failed to open the explicitly specified database 'db_rnd'. 
2016-10-06 00:03:53.63 Logon       Error: 18456, Severity: 14, State: 38.
2016-10-06 00:03:53.63 Logon       Login failed for user 'sa'. Reason: Failed to open the explicitly specified database 'db_rnd'. 
2016-10-06 00:03:55.38 spid16s     Recovery of database 'db_rnd' (5) is 11% complete (approximately 423 seconds remain). Phase 2 of 3. This is an informational message only. No user action is required.</pre> </p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
