<?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>administation &#8211; SQLpowered.com</title>
	<atom:link href="https://sqlpowered.com/tag/administration/feed/" rel="self" type="application/rss+xml" />
	<link>https://sqlpowered.com</link>
	<description>SQL Server + BI</description>
	<lastBuildDate>Mon, 15 Jun 2020 15:48:05 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	

<image>
	<url>https://sqlpowered.com/wp-content/uploads/2020/07/FavIcon-e1594067873682-99x100.png</url>
	<title>administation &#8211; SQLpowered.com</title>
	<link>https://sqlpowered.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Cannot open database X version 706. Upgrade the database to the latest version.</title>
		<link>https://sqlpowered.com/cannot-open-database-x-version-706-upgrade-the-database-to-the-latest-version/</link>
					<comments>https://sqlpowered.com/cannot-open-database-x-version-706-upgrade-the-database-to-the-latest-version/#respond</comments>
		
		<dc:creator><![CDATA[Jan Dvořák]]></dc:creator>
		<pubDate>Sat, 20 Apr 2019 19:22:04 +0000</pubDate>
				<category><![CDATA[DBA]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[administation]]></category>
		<category><![CDATA[errors]]></category>
		<guid isPermaLink="false">https://sqlpowered.com/?p=3179</guid>

					<description><![CDATA[Past week we were using tool for scanning database metadata across all our production servers and at one of them the tool captured following error when trying to access one of the databases: After some searching and investigating detail about the server we captured two core informations: The database is...]]></description>
										<content:encoded><![CDATA[<p>Past week we were using tool for scanning database metadata across all our production servers and at one of them the tool captured following error when trying to access one of the databases:</p>
<p><img decoding="async" class="alignnone size-full wp-image-3198" src="https://sqlpowered.com/wp-content/uploads/2019/10/Cannot_open_database_Upgrade_1-1.png" alt="" width="722" height="33" srcset="https://sqlpowered.com/wp-content/uploads/2019/10/Cannot_open_database_Upgrade_1-1.png 722w, https://sqlpowered.com/wp-content/uploads/2019/10/Cannot_open_database_Upgrade_1-1-150x7.png 150w, https://sqlpowered.com/wp-content/uploads/2019/10/Cannot_open_database_Upgrade_1-1-300x14.png 300w, https://sqlpowered.com/wp-content/uploads/2019/10/Cannot_open_database_Upgrade_1-1-160x7.png 160w, https://sqlpowered.com/wp-content/uploads/2019/10/Cannot_open_database_Upgrade_1-1-320x15.png 320w, https://sqlpowered.com/wp-content/uploads/2019/10/Cannot_open_database_Upgrade_1-1-520x24.png 520w, https://sqlpowered.com/wp-content/uploads/2019/10/Cannot_open_database_Upgrade_1-1-720x33.png 720w" sizes="(max-width: 722px) 100vw, 722px" /></p>
<p>After some searching and investigating detail about the server we captured two core informations:</p>
<ol>
<li>The database is set for read-only access</li>
<li>The server was upgraded last week to never version (higher service pack).</li>
</ol>
<p>This combination is the root cause of the database to be inaccessible: because it was set read-only during the instance upgrade, setup wasn&#8217;t able to upgrade the database too. The error above appears at every single action to recover now.</p>
<p>All these steps has failed:</p>
<p>1. Set the database for read_write access:</p>
<pre class="lang:tsql decode:true">USE master;  
GO  
ALTER DATABASE [DB1] SET READ_WRITE;  
GO</pre>
<p><img decoding="async" class="alignnone size-full wp-image-3199" src="https://sqlpowered.com/wp-content/uploads/2019/10/Cannot_open_database_Upgrade_2.png" alt="" width="726" height="61" srcset="https://sqlpowered.com/wp-content/uploads/2019/10/Cannot_open_database_Upgrade_2.png 726w, https://sqlpowered.com/wp-content/uploads/2019/10/Cannot_open_database_Upgrade_2-150x13.png 150w, https://sqlpowered.com/wp-content/uploads/2019/10/Cannot_open_database_Upgrade_2-300x25.png 300w, https://sqlpowered.com/wp-content/uploads/2019/10/Cannot_open_database_Upgrade_2-160x13.png 160w, https://sqlpowered.com/wp-content/uploads/2019/10/Cannot_open_database_Upgrade_2-320x27.png 320w, https://sqlpowered.com/wp-content/uploads/2019/10/Cannot_open_database_Upgrade_2-520x44.png 520w, https://sqlpowered.com/wp-content/uploads/2019/10/Cannot_open_database_Upgrade_2-720x60.png 720w" sizes="(max-width: 726px) 100vw, 726px" /></p>
<p>2. Detach the database</p>
<p>3. Backup the database</p>
<p>4. Check if files aren&#8217;t locked at the file system level (read-only attribute)</p>
<p>In the end, we have finished with dropping the database and restoring it from the previous backup which led to successful database version upgrade.</p>
<p>It&#8217;s really one the best practices that before any patching or upgrade of SQL Server instance all read-only database should be set back to read-write mode.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://sqlpowered.com/cannot-open-database-x-version-706-upgrade-the-database-to-the-latest-version/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Kde najít SQL Server 2017 Configuration Manager</title>
		<link>https://sqlpowered.com/kde-najit-sql-server-configuration-manager/</link>
					<comments>https://sqlpowered.com/kde-najit-sql-server-configuration-manager/#respond</comments>
		
		<dc:creator><![CDATA[Jan Dvořák]]></dc:creator>
		<pubDate>Sat, 05 Jan 2019 14:19:53 +0000</pubDate>
				<category><![CDATA[DBA]]></category>
		<category><![CDATA[administation]]></category>
		<guid isPermaLink="false">https://sqlpowered.com/?p=2801</guid>

					<description><![CDATA[Když nainstalujete SQL Server 2017 na nejnovější Windows 10 a bude chtít pomocí SQL Server Configuration Manageru změnit parametry instance, bude jeho ikonu hledat v nainstalovaných programech marně. Nově je totiž Configuration Manager distribuován jako snap-in do Microsoft Management Console (mmc.exe) a pokud jej chcete spustit, použijte WIN+R a zadejte:...]]></description>
										<content:encoded><![CDATA[<p>Když nainstalujete SQL Server 2017 na nejnovější Windows 10 a bude chtít pomocí SQL Server Configuration Manageru změnit parametry instance, bude jeho ikonu hledat v nainstalovaných programech marně. Nově je totiž Configuration Manager distribuován jako snap-in do Microsoft Management Console (mmc.exe) a pokud jej chcete spustit, použijte WIN+R a zadejte:</p>
<ul>
<li>SQLServerManager14.msc =&gt; pro SQL Server 2017</li>
<li>SQLServerManager13.msc =&gt; pro SQL Server 2016</li>
<li>SQLServerManager12.msc =&gt; pro SQL Server 2014</li>
<li>SQLServerManager11.msc =&gt; pro SQL Server 2012</li>
</ul>
<p>Pokud si chcete vytvořit zástupce na ploše, najde jednotlivé verze Manageru zde:</p>
<table>
<tbody>
<tr>
<td>SQL Server 2017</td>
<td>C:\Windows\SysWOW64\SQLServerManager14.msc</td>
</tr>
<tr>
<td>SQL Server 2016</td>
<td>C:\Windows\SysWOW64\SQLServerManager13.msc</td>
</tr>
<tr>
<td>SQL Server 2014 (12.x)</td>
<td>C:\Windows\SysWOW64\SQLServerManager12.msc</td>
</tr>
<tr>
<td>SQL Server 2012 (11.x)</td>
<td>C:\Windows\SysWOW64\SQLServerManager11.msc</td>
</tr>
</tbody>
</table>
<p>Více na <a href="https://docs.microsoft.com/en-us/sql/relational-databases/sql-server-configuration-manager?view=sql-server-2017" target="_blank" rel="noopener noreferrer">MSDN &#8211; SQL Server Configuration Manager</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://sqlpowered.com/kde-najit-sql-server-configuration-manager/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to log SQL Server error messages to SQL/Windows error logs?</title>
		<link>https://sqlpowered.com/sp_altermessage/</link>
					<comments>https://sqlpowered.com/sp_altermessage/#respond</comments>
		
		<dc:creator><![CDATA[Jan Dvořák]]></dc:creator>
		<pubDate>Fri, 08 May 2015 05:57:36 +0000</pubDate>
				<category><![CDATA[DBA]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[administation]]></category>
		<guid isPermaLink="false">https://sqlpowered.com/?p=646</guid>

					<description><![CDATA[Is there an option how to log various SQL Server error messages to SQL Server Error Log and to Windows Error Log? There is one and very simple: we can use system stored procedure sp_altermessage to alter system (message_id &#60; 50 000) messages or user defined messages to be forwarder...]]></description>
										<content:encoded><![CDATA[<p>Is there an option how to log various SQL Server error messages to SQL Server Error Log and to Windows Error Log? There is one and very simple: we can use system stored procedure <a href="https://docs.microsoft.com/en-us/sql/relational-databases/system-stored-procedures/sp-altermessage-transact-sql?view=sql-server-2017" target="_blank" rel="noopener noreferrer">sp_altermessage</a> to alter system (message_id &lt; 50 000) messages or user defined messages to be forwarder to both logs.<span id="more-646"></span>Let see an example:</p>
<pre class="lang:tsql decode:true">EXEC sp_altermessage 102, 'WITH_LOG', 'true'
EXEC sp_altermessage 208, 'WITH_LOG', 'true'
GO

SELECT * F_ROM dbo.table1
GO
SELECT * FROM dbo.invalid_name
GO
</pre>
<p>We have altered two system messages to be stored in SQL/WINDOWS logs:</p>
<p><strong>SQL Server Log:</strong></p>
<p><img fetchpriority="high" decoding="async" class="alignnone size-full wp-image-2985" src="https://sqlpowered.com/wp-content/uploads/2015/05/sp_altermessage_SQL_Serve_Log.png" alt="" width="724" height="658" srcset="https://sqlpowered.com/wp-content/uploads/2015/05/sp_altermessage_SQL_Serve_Log.png 724w, https://sqlpowered.com/wp-content/uploads/2015/05/sp_altermessage_SQL_Serve_Log-110x100.png 110w, https://sqlpowered.com/wp-content/uploads/2015/05/sp_altermessage_SQL_Serve_Log-300x273.png 300w, https://sqlpowered.com/wp-content/uploads/2015/05/sp_altermessage_SQL_Serve_Log-160x145.png 160w, https://sqlpowered.com/wp-content/uploads/2015/05/sp_altermessage_SQL_Serve_Log-320x291.png 320w, https://sqlpowered.com/wp-content/uploads/2015/05/sp_altermessage_SQL_Serve_Log-270x245.png 270w, https://sqlpowered.com/wp-content/uploads/2015/05/sp_altermessage_SQL_Serve_Log-374x340.png 374w, https://sqlpowered.com/wp-content/uploads/2015/05/sp_altermessage_SQL_Serve_Log-495x450.png 495w, https://sqlpowered.com/wp-content/uploads/2015/05/sp_altermessage_SQL_Serve_Log-550x500.png 550w, https://sqlpowered.com/wp-content/uploads/2015/05/sp_altermessage_SQL_Serve_Log-520x473.png 520w" sizes="(max-width: 724px) 100vw, 724px" /></p>
<p><strong>WINDOWS Applications Log:</strong></p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-2986" src="https://sqlpowered.com/wp-content/uploads/2015/05/sp_altermessage_SQL_Serve_Windows_Log.png" alt="" width="759" height="592" srcset="https://sqlpowered.com/wp-content/uploads/2015/05/sp_altermessage_SQL_Serve_Windows_Log.png 759w, https://sqlpowered.com/wp-content/uploads/2015/05/sp_altermessage_SQL_Serve_Windows_Log-128x100.png 128w, https://sqlpowered.com/wp-content/uploads/2015/05/sp_altermessage_SQL_Serve_Windows_Log-300x234.png 300w, https://sqlpowered.com/wp-content/uploads/2015/05/sp_altermessage_SQL_Serve_Windows_Log-160x125.png 160w, https://sqlpowered.com/wp-content/uploads/2015/05/sp_altermessage_SQL_Serve_Windows_Log-320x250.png 320w, https://sqlpowered.com/wp-content/uploads/2015/05/sp_altermessage_SQL_Serve_Windows_Log-314x245.png 314w, https://sqlpowered.com/wp-content/uploads/2015/05/sp_altermessage_SQL_Serve_Windows_Log-436x340.png 436w, https://sqlpowered.com/wp-content/uploads/2015/05/sp_altermessage_SQL_Serve_Windows_Log-577x450.png 577w, https://sqlpowered.com/wp-content/uploads/2015/05/sp_altermessage_SQL_Serve_Windows_Log-641x500.png 641w, https://sqlpowered.com/wp-content/uploads/2015/05/sp_altermessage_SQL_Serve_Windows_Log-520x406.png 520w" sizes="auto, (max-width: 759px) 100vw, 759px" /></p>
<p>Both messages are logged there as expected.</p>
<p>The effect of sp_altermessage with the WITH_LOG option is basically the same as of the RAISERROR WITH LOG parameter, except that sp_altermessage changes the logging behavior for all messages fired inside the engine.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://sqlpowered.com/sp_altermessage/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
