<?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>Troubleshooting - Techyaz.com</title>
	<atom:link href="https://techyaz.com/category/sql-server/troubleshooting/feed/" rel="self" type="application/rss+xml" />
	<link></link>
	<description>Tips, Tutorials and How-to Topics</description>
	<lastBuildDate>Sun, 09 Apr 2023 08:20:07 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.1</generator>

<image>
	<url>https://techyaz.com/wp-content/uploads/2017/11/cropped-Site-icon-150x150.png</url>
	<title>Troubleshooting - Techyaz.com</title>
	<link></link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Fix SQL Error 18456: failed to open the explicitly specified database</title>
		<link>https://techyaz.com/sql-server/failed-to-open-the-explicitly-specified-database/</link>
					<comments>https://techyaz.com/sql-server/failed-to-open-the-explicitly-specified-database/#respond</comments>
		
		<dc:creator><![CDATA[Manvendra Deo Singh]]></dc:creator>
		<pubDate>Sat, 18 Sep 2021 10:16:39 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[HowTO]]></category>
		<category><![CDATA[SQL Server Connectivity Issue]]></category>
		<category><![CDATA[SQL_Error_Code]]></category>
		<guid isPermaLink="false">https://techyaz.com/?p=2747</guid>

					<description><![CDATA[<p>This article will help you fixing SQL Server Error: 18456, Severity: 14, State: 38, Reason: Failed to Open the Explicitly Specified Database. We were getting below error in our SQL Server error log for one of our login. Login Failed&#46;&#46;&#46;</p>
<p>The post <a href="https://techyaz.com/sql-server/failed-to-open-the-explicitly-specified-database/">Fix SQL Error 18456: failed to open the explicitly specified database</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>This article will help you fixing SQL Server  Error: 18456, Severity: 14, State: 38, Reason: Failed to Open the Explicitly Specified Database. We were getting below error in our SQL Server error log for one of our login.</p>



<p><strong>Login Failed – Error: 18456, Severity: 14, State: 38</strong></p>



<p><strong>Reason: Failed to Open the Explicitly Specified Database</strong></p>



<h2 class="wp-block-heading">Fix Error &#8220;Failed to Open the Explicitly Specified Database&#8221;</h2>



<p>The error log is saying &#8220;<em>Failed to Open the Explicitly Specified Database</em>&#8220;, it means either your have specified wrong database in your connection string or your login does not have access to the specified database. You can validate below options to isolate this issue.</p>



<ul class="wp-block-list">
<li>Check whether you have specified correct database in your connection string or not</li>



<li>If you are using correct database then whether the login you are using to establish database connection has access to this specified database or not.</li>



<li>Correct if you find something in any of the above two options.</li>



<li>Check login properties whether it is using correct database as default database configuration or not. If correct database is defined then login has access to that database or not. I will explain about this step in below section as well.</li>



<li>You should also check whether number of connections to the database is exhausted or not. Review your maximum number of connections setting.</li>



<li>Ensure your database is not set to AUTO CLOSE setting or not inaccessible. Database should be online and healthy state to accept connections.</li>



<li>Make sure you have a trust between both machines, database server and the machine from where you are trying to connect. I would suggest you to read below article as well where i have explained various steps to troubleshoot SQL Server connection issues.</li>
</ul>



<p><strong><em>Read more articles on SQL error 18456 and connection issues:</em></strong></p>



<ul class="wp-block-list">
<li><a href="https://techyaz.com/sql-server/how-to-fix-sql-server-error-18456-a-comprehensive-guide/" target="_blank" rel="noreferrer noopener"><strong>How to Fix SQL Server Error 18456: A Comprehensive Guide</strong></a></li>



<li><strong><a href="https://techyaz.com/sql-server/troubleshooting/fix-error-53-not-open-connection-sql-server/" target="_blank" rel="noreferrer noopener">How to fix SQL Server error 53 &#8211; Not able to open database connection</a></strong></li>



<li><strong><a href="https://techyaz.com/sql-server/troubleshooting/login-failed-user_name-microsoft-sql-server-error-18456/" target="_blank" rel="noreferrer noopener">Fix SQL Server error 18456 &#8211; Login failed for user</a></strong></li>
</ul>



<p>Let&#8217;s learn how to check default database settings for a SQL Server login and a user mapping for any database to the login.</p>



<h3 class="wp-block-heading">Check Login Properties</h3>



<p>The solution to fix this issue can also come by reviewing the properties of this login. Launch its properties window and change the default database to the correct one if this setting is showing wrong database. Sometimes, we drop the databases from the SQL Server instances but never update other objects. If this login is not showing any database and it is showing blank then click at its drop-down to choose your desired database as the default database for this login. Click on Ok button to apply that change. You will stop getting this issue after making this change. </p>



<p>You can open login properties windows by right click at the identified login and then choose properties from dropdown options.</p>



<p>Sometimes, you have chosen the default database as &#8220;master&#8221; but your login doesn&#8217;t have connect permission on master database so ensure you have at least connect permission on the database which you are choosing as the default database for your login. You can click at &#8220;User Mapping&#8221; tab from left side pane of the login properties window. You will get all databases in top side of right side pane and level of access in bottom side pane. Click at your database from right side pane along with its level of permission which you want to assign. Click at Ok button to apply this change.</p>



<p>Have a look at below screenshot to understand default database of a login and from where you can access User Mapping tab to provide appropriate access to your database. Your login should have access to both databases, the one mentioned as default database for your login and the specified database in connection strings.</p>



<figure class="wp-block-image size-full is-resized"><img fetchpriority="high" decoding="async" src="//i0.wp.com/techyaz.com/wp-content/uploads/2021/09/image.png" alt="" class="wp-image-2748" width="586" height="526" srcset="https://techyaz.com/wp-content/uploads/2021/09/image.png 585w, https://techyaz.com/wp-content/uploads/2021/09/image-300x269.png 300w" sizes="(max-width: 586px) 100vw, 586px" /><figcaption class="wp-element-caption">SQL Server Login properties window</figcaption></figure>



<p>You can fix SQL error &#8220;Failed to Open the Explicitly Specified Database&#8221; by following above steps. Write your feedback if you have fixed this issue by other way. I will update this article accordingly with credits.</p>
<p>The post <a href="https://techyaz.com/sql-server/failed-to-open-the-explicitly-specified-database/">Fix SQL Error 18456: failed to open the explicitly specified database</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://techyaz.com/sql-server/failed-to-open-the-explicitly-specified-database/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Fix SQL Server Error 121 &#8211; The Semaphore Timeout Period Has Expired</title>
		<link>https://techyaz.com/sql-server/fix-sql-server-error-121-semaphore-timeout-period-has-expired/</link>
					<comments>https://techyaz.com/sql-server/fix-sql-server-error-121-semaphore-timeout-period-has-expired/#respond</comments>
		
		<dc:creator><![CDATA[Manvendra Deo Singh]]></dc:creator>
		<pubDate>Tue, 15 Jun 2021 14:15:47 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[SQL Server Connectivity Issue]]></category>
		<category><![CDATA[SQL_Error_Code]]></category>
		<guid isPermaLink="false">https://techyaz.com/?p=2549</guid>

					<description><![CDATA[<p>Yesterday one of my teammate got a weird error while executing a T-SQL script. We are talking about SQL Server error 121 the semaphore timeout period has expired. Error details are showing below: A transport-level error has occured when receiving&#46;&#46;&#46;</p>
<p>The post <a href="https://techyaz.com/sql-server/fix-sql-server-error-121-semaphore-timeout-period-has-expired/">Fix SQL Server Error 121 &#8211; The Semaphore Timeout Period Has Expired</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Yesterday one of my teammate got a weird error while executing a T-SQL script. We are talking about SQL Server error 121 the semaphore timeout period has expired. Error details are showing below:</p>



<p><strong>A transport-level error has occured when receiving results from the server. (provider: TCP Provider, error: 0 &#8211; The semaphore timeout period has expired.) (Microsoft SQL Server, Error:121)</strong></p>



<p>This was an intermittent issue and when we were executing the script from other server it was not throwing any issue. I did some research on this and found out that this error came because of unstable network connectivity.</p>



<h2 class="wp-block-heading">SQL Server Error 121 The Semaphore Timeout Period Has Expired &#8211; Root Cause</h2>



<p>There are various parameters that can affect network connectivity like network adaptors, packet drop, configured packet size etc. So i would suggest first you should connect to your network team and ask them to look into this issue. If network team has not found anything then you need to check application level network configurations at your level.</p>



<p>You should ask some questions to your network resource like whether any network packet drop being observed or not, or is there any NIC card issue etc. Let&#8217;s assume you have already reached out to network team and they haven&#8217;t found anything. I would suggest you to look into below options at your level to make sure everything is in place and not misconfigured.</p>



<ul class="wp-block-list"><li>Check TCP\IP settings</li><li>Ensure you have appropriate network packet size configured in SQL Server</li><li>Make sure you have properly configured TCP Chimney Offload</li><li>Validate you don&#8217;t have Network Interface Card (NIC) driver issue, you can get it checked with your network team</li></ul>



<h2 class="wp-block-heading">Solution</h2>



<p>I have already described high level areas where you need to look in in above section. Let&#8217;s discuss them further here.</p>



<h4 class="wp-block-heading"><strong>Check TCP\IP settings</strong> </h4>



<p>You should open SQL Server configuration manager and check whether TCP configuration is properly done or not. Make sure to review all settings in SQL Server Network configuration settings. You should also read below article about this settings which causes a network error.</p>



<ul class="wp-block-list"><li><a href="https://techyaz.com/sql-server/troubleshooting/fix-sql-network-interfaces-error-28-server-doesnt-support-requested-protocol/" target="_blank" rel="noreferrer noopener"><strong>Fix: SQL Network Interfaces Error 28&nbsp;– Server doesn’t support requested protocol</strong></a></li></ul>



<h4 class="wp-block-heading"><strong>Review Network Packet Size</strong></h4>



<p>You should also review network packet size configuration in SQL Server. This could be one of the possible reason for this issue. Ideally we should not change the default value of this setting and keep it as it is until you have a specific requirement to change network packet size. Read below article to understand and learn network packet size in SQL Server and also step by step process about how to change the network packet size to your desired value.</p>



<ul class="wp-block-list"><li><a href="https://techyaz.com/sql-server/sql-server-administration/change-network-packet-size-sql-server/" target="_blank" rel="noreferrer noopener"><strong>How to Change Network Packet Size Configuration in SQL Server</strong></a></li></ul>



<h4 class="wp-block-heading"><strong>TCP Chimney Offload</strong></h4>



<p>This settings is very important if we have network related connectivity issue. <a href="https://docs.microsoft.com/en-US/troubleshoot/windows-server/networking/information-about-tcp-chimney-offload-rss-netdma-feature" target="_blank" rel="noreferrer noopener">TCP Chimney Offload</a> is a networking technology that helps transfer the workload from the CPU to a network adapter during network data transfer. It can be enabled or disabled in the following two locations:</p>



<ul class="wp-block-list"><li>The operating system</li><li>The advanced properties page of the network adapter</li></ul>



<p>TCP Chimney Offload will work only if it is enabled in both locations. By default, TCP Chimney Offload is disabled in both these locations. However, OEM installations may enable TCP Chimney Offload in the operating system, in the network adapter, or in both the operating system and the network adapter. </p>



<h4 class="wp-block-heading"><strong>Validate Network related Driver Issues</strong></h4>



<p>You should speak to your network resource and Windows OS platform resource and validate all drivers at OS layer and network layer should be up to date and they should not have any issue. Make sure to update the drivers if you found any issue any of these layer.</p>



<p>I hope you can fix your issue by following above steps mentioned in this article. Comment us how you have fixed this issue, the semaphore timeout period has expired.) (Microsoft SQL Server, Error:121)</p>



<p><strong><span style="color:#2e65d1" class="has-inline-color">Related Articles</span></strong></p>



<ul class="wp-block-list"><li><strong><a href="https://techyaz.com/sql-server/troubleshooting/fix-error-40-network-related-instance-specific-error-occurred-establishing-connection/" target="_blank" rel="noreferrer noopener">SQL Server Error 40: A network-related or instance-specific error occurred while establishing a connection to SQL Server.</a> </strong></li><li><strong><a href="https://techyaz.com/sql-server/troubleshooting/fix-error-1418-the-server-network-address-cannot-be-reached-or-does-not-exist/" target="_blank" rel="noreferrer noopener">Fix Error 1418: The server network address cannot be reached or does not exist.</a></strong></li><li><strong><a href="https://techyaz.com/sql-server/troubleshooting/fix-sql-network-interfaces-error-28-server-doesnt-support-requested-protocol/" target="_blank" rel="noreferrer noopener">Fix: SQL Network Interfaces Error 28&nbsp;– Server doesn’t support requested protocol</a> </strong></li><li><strong><a href="https://techyaz.com/sql-server/troubleshooting/a-network-error-occurred-while-attempting-to-read-from-the-file/" target="_blank" rel="noreferrer noopener">SQL Server Native Client Error 50000: A network error occurred while attempting to read from the file</a></strong></li></ul>
<p>The post <a href="https://techyaz.com/sql-server/fix-sql-server-error-121-semaphore-timeout-period-has-expired/">Fix SQL Server Error 121 &#8211; The Semaphore Timeout Period Has Expired</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://techyaz.com/sql-server/fix-sql-server-error-121-semaphore-timeout-period-has-expired/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Fix SQL Server Error 802: There is insufficient memory available in the buffer pool.</title>
		<link>https://techyaz.com/sql-server/fix-sql-server-error-802-insufficient-memory-in-buffer-pool/</link>
					<comments>https://techyaz.com/sql-server/fix-sql-server-error-802-insufficient-memory-in-buffer-pool/#respond</comments>
		
		<dc:creator><![CDATA[Manvendra Deo Singh]]></dc:creator>
		<pubDate>Sat, 12 Jun 2021 09:37:54 +0000</pubDate>
				<category><![CDATA[Performance Tuning]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[Memory Issues]]></category>
		<category><![CDATA[performance tuning]]></category>
		<guid isPermaLink="false">https://techyaz.com/?p=2533</guid>

					<description><![CDATA[<p>We receive SQL Server error 802 when buffer pool of SQL Server instance is full and cannot grow further. Here, i will discuss about this error 802 insufficient memory available in the buffer pool in this article along with its&#46;&#46;&#46;</p>
<p>The post <a href="https://techyaz.com/sql-server/fix-sql-server-error-802-insufficient-memory-in-buffer-pool/">Fix SQL Server Error 802: There is insufficient memory available in the buffer pool.</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>We receive SQL Server error 802 when buffer pool of SQL Server instance is full and cannot grow further. Here, i will discuss about this <em>error 802 insufficient memory available in the buffer pool</em> in this article along with its possible solution to fix it. Below is the error text you might get on your SQL Server system. </p>



<p><span class="has-inline-color has-luminous-vivid-orange-color">SQLServer Error: 802, There is insufficient memory available in the buffer pool. [SQLSTATE 42000]</span></p>



<h2 class="wp-block-heading"><span style="color:#170ce9" class="has-inline-color">SQL Server Error 802 &#8211; Insufficient Memory Available in the Buffer Pool</span></h2>



<p>The main reason behind getting SQL Server error 802 is your SQL Server instance is under memory pressure and there is not enough memory available to allocate further to buffer pool or buffer pool is restricted to not use memory beyond a certain limit. This might be because of various reasons as i have stated in below section. One of the very easy and straight forward approach to fix this error is to increase more memory to SQL Server system and modify max server memory in SQL Server accordingly.</p>



<h2 class="wp-block-heading"><span style="color:#170ce9" class="has-inline-color">Analysis &amp; Solution</span></h2>



<p>I would suggest to go deeper in this issue before taking any decision to allocate more memory to the system where SQL Server is running. There could be multiple temporary reasons as well which can cause SQL Server to generate below error log:</p>



<p><em><strong>SQL Server Error: 802, There is insufficient memory available in the buffer pool. [SQLSTATE 42000]</strong></em></p>



<p>Let&#8217;s discuss this issue further and ensure to not forget below points before taking any decisions.</p>



<div class="wp-block-group"><div class="wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow">
<ol class="wp-block-list"><li>Check system memory utilization and see if other application (not SQL Server) is not taking enough memory. Try to fix it why a particular application is taking more memory.</li><li>Make sure you have allocated enough memory in min server memory &amp; max server memory setting. You can get these setting by executing <em><strong>sp_configure</strong></em> stored procedure. Sometimes, our server has enough memory but we missed to allocate appropriate memory to SQL Server. Rule is to allocate 80% of server memory to SQL Server under max server memory setting.</li><li>Ensure to <a href="https://techyaz.com/sql-server/enable-lock-pages-in-memory-sql-server/" target="_blank" rel="noreferrer noopener"><strong>enabled Lock Pages in memory</strong></a> on your SQL Server Instance.</li><li>Validate SQL Server version and Ensure you haven&#8217;t exceeded SQL Server edition limits. Like suppose you are running with SQL Server 2012 standard edition which allows only 64 GB of RAM support and if you have allocated more than 64GB RAM then it will not be useful. Either reduce the max server memory setting to 64 or upgrade your SQL Server to leverage bigger chunk of memory utilization. </li><li>Observe your SQL Server workload. Are you getting this error during a specific time frame or operations? Or Are you getting this error when some job or number of adhoc transactions are increased? Gather these details with the help of memory clerks and DBCC MEMORYSTATUS T-SQL statements. Tune your quires and ensure to not run ad hoc queries in large numbers because their plan is not saved in cache and they have to generate sql plan every time you execute them.</li><li>Collect Memory related counters like SQL Server: Buffer Manager, SQL Server: Memory Manager, Page Life Expectancy etc. You can read attached article to understand <a href="https://techyaz.com/sql-server/performance-tuning/top-10-performance-counters-to-identify-sql-server-memory-pressure/" target="_blank" rel="noreferrer noopener"><strong>Top 10 counters to identify memory pressure</strong></a>.</li><li>Review another sp_configure setting min memory per query.</li><li>You can try clearing cache by running below DBCC commands:<ul><li>DBCC FREESYSTEMCACHE</li><li>DBCC FREESESSIONCACHE</li><li>DBCC FREEPROCCACHE</li></ul></li></ol>



<p>If you still have memory pressure after analyzing and implementing solutions given in above section then you have only two options left and this is given below:</p>



<ol class="wp-block-list"><li>Increase Server memory and accordingly increase max server memory in sp_configure</li><li>Reduce your workload on this SQL Server Instance by offloading or segregating the transactions during off peak hours.</li></ol>
</div></div>



<p>Please comment us about your issue experience and let me know how you have fixed your issue.</p>



<p><em><strong><span class="has-inline-color has-vivid-red-color">Related Articles</span></strong></em><strong><em><span class="has-inline-color has-vivid-red-color">:</span></em></strong></p>



<ul class="wp-block-list"><li><a href="https://techyaz.com/sql-server/performance-tuning/sql-server-error-701-there-is-insufficient-system-memory-to-run-this-query/" target="_blank" rel="noreferrer noopener">How to Fix SQL Server Error 701: There is insufficient system memory to run this query</a></li><li><a href="https://techyaz.com/sql-server/understanding-hybrid-buffer-pool-in-sql-server/" target="_blank" rel="noreferrer noopener">Understanding Hybrid Buffer Pool in SQL Server</a></li><li><a href="https://techyaz.com/interview-questions/sql-server-interview-questions/sql-server-dba-interview-questions-answers/" target="_blank" rel="noreferrer noopener">SQL Server Interview Questions &amp; Answers</a></li></ul>
<p>The post <a href="https://techyaz.com/sql-server/fix-sql-server-error-802-insufficient-memory-in-buffer-pool/">Fix SQL Server Error 802: There is insufficient memory available in the buffer pool.</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://techyaz.com/sql-server/fix-sql-server-error-802-insufficient-memory-in-buffer-pool/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Fix:VIEW SERVER STATE permission was denied on object &#8216;server&#8217;, database &#8216;master&#8217;</title>
		<link>https://techyaz.com/sql-server/troubleshooting/fixview-server-state-permission-was-denied-on-object-server-database-master/</link>
					<comments>https://techyaz.com/sql-server/troubleshooting/fixview-server-state-permission-was-denied-on-object-server-database-master/#respond</comments>
		
		<dc:creator><![CDATA[Manvendra Deo Singh]]></dc:creator>
		<pubDate>Thu, 30 Aug 2018 10:52:28 +0000</pubDate>
				<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[logins]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[SQL Server Connectivity Issue]]></category>
		<guid isPermaLink="false">https://techyaz.com/?p=2435</guid>

					<description><![CDATA[<p>Yesterday, one of the app user was complaining that he is not able to execute some of the queries and facing &#8220;VIEW SERVER STATE permission was denied on object &#8216;server&#8217;, database &#8216;master&#8217; . (Microsoft SQL Server, Error 300) &#8221; error while&#46;&#46;&#46;</p>
<p>The post <a href="https://techyaz.com/sql-server/troubleshooting/fixview-server-state-permission-was-denied-on-object-server-database-master/">Fix:VIEW SERVER STATE permission was denied on object &#8216;server&#8217;, database &#8216;master&#8217;</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Yesterday, one of the app user was complaining that he is not able to execute some of the queries and facing &#8220;<em>VIEW SERVER STATE permission was denied on object &#8216;server&#8217;, database &#8216;master&#8217; . (Microsoft SQL Server, Error 300) &#8221; </em>error while executing the script. The screenshot of this error is given below.</p>
<p><img decoding="async" class="alignnone size-full wp-image-2436" src="https://techyaz.com/wp-content/uploads/2018/08/1-error-300-min.jpg" alt="SQL Server Error 300" width="723" height="193" srcset="https://techyaz.com/wp-content/uploads/2018/08/1-error-300-min.jpg 723w, https://techyaz.com/wp-content/uploads/2018/08/1-error-300-min-300x80.jpg 300w" sizes="(max-width: 723px) 100vw, 723px" /></p>
<h3><span style="color: #000000;">VIEW SERVER STATE Permission</span></h3>
<p>This is high level server-level privilege which must not be granted to everybody. Only administrators must have privilege to use view server state permission but we can assign this permission to some users who want to see server level state of your SQL Server instance. Once you will grant this access to any login, he can see result of all DMVs.</p>
<h2><span style="color: #000000;">Solution &#8211; ( Microsoft SQL Server, Error 300 )</span></h2>
<p>We got SQL Server error 300 ( VIEW SERVER STATE permission was denied ) because the login you are using to execute the script doesn&#8217;t have this permission. To fix this issue we will grant view server state permission to the login name. This section will explain how to grant view server state permission to a login.</p>
<h3>Grant VIEW SERVER STATE Permission</h3>
<p>We can assign this permission either using GUI in SQL Server Management Studio or we can simply execute a T-SQL command to get this done. I will explain both ways to assign this permission.</p>
<p><strong><span style="color: #993300;">Using GUI in SQL Server Management Studio</span></strong></p>
<p>Follow below steps to do it using GUI.</p>
<ol>
<li>Launch SQL Server Management Studio.</li>
<li>Connect to the SQL Server Instance.</li>
<li>Navigate to <strong>Security </strong>folder then expand<strong> Logins</strong></li>
<li>Right Click at your login name and choose <strong>Properties</strong></li>
<li>Click at <strong>Securables</strong> tab from left side pane.</li>
<li>In the bottom pane, scroll to the bottom and click at <strong>Grant</strong> option for <strong>View Server State </strong>value.</li>
<li>Now click on apply to close the window. You can now ask your user to test the script again. This time it will work.</li>
</ol>
<p><strong><span style="color: #993300;">Using T-SQL statement in SQL Server Management Studio</span></strong></p>
<ol>
<li>Launch SQL Server Management Studio. Connect to the SQL Server Instance.</li>
<li>Open <strong>New Query </strong>window</li>
<li>Run below T-SQL statement</li>
</ol>
<pre><em><strong><span style="color: #0000ff;">USE master</span></strong></em>
<em><strong><span style="color: #0000ff;">GO</span></strong></em>
<em><strong><span style="color: #0000ff;">GRANT VIEW SERVER STATE TO "LoginName"</span></strong></em></pre>
<p>Once you execute above command, you will have view server state permission on your login name. You can resolve <em><strong>SQL Server error 300</strong></em> <strong><em>VIEW SERVER STATE permission was denied on object &#8216;server&#8217;, database &#8216;master </em></strong>issue by following above steps given in this article.</p>
<h3>Revoke VIEW SERVER STATE Permission</h3>
<p>If you have identified anyone who must not have this permission then you can go ahead and revoke his access post getting proper approvals. Make sure that identified login does not have any business justification before revoking his access. Once you have decided to go ahead to remove view server state permission then you should run below T-SQL statement to get this done. Below steps will tell you how to revoke view server state permission of any login.</p>
<p><em><strong><span style="color: #0000ff;">USE master</span></strong></em></p>
<p><em><strong><span style="color: #0000ff;">REVOKE VIEW SERVER STATE TO &#8220;LoginName&#8221;</span></strong></em></p>
<p><em><strong><span style="color: #0000ff;">GO</span></strong></em></p>
<p>View SERVER STATE permission has been revoked for identified login post successful execution of above statement.</p>
<p>I hope you like this article. Please follow our <a href="https://www.facebook.com/Techyaz/">facebook</a> page and <a href="https://twitter.com/Tech_yaz">Twitter</a> handle to get latest updates.</p>
<p><em><span style="color: #800000;"><strong>Read More:</strong></span></em></p>
<ul>
<li><strong><a href="https://techyaz.com/sql-server/alwayson/sql-server-alwayson-interview-questions-answers/" target="_blank" rel="noopener">SQL Server AlwaysON Interview Questions &amp; Answers</a></strong></li>
<li><strong><a href="https://techyaz.com/interview-questions/sql-server-dba-interview-questions-answers/" target="_blank" rel="noopener">SQL Server DBA Interview Questions &amp; Answers</a></strong></li>
<li><strong><a href="https://techyaz.com/sql-server/alwayson/enhanced-database-failover-in-availability-group/" target="_blank" rel="noopener">Understanding Enhanced Database Failover in Always on Availability Group</a></strong></li>
<li><strong><a href="https://techyaz.com/interview-questions/sql-server-interview-questions/replication-qa-part-1/" target="_blank" rel="noopener">SQL Server Replication Interview Questions &amp; Answers</a></strong></li>
</ul>
<p>The post <a href="https://techyaz.com/sql-server/troubleshooting/fixview-server-state-permission-was-denied-on-object-server-database-master/">Fix:VIEW SERVER STATE permission was denied on object &#8216;server&#8217;, database &#8216;master&#8217;</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://techyaz.com/sql-server/troubleshooting/fixview-server-state-permission-was-denied-on-object-server-database-master/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>SQL Server Native Client Error 50000: A network error occurred while attempting to read from the file</title>
		<link>https://techyaz.com/sql-server/troubleshooting/a-network-error-occurred-while-attempting-to-read-from-the-file/</link>
					<comments>https://techyaz.com/sql-server/troubleshooting/a-network-error-occurred-while-attempting-to-read-from-the-file/#respond</comments>
		
		<dc:creator><![CDATA[Manvendra Deo Singh]]></dc:creator>
		<pubDate>Mon, 25 Jun 2018 12:59:40 +0000</pubDate>
				<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[HowTO]]></category>
		<category><![CDATA[installation]]></category>
		<category><![CDATA[SQL_Error_Code]]></category>
		<guid isPermaLink="false">https://techyaz.com/?p=2410</guid>

					<description><![CDATA[<p>Yesterday i have received SQL Server Native Client Error 5000 while installing SQL Server Management Studio on one of the client machine. The description for this error code was given as &#8220;A network error occurred while attempting to read from&#46;&#46;&#46;</p>
<p>The post <a href="https://techyaz.com/sql-server/troubleshooting/a-network-error-occurred-while-attempting-to-read-from-the-file/">SQL Server Native Client Error 50000: A network error occurred while attempting to read from the file</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Yesterday i have received SQL Server Native Client Error 5000 while installing SQL Server Management Studio on one of the client machine. The description for this error code was given as <em>&#8220;A network error occurred while attempting to read from the file &lt;Filename&gt;.&#8221; </em> Here i will describe and explain about SQL Server Error 50000 and it&#8217;s fix to make SQL Server installation successful.</p>
<p><img decoding="async" class="size-full wp-image-2411 alignright" src="https://techyaz.com/wp-content/uploads/2018/06/SQL-Native-Client-Error-50000.png" alt="SQL Server Native Client Error 50000" width="300" height="300" srcset="https://techyaz.com/wp-content/uploads/2018/06/SQL-Native-Client-Error-50000.png 300w, https://techyaz.com/wp-content/uploads/2018/06/SQL-Native-Client-Error-50000-150x150.png 150w, https://techyaz.com/wp-content/uploads/2018/06/SQL-Native-Client-Error-50000-160x160.png 160w, https://techyaz.com/wp-content/uploads/2018/06/SQL-Native-Client-Error-50000-320x320.png 320w" sizes="(max-width: 300px) 100vw, 300px" /></p>
<h3><span style="color: #333399;">SQL Server Native Client Error 50000</span></h3>
<p>Before explaining about SQL native client error 50000, i would like to describe about what is SQL Server native client. As per MSDN <em>&#8220;SQL Server Native Client, is a term that has been used interchangeably to refer to ODBC and OLE DB drivers for SQL Server.&#8221; </em></p>
<p>SQL Server Native Client is a technology that we can use to access data in a SQL Server database. There are several factors you should consider while deciding whether to use SQL Server Native client or some other data access technology. You can read attached article about <a href="https://docs.microsoft.com/en-us/sql/relational-databases/native-client/when-to-use-sql-server-native-client?view=sql-server-2016">when to use SQL Server Native Client.</a></p>
<p>Generally, we get SQL Server native client error 50000 while installing or updating native client software or a software component that uses SQL Server Native Client and your target machine already have this installed previously using some msi file.</p>
<p>You can also get this issue if SQL Server native client file <em>sqlncli.msi </em>has been renamed after its installation and later today when you are trying to update it, you will end up with this SQL error 50000 . If somehow native client installation file has been renamed on your machine, setup will not find its file to update SQL Server native client and through below error.</p>
<p><span style="color: #ff0000;"><em>A network error occurred while attempting to read from the file &lt;Filename&gt;.&#8221;</em></span></p>
<h3><span style="color: #333399;">Solution</span></h3>
<p>To fix this error, you should uninstall installed version of SQL Server native client from add/remove program and then you can try to install SQL Server or its component again. This time you will not get any error and your software or native client will be installed. To avoid further issue, you can reboot the machine post uninstalling the native client tool.</p>
<p>If you are installing only SQL Server native client and not SQL Server then you can download it from Microsoft website and then reinstall it again.</p>
<p>You can also prevent this error to not generate in future by not installing it using its msi file sqlncli.msi. If you had installed it using this file, make sure to never rename it as well.</p>
<p>Here, I have shown you how to fix SQL Server Native Client Error 50000, <em>&#8220;A network error occurred while attempting to read from the file &lt;Filename&gt;.&#8221; </em> I hope you like this article. Please follow our <a href="https://www.facebook.com/Techyaz/">Facebook</a> page and <a href="https://twitter.com/Tech_yaz">Twitter</a> handle to get latest updates.</p>
<p><em><strong><span style="color: #800000;">Read More:</span></strong></em></p>
<ul>
<li><strong><a href="https://techyaz.com/sql-server/troubleshooting/fix-sql-server-error-5009/" target="_blank" rel="noopener">Fix SQL Server Error 5009: One or more files listed in the statement could not be found or could not be initialized</a></strong></li>
<li><strong><a href="https://techyaz.com/sql-server/troubleshooting/fix-sql-server-error-attributes-not-match/" target="_blank" rel="noopener">Fix SQL Server Installation Error: Attributes do not match</a></strong></li>
<li><strong><a href="https://techyaz.com/sql-server/troubleshooting/fix-sql-server-installation-error-1639/" target="_blank" rel="noopener">How to Fix SQL Server Installation Error 1639?</a></strong></li>
<li><strong><a href="https://techyaz.com/interview-questions/sql-server-dba-interview-questions-answers/" target="_blank" rel="noopener">SQL Server DBA Interview Questions &amp; Answers</a></strong></li>
</ul>
<p>The post <a href="https://techyaz.com/sql-server/troubleshooting/a-network-error-occurred-while-attempting-to-read-from-the-file/">SQL Server Native Client Error 50000: A network error occurred while attempting to read from the file</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://techyaz.com/sql-server/troubleshooting/a-network-error-occurred-while-attempting-to-read-from-the-file/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>SQL Server Error 5009: One or more files listed in the statement could not be found or could not be initialized</title>
		<link>https://techyaz.com/sql-server/troubleshooting/fix-sql-server-error-5009/</link>
					<comments>https://techyaz.com/sql-server/troubleshooting/fix-sql-server-error-5009/#comments</comments>
		
		<dc:creator><![CDATA[Manvendra Deo Singh]]></dc:creator>
		<pubDate>Wed, 30 May 2018 14:47:37 +0000</pubDate>
				<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[bulk import performance]]></category>
		<category><![CDATA[data file]]></category>
		<category><![CDATA[log files]]></category>
		<category><![CDATA[SQL_Error_Code]]></category>
		<guid isPermaLink="false">https://techyaz.com/?p=2355</guid>

					<description><![CDATA[<p>I had to add a log file to a database and then extend the size of this log file to a specific value. I got SQL Server error 5009 while creating the log file and got same error code again&#46;&#46;&#46;</p>
<p>The post <a href="https://techyaz.com/sql-server/troubleshooting/fix-sql-server-error-5009/">SQL Server Error 5009: One or more files listed in the statement could not be found or could not be initialized</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>I had to add a log file to a database and then extend the size of this log file to a specific value. I got SQL Server error 5009 while creating the log file and got same error code again while extending the size of this file. Here i will describe how to fix Microsoft SQL Server Error 5009 while adding a database file or removing a database file or extending the database file size. You can see the screenshot of this error in below image while adding the log file.</p>
<p><img loading="lazy" decoding="async" class="size-full wp-image-2356 aligncenter" src="https://techyaz.com/wp-content/uploads/2018/05/1-error-5009-min.jpg" alt="Microsoft SQL Server Error 5009" width="598" height="232" srcset="https://techyaz.com/wp-content/uploads/2018/05/1-error-5009-min.jpg 598w, https://techyaz.com/wp-content/uploads/2018/05/1-error-5009-min-300x116.jpg 300w" sizes="auto, (max-width: 598px) 100vw, 598px" /></p>
<h3><span style="color: #333399;">Microsoft SQL Server Error 5009 While Adding Database File</span></h3>
<p>I was working on a migration project where we had to load huge data in a SQL Server database on the target server. To optimize data load performance, we had decided to create database with the final size on the destination server. The final size of database post data import was around 800 GB. We made some configurational changes to reduce data import time. Extending database files size was one of the step to reduce data load time. If you want to learn<strong> <a href="https://techyaz.com/sql-server/improve-sql-server-bulk-data-import-performance/" target="_blank" rel="noopener">how to speed up data import</a></strong> then I would suggest reading attached article.</p>
<p>We decided to add one more log file on separate drive considering extensive log growth during data load. While adding the log file, we got error 5009. Full error details are given below.</p>
<p><em><span style="color: #ff0000;">One or more files listed in the statement could not be found or could not be initialized. CREATE FILE encountered operating system error 5(Access is denied.) while attempting to open or create the physical file &#8216;T:\Techyaz_log3.ldf&#8217;.(Microsoft SQL Server, Error: 5009)</span></em></p>
<p>As error suggests, I don&#8217;t had enough permission to create this file on given location where i was trying to create the log file. There are two solutions to fix this issue. First solution is to set the Operating system permission on the mentioned .ldf file to full permission for your login account and SQL Server service account. While second solution is to change the location to the path where you have enough permission to create or add database files. Any of these two solutions will fix your problem. Let&#8217;s go to another version of Microsoft SQL Server Error 5009 while extending the log file.</p>
<h3><span style="color: #333399;">Microsoft SQL Server Error 5009 While Extending the Size of Log File</span></h3>
<p>When i changed the location to create this ldf file to a directory <em>T:\Data\Techyaz_log3.ldf </em>this time log file was created but we get same issue again while extending the size of this log file. Next, I was assigning bigger value to each data and log files. We had successfully increased data files size in few minutes because we had already <strong><a href="https://techyaz.com/sql-server/instant-file-initialization-enable-on-sql-server-instance/" target="_blank" rel="noopener">enabled Instant File Initialization to skip zeros process</a></strong> on storage but we faced Microsoft SQL Server error 5009 again while increasing the size of log files. i was extending  log file with bigger values. As we know Instant File Initialization does not work for transaction log files so extending the size of log files was taking lot of time. This time access denied issue was disappeared but error 5009 issue was there only. Error description for this error is given below.</p>
<p><em><span style="color: #ff0000;">Msg 5009, Level 16, State 9, Line 1</span></em><br />
<em><span style="color: #ff0000;">One or more files listed in the statement could not be found or could not be initialized.</span></em></p>
<p>To fix this error, we had passed small value to extend the file size. Earlier we were trying to increase the log file in a slot of 40 GB in single go. It was taking time to finish but most of time log file size got extended with 40GB but sometimes we had received above Microsoft SQL Server error 5009. When we got this error, we extend the size of log file to 10Gb in place of 40GB that we were doing previously. Reducing the value while extending the log file has fixed this issue and log files had been extended to its future size successfully.</p>
<h3><span style="color: #333399;">Microsoft SQL Server Error 5009 While Removing Database File</span></h3>
<p>Some of the blogs have suggested that they got SQL Server error 5009 while removing a logical file in SQL Server but surprisingly I got this error while creating or increasing the size of log file. So if you are getting this error while removing any database file then you can keep reading this article to solve this issue.</p>
<p>Whenever we add any database file then its entry got captured in system catalog files, if you are trying to delete any database file then there might be possibility that logical name of the file that you try to remove is not unique in the system catalog tables. For example, this issue occurs if the file existed in the database earlier, and then the file was removed. When you remove the file, it will try to drop earlier file that has been removed but its metadata is not cleaned and appear like ghost file.</p>
<p>You should follow below steps to fix this issue.</p>
<ul>
<li>Create a new logical file with different name and the same data type. For example, If your file;s logical name is Techyaz_Logical_Name then create this new file with “Techyaz_Logical_Name_New&#8221;. Run below command to create this file.</li>
</ul>
<pre style="padding-left: 60px;"><span style="color: #0000ff;"><strong>ALTER DATABASE [Techyaz] 
ADD FILE ( NAME = N'Techyaz_Logical_Name_New', FILENAME = N'T:\DATA\Techyaz_file4.ndf', SIZE = 10MB, MAXSIZE = 100MB)</strong></span></pre>
<ul>
<li>Now we will remove the logical file that we have created in step 1, as in the following example:</li>
</ul>
<pre style="padding-left: 60px;"><span style="color: #0000ff;"><strong>ALTER DATABASE [Techyaz] REMOVE FILE [Techyaz_Logical_Name_New]</strong></span></pre>
<ul>
<li>Run a transaction log backup of the database.</li>
<li>Now go ahead and remove the logical file that were trying to remove earlier and your received Microsoft SQL Server Error 5009.</li>
</ul>
<p>Here, I have described multiple possibilities and fixes for Microsoft SQL Server Error 5009. I hope you like this article. Please follow us on our <a href="https://www.facebook.com/Techyaz/">facebook page</a> and on <a href="https://twitter.com/Tech_yaz">Twitter </a>handle to get latest updates.</p>
<p><span style="color: #800000;"><em><strong>Read More:</strong></em></span></p>
<ul>
<li><strong><a href="https://techyaz.com/sql-server/troubleshooting/manage-transaction-log-file-during-data-load/" target="_blank" rel="noopener">Manage Transaction Log File during Data Load</a></strong></li>
<li><strong><a href="https://techyaz.com/sql-server/get-total-virtual-log-files/" target="_blank" rel="noopener">How to get total no of virtual log files in a transaction log file</a></strong></li>
<li><strong><a href="https://techyaz.com/sql-server/troubleshooting/fix-error-3023-error-3013-error-3041/" target="_blank" rel="noopener">Fix Error 3023: Shrink failed for Log file</a></strong></li>
<li><strong><a href="https://techyaz.com/sql-server/understanding-transaction-log-architecture/" target="_blank" rel="noopener">Understanding SQL Server Transaction Log Architecture</a></strong></li>
<li><strong><a href="https://techyaz.com/sql-server/troubleshooting/fix-error-1105/" target="_blank" rel="noopener">Fix SQL Server Error 1105: Could Not Allocate Space for Object in Database because the Filegroup is Full</a></strong></li>
<li><strong><a href="https://techyaz.com/sql-server/troubleshooting/fix-msg-5144-and-5145-for-long-or-failed-autogrow/" target="_blank" rel="noopener">Fix SQl Server Error 5144 and 5145 for long and failed Autogrow of data and log file</a></strong></li>
</ul>
<p>The post <a href="https://techyaz.com/sql-server/troubleshooting/fix-sql-server-error-5009/">SQL Server Error 5009: One or more files listed in the statement could not be found or could not be initialized</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://techyaz.com/sql-server/troubleshooting/fix-sql-server-error-5009/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>Top Perfmon Counters to Identify SQL Server CPU Bottleneck</title>
		<link>https://techyaz.com/sql-server/performance-tuning/top-perfmon-counters-to-identify-sql-server-cpu-bottleneck/</link>
					<comments>https://techyaz.com/sql-server/performance-tuning/top-perfmon-counters-to-identify-sql-server-cpu-bottleneck/#respond</comments>
		
		<dc:creator><![CDATA[Manvendra Deo Singh]]></dc:creator>
		<pubDate>Tue, 01 May 2018 13:39:32 +0000</pubDate>
				<category><![CDATA[Performance Tuning]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server Administration]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[bulk import performance]]></category>
		<category><![CDATA[Perfmon Counters]]></category>
		<category><![CDATA[Perfmon CPU Counters]]></category>
		<category><![CDATA[performance tuning]]></category>
		<guid isPermaLink="false">http://techyaz.com/?p=2203</guid>

					<description><![CDATA[<p>We should always monitor system resource utilization of our database servers and make sure that these utilizations should not exceed the benchmark ranges of our environment. Today, I will explain about monitoring top perfmon counters for CPU usage. If your&#46;&#46;&#46;</p>
<p>The post <a href="https://techyaz.com/sql-server/performance-tuning/top-perfmon-counters-to-identify-sql-server-cpu-bottleneck/">Top Perfmon Counters to Identify SQL Server CPU Bottleneck</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>We should always monitor system resource utilization of our database servers and make sure that these utilizations should not exceed the benchmark ranges of our environment. Today, I will explain about monitoring top perfmon counters for CPU usage. If your database server is continuously showing high CPU usage that means you need to look in to top perfmon counters to identify SQL Server CPU bottleneck. You can monitor these performance counter values to detect the CPU pressure.</p>
<p>I have already explained top performance counters to detect Memory and Disk IO bottlenecks in SQL Server in my last articles. Have a look at them (attached below) to get Memory and Disk IO related performance counters and their ideal values for healthy system.</p>
<ul>
<li><strong><a href="http://techyaz.com/sql-server/troubleshooting/top-10-performance-counters-to-identify-sql-server-memory-pressure/" target="_blank" rel="noopener">Top 10 Performance Counters to Identify SQL Server Memory Pressure</a></strong></li>
<li><strong><a href="http://techyaz.com/sql-server/identify-disk-bottleneck-using-perfmon-counters/" target="_blank" rel="noopener">Identify Disk Bottleneck in SQL Server using Perfmon Disk Counters</a></strong></li>
</ul>
<p>Generally, CPU bottleneck arises because of either your system has not enough CPUs to process current workload or your transactions or applications are poorly designed that causes the high CPU. To deal with SQL Server CPU pressure, we need to either find the high CPU intensive queries and optimize them or increase the total CPU counts of the database server to handle current workload. There can be multiple reasons for high CPU usage like high recompilations of SQL Queries, OS issues, Query design issues: Sorting Joins, Poor Indexes, Condition Clauses etc. Here, I am going to explain about top perfmon counters to identify SQL Server CPU bottleneck.</p>
<h3><span style="color: #333399;">Perfmon Counters for CPU Usage</span></h3>
<p><img loading="lazy" decoding="async" class="size-full wp-image-2204 alignright" src="http://techyaz.com/wp-content/uploads/2018/05/Top-Perfmon-Counters-for-CPU-Usage.png" alt="Top Perfmon Counters for CPU Usage" width="300" height="300" srcset="https://techyaz.com/wp-content/uploads/2018/05/Top-Perfmon-Counters-for-CPU-Usage.png 300w, https://techyaz.com/wp-content/uploads/2018/05/Top-Perfmon-Counters-for-CPU-Usage-150x150.png 150w, https://techyaz.com/wp-content/uploads/2018/05/Top-Perfmon-Counters-for-CPU-Usage-160x160.png 160w, https://techyaz.com/wp-content/uploads/2018/05/Top-Perfmon-Counters-for-CPU-Usage-320x320.png 320w" sizes="auto, (max-width: 300px) 100vw, 300px" /></p>
<p>Here, I am going to describe about perfmon counters for CPU usage in SQL Server. Ideally, first we should start with looking at CPU usage in Windows Task Manager. If the CPU utilization is continuously going beyond 85%, it means your system is facing CPU bottleneck. Find the list of performance counters to identify SQL Server CPU bottleneck.</p>
<h5><span style="color: #993300;">Processor: % Processor Time </span></h5>
<p>One of the very useful CPU perfmon counter for SQL Server is <em>Processor: % Processor Time.</em> This counter displays the percentage of time CPU spends executing a thread that is not idle. If your system is frequently reaching beyond 85% then it means your system is facing CPU bottleneck. The acceptable value for this counter should be less than 50%.</p>
<h5><span style="color: #993300;">Processor: % User Time</span></h5>
<p>Windows operating system has two modes of processing for any process. One is Kernel mode another one is user mode. This counter shows the percentage of time a process spends executing user processes like SQL Server. If this counter is high it means CPU pressure is because of SQL Server or because of user applications. You should focus to retrieve CPU intensive queries to get the culprit transactions that are causing high CPU pressure. There is no idle value for this counter. You should benchmark each system based on your workload.</p>
<h5><span style="color: #993300;">Processor: % Privilege Time</span></h5>
<p>This counter shows the percentage of time the processor spends on execution of Microsoft Windows kernel commands, such as processing of SQL Server I/O requests. This counter captures the information about kernel mode and indicates towards poor performance of disk subsystems. Monitor DISK IO related performance counters to identify DISK IO bottleneck and if possible, consider installing a faster or more efficient disk subsystem.</p>
<h5><span style="color: #993300;">Processor: % Interrupt Time</span></h5>
<p>This counter <em>Processor: % Interrupt Time </em>tells about the time a processor spends receiving and servicing hardware interruptions during specific sample intervals. This counter indicates a possible hardware issue if the value is greater than 15 percent.</p>
<h5><span style="color: #993300;">System: Processor Queue Length</span></h5>
<p>This is an important perfmon counter to detect CPU bottleneck. This counter gives information about the number of threads waiting for processor time. If value of this counter is greater than zero then this is a sign of CPU bottleneck. We can further check <em>Compilations/sec</em> and <em>Re-Compilations/sec</em>. A high number of compilations and recompilations usually indicates poor reuse of the query plans. This can be fixed by optimizing your queries and stored procedures.</p>
<h5><span style="color: #993300;">System: Calls/sec</span></h5>
<p>Any system would have either software calls or application related calls or hardware related calls. This counter<em> System: Calls/sec</em> metric shows the number of software calls to the operating system service routines per second. Similarly, another CPU perform counter <em>Processor: Interrupts/Sec</em> shows the number of hardware calls to the processor. Both perfmon counters can be used to determine the source of the performance issues. The acceptable values for <em>System: Calls/sec</em> are under 20,000. Higher values might indicate excessive operating system activity caused by software applications.</p>
<h5><span style="color: #993300;">Context Switches/sec</span></h5>
<p>Context Switches occurs when kernel switches processor from one thread to another<em>. </em>The acceptable <em>Context Switches/sec</em> value should be less than 2,000 per processor. If you are observing constant high values of <em>Context Switches/sec</em> and <em>Processor: % Processor Time</em> on your system then this would be a clear sign of processor bottlenecks. Permanent solution to reduce CPU bottleneck is to change the processor to a more powerful one, or add an additional to existing ones.</p>
<p>You might have seen high <em>Context Switches/sec</em> values for systems that are running with multiple SQL Server instances or a system that is hosted other applications along with SQL Server.</p>
<p>Here I have described top perfmon counters for CPU usage on your database server. I hope you like this article. Please follow our <a href="https://www.facebook.com/Techyaz/">Facebook</a> page and <a href="https://twitter.com/Tech_yaz">Twitter</a> handle to get latest updates.</p>
<p><em><strong><span style="color: #800000;">Read More:</span></strong></em></p>
<ul>
<li><strong><a href="http://techyaz.com/sql-server/performing-online-index-rebuild-operation/" target="_blank" rel="noopener">Disk and Performance Impact of running Online Index Rebuild Operation</a></strong></li>
<li><strong><a href="http://techyaz.com/sql-server/avoid-database-shrink-operation/" target="_blank" rel="noopener">Understanding Database Shrink Operation and Why should you Avoid it?</a></strong></li>
<li><strong><a href="http://techyaz.com/sql-server/troubleshooting/sql-server-error-701-there-is-insufficient-system-memory-to-run-this-query/" target="_blank" rel="noopener">Fix Error 701: There is Insufficient System Memory to Run this Query</a></strong></li>
<li><strong><a href="http://techyaz.com/sql-server/improve-sql-server-bulk-data-import-performance/" target="_blank" rel="noopener">How to Improve Bulk Data Load Performance?</a></strong></li>
</ul>
<p>&nbsp;</p>
<p>The post <a href="https://techyaz.com/sql-server/performance-tuning/top-perfmon-counters-to-identify-sql-server-cpu-bottleneck/">Top Perfmon Counters to Identify SQL Server CPU Bottleneck</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://techyaz.com/sql-server/performance-tuning/top-perfmon-counters-to-identify-sql-server-cpu-bottleneck/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Top 10 Performance Counters to Identify SQL Server Memory Pressure</title>
		<link>https://techyaz.com/sql-server/performance-tuning/top-10-performance-counters-to-identify-sql-server-memory-pressure/</link>
					<comments>https://techyaz.com/sql-server/performance-tuning/top-10-performance-counters-to-identify-sql-server-memory-pressure/#respond</comments>
		
		<dc:creator><![CDATA[Manvendra Deo Singh]]></dc:creator>
		<pubDate>Mon, 30 Apr 2018 11:52:11 +0000</pubDate>
				<category><![CDATA[Performance Tuning]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server Administration]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[Wait Types]]></category>
		<category><![CDATA[Memory Issues]]></category>
		<category><![CDATA[Perfmon Counters]]></category>
		<category><![CDATA[Perfmon Memory Counters]]></category>
		<category><![CDATA[performance tuning]]></category>
		<category><![CDATA[SQL_Server_Memory_Management]]></category>
		<guid isPermaLink="false">http://techyaz.com/?p=2196</guid>

					<description><![CDATA[<p>Memory is one of the important system resource that SQL Server uses to process their transactions. Sometimes, your server might face memory bottleneck that reduces the performance of running transactions. Here, I will explain top 10 performance counters to identify&#46;&#46;&#46;</p>
<p>The post <a href="https://techyaz.com/sql-server/performance-tuning/top-10-performance-counters-to-identify-sql-server-memory-pressure/">Top 10 Performance Counters to Identify SQL Server Memory Pressure</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Memory is one of the important system resource that SQL Server uses to process their transactions. Sometimes, your server might face memory bottleneck that reduces the performance of running transactions. Here, I will explain top 10 performance counters to identify SQL Server memory pressure or memory bottleneck. If your system is facing insufficient system memory then i would recommend you to read below article.</p>
<ul>
<li><strong><a href="http://techyaz.com/sql-server/troubleshooting/sql-server-error-701-there-is-insufficient-system-memory-to-run-this-query/" target="_blank" rel="noopener">Fix SQL Server Error 701: There is Insufficient System Memory to Run this Query</a></strong></li>
</ul>
<p>We can use Windows PerfMon utility to gather current values of all given performance counters. Just type <em>perfmon</em> in <em>run</em> prompt to launch perfmon tool to gather memory related performance counters. Although, Microsoft has also given a DMV related to performance counters that is very useful in collecting data and detecting CPU, IO or memory bottleneck in SQL Server. You can run below command to get all performance counters and their respective values using DMV <em>sys.dm_os_performance_counters</em>. You can also use this DMV to get performance counter values to identify memory pressure in SQL Server.</p>
<pre><strong><span style="color: #0000ff;">Select * from sys.dm_os_performance_counters</span></strong></pre>
<p>By default, SQL Server changes its memory requirements dynamically, on the basis of available system resources. I have explained SQL Server Memory Management and how SQL Server allocated memory to their transactions in below attached article.</p>
<ul>
<li><strong><a href="http://techyaz.com/sql-server/sql-server-memory-allocation-min-max-server-memory-configuration/" target="_blank" rel="noopener">SQL Server Memory Allocation &amp; Role of MIN/MAX Server Memory Configuration</a></strong></li>
</ul>
<h3><span style="color: #333399;">Performance Counters to Identify SQL Server Memory Pressure</span></h3>
<p>Let’s discuss top perfmon counters for memory usages to identify its bottleneck. Below is the list of top 10 performance counters to identify SQL Server Memory pressure. If you want to read CPU and Disk IO related perfmon counters then i would suggest you to read below attached articles.</p>
<ul>
<li><strong><a href="http://techyaz.com/sql-server/troubleshooting/top-perfmon-counters-to-identify-sql-server-cpu-bottleneck/" target="_blank" rel="noopener">Top Perfmon Counters to Identify SQL Server CPU Bottleneck</a></strong></li>
<li><strong><a href="http://techyaz.com/sql-server/identify-disk-bottleneck-using-perfmon-counters/" target="_blank" rel="noopener">Identify Disk Bottleneck in SQL Server using Perfmon Disk Counters</a></strong></li>
</ul>
<h5><span style="color: #993300;">Memory: Available Bytes</span></h5>
<p>First thing you should look at in case of memory bottleneck in SQL Server is the available memory that can be used by processes. You can get this value by looking at the counter <em>Available Bytes</em> under object <em>Memory</em>. Low value of this counter shows the memory shortage on this server.  Now, you should focus behind the reason of this memory shortage. There might be possibility that some of your applications running on your server are not releasing memory or your system has not enough memory to perform current workload that leads to the memory bottleneck in SQL Server.</p>
<h5><span style="color: #993300;">Memory: Pages/sec</span></h5>
<p>This counter indicates the total number of pages that are either read from disk or written to the disk due to page fault. When a process requests a data page that is not in memory then it will be retrieved from disk to memory. This process is known is page fault. High value of this counter could indicate the excessive paging. We should further monitor Memory: Page Faults/sec counter to go indepth information. The average <em>Pages/sec</em> value should be below 50. A high value of <em>Pages/sec</em> indicates intensive memory activities like read from and write to disk. It means transactions are getting enough memory that is why they are using disk to process their requests.</p>
<h5><span style="color: #993300;">Memory: Page Faults/sec</span></h5>
<p>High value of counter <em>Memory: Pages/sec</em> could indicate the excessive paging. Next, we should monitor the <em>Memory: Page Faults/sec</em> counter to make sure that the disk activity is not caused by paging. If you want to determine whether SQL Server or another process is causing excessive paging then we should monitor the <em>Process: Page Faults/sec</em> counter for the SQL Server process instance. This will give an exact picture whether SQL Server is causing this paging issue or not.</p>
<h5><span style="color: #993300;">Process: Working Set</span></h5>
<p>This counter shows the amount of memory a process can use. This counter value shows whether you have set optimum value in <em>min server memory</em> and <em>max server memory</em> configuration or not. If this value shows constantly below <em>min server memory</em> and <em>max server memory</em> then you have configured too much memory for your SQL Server.</p>
<h5><span style="color: #993300;">SQL Server: Buffer Manager: Buffer Cache Hit Ratio</span></h5>
<p>This is very important counter and this counter shows the number of percentage that has been satisfied using data cache. Suppose the value of buffer cache hit ratio for your server is 94 it means 94% of total requests for data have been processed using data cache.</p>
<p>The ideal value for this counter is more than 90. Higher the value better the memory health.</p>
<h5><span style="color: #993300;">SQL Server: Buffer Manager: Page Life Expectancy</span></h5>
<p>Page Life Expectancy is very important counter to measure memory pressure for your system. THis counter indicates the average number of seconds a data page to remain in cache. Ideally, we have read multiple blogs to consider 300 or more as acceptable value but this value varies depending on your system configuration.</p>
<p>The ideal value is more than 300 but always compare this value with your system configuration. Higher the better concept is also applying here.</p>
<h5><span style="color: #993300;">SQL Server: Buffer Manager: Free List Stalls/sec</span></h5>
<p>This counter also shows a sign of memory pressure or insufficient memory on your server. This displays the number of requests per second where data requests stall because there are no buffers available. Any value greater than two indicates that SQL Server needs more memory.</p>
<h5><span style="color: #993300;">SQL Server: Buffer Manager: Lazy Writes/sec</span></h5>
<p>This counter tells about total number of Lazy writer performed in a second.  It means total number of times Lazy Writer process moves dirty pages from the buffer to disk. A lower number is better than a higher number. If value of this counter shows higher value continuously more than 20, then we need to add more memory to the system or we should think about optimizing memory intensive operations.</p>
<h5><span style="color: #993300;">SQL Server: Buffer Manager: Checkpoint Pages/sec</span></h5>
<p>This counter monitors the number of dirty pages per second, which are flushed to disk when SQL Server invokes the checkpoint process. High values for this counter may indicate memory pressure or insufficient memory.</p>
<h5><span style="color: #993300;">SQL Server: Memory Manager: Memory Grants Pending</span></h5>
<p>This counter shows the number of processes waiting for memory grant per second. Any value higher than zero indicates a lack of memory. We can also get this information by using a DMV sys.dm_exec_query_memory_grants. Those processes who are waiting to be granted the required memory will show you waiting with RESOURCE_SEMAPHORE wait type. I have explained about resource semaphore wait type in below attached article.</p>
<ul>
<li><strong><a href="http://techyaz.com/sql-server/resource_semaphore-wait-type/" target="_blank" rel="noopener">Fix RESOURCE_SEMAPHORE Wait Type in SQL Server</a></strong></li>
</ul>
<p>Here, I have described top 10 performance counters to identify SQL Server memory pressure on your database server. I hope you like this article. Please follow our <a href="https://www.facebook.com/Techyaz/">Facebook</a> page and <a href="https://twitter.com/Tech_yaz">Twitter</a> handle to get latest updates.</p>
<p><em><strong><span style="color: #800000;">Read More:</span></strong></em></p>
<ul>
<li><strong><a href="http://techyaz.com/sql-server/troubleshooting/sql-server-encountered-32-occurrences-requests-taking-longer-15-seconds-complete/" target="_blank" rel="noopener">Fix Error 833: SQL Server has encountered 32 occurrences of I/O requests taking longer than 15 seconds to complete.</a></strong></li>
<li><strong><a href="http://techyaz.com/sql-server/performing-online-index-rebuild-operation/" target="_blank" rel="noopener">Disk and Performance Impact of running Online Index Rebuild Operation</a></strong></li>
<li><strong><a href="http://techyaz.com/sql-server/async_io_completion-wait-type/" target="_blank" rel="noopener">Understanding ASYNC_IO_COMPLETION Wait Type</a></strong></li>
</ul>
<p>The post <a href="https://techyaz.com/sql-server/performance-tuning/top-10-performance-counters-to-identify-sql-server-memory-pressure/">Top 10 Performance Counters to Identify SQL Server Memory Pressure</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://techyaz.com/sql-server/performance-tuning/top-10-performance-counters-to-identify-sql-server-memory-pressure/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>SQL Server Error 701: There is Insufficient System Memory to Run this Query</title>
		<link>https://techyaz.com/sql-server/performance-tuning/sql-server-error-701-there-is-insufficient-system-memory-to-run-this-query/</link>
					<comments>https://techyaz.com/sql-server/performance-tuning/sql-server-error-701-there-is-insufficient-system-memory-to-run-this-query/#respond</comments>
		
		<dc:creator><![CDATA[Manvendra Deo Singh]]></dc:creator>
		<pubDate>Sat, 28 Apr 2018 11:13:42 +0000</pubDate>
				<category><![CDATA[Performance Tuning]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[bulk import performance]]></category>
		<category><![CDATA[Memory Issues]]></category>
		<category><![CDATA[Perfmon Counters]]></category>
		<category><![CDATA[performance tuning]]></category>
		<category><![CDATA[SQL_Server_Memory_Management]]></category>
		<category><![CDATA[Waittypes]]></category>
		<guid isPermaLink="false">http://techyaz.com/?p=2180</guid>

					<description><![CDATA[<p>Today I am going to discuss SQL Server memory issues that your database Instance might face during bulk data load or during any memory intensive operations. You may also face insufficient memory issue when you try to execute numerous queries&#46;&#46;&#46;</p>
<p>The post <a href="https://techyaz.com/sql-server/performance-tuning/sql-server-error-701-there-is-insufficient-system-memory-to-run-this-query/">SQL Server Error 701: There is Insufficient System Memory to Run this Query</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Today I am going to discuss SQL Server memory issues that your database Instance might face during bulk data load or during any memory intensive operations. You may also face insufficient memory issue when you try to execute numerous queries on large data sets at the same time in SQL Server. In such circumstances, SQL Server throws error 701 or error 802 with error text “<em>There is insufficient system memory to run this query</em>.” Full error descriptions for both error codes are given below.</p>
<p><em><span style="color: #ff0000;">Error 701, Severity: 17, State: 193.</span></em><br />
<em><span style="color: #ff0000;"> There is insufficient system memory to run this query.</span></em></p>
<p>Or</p>
<p><em><span style="color: #ff0000;">Error 802, Severity: 17, State: 20</span></em><br />
<em><span style="color: #ff0000;"> There is insufficient memory available in the buffer pool.</span></em></p>
<h3><span style="color: #333399;">Error 701 or Error 802: Root Cause</span></h3>
<p>If SQL Server is running out of memory and has no more memory available to allocate to its transactions then it will generate SQL Server memory error 701 or error 802. SQL Server Memory pressure or insufficient memory issue can be raised due to huge data load or other memory intensive operations.</p>
<p>We should check <em>DBCC MEMORYSTATUS</em> output to get latest snapshot of current memory status of the SQL Server. This command is very useful in troubleshooting memory issues in SQL Server. You might even have failed to run this DBCC command because system does not have enough memory. You need to reduce some memory pressure by stopping or killing some processes and then try to run this command to gather in depth information about SQL Server memory state.</p>
<p>The transaction that failed due to memory pressure and generates error 701 or error 802 might be or might not be the cause of this error. We should analyze the trends to reach on any conclusion.</p>
<h3><span style="color: #333399;">Solution</span></h3>
<p>There are mainly two reasons behind getting SQL Server memory issues for most of the SQL Server systems. Either your server has less memory to handle the current day to day workload or you are running some of the adhoc transactions that will require more memory for their execution like huge bulk data load, complex reports etc. If your SQL Server is running with insufficient memory during day to day activities then you should seriously evaluate the total workload and propose optimum memory size that can handle your current workload.</p>
<p>If you are planning to run any heavy ad hoc transaction then you should temporary increase the memory that can handle the transaction smoothly or you should run such transactions on a server that are built to handle such loads. You should also consider to reduce the batch size that is optimum for your system.</p>
<p>SQL Server is memory intensive application. We need to plan memory sizing for a server after proper evaluation of server state and overall load that will run on that SQL Server instance. But if you are facing memory issue on one of your SQL Server then first we need to troubleshoot it and find the root cause of this memory pressure. Here I am giving you step by step method to find the actual culprit that are causing the memory issue and possible solutions that can reduce some memory overheads.</p>
<p>First Make sure your SQL Server instance is running on dedicated server and not with other applications. If other applications are also using your database server then make sure they are not eating most of the memory. And, If most of the system memory is taken by other applications then you need to seriously think about migrating those application from this database server.</p>
<p>If you cannot migrate these applications to another server then workaround for such issues are to allocate the maximum memory value to your SQL Server instance. You can do it either by using sp_configure or using GUI. Read attached article to change max memory value for your SQL Server instance.</p>
<ul>
<li><strong><a href="http://techyaz.com/sql-server/sql-server-memory-allocation-min-max-server-memory-configuration/" target="_blank" rel="noopener">Understanding SQL Server Memory Allocation and Role of MIN/MAX Server Memory Configuration</a></strong></li>
</ul>
<p>Next thing you should check is the server memory configuration. Check below SQL Server memory configuration parameters:</p>
<ul>
<li>max server memory</li>
<li>min server memory</li>
<li>min memory per query</li>
</ul>
<p>Notice any unusual settings and fix them as necessary. All above three options have been covered in detain in above attached article.</p>
<p>Now, check the workload in terms of number of concurrent sessions, currently executing queries along with their memory grants. You should also focus on SQL Server transactions that are seeking huge memory values. Look at the transactions and gather a report for high memory intensive operations. Evaluate them and if possible optimize them so that they can take minimum memory.</p>
<ul>
<li><a href="http://techyaz.com/sql-server/resource_semaphore-wait-type/" target="_blank" rel="noopener"><strong>Understanding Memory Wait type Resource_SEMAPHORE and how to fix it?</strong></a></li>
</ul>
<p>You can also run below DBCC commands to free several SQL Server memory caches. This will also help you and make some relief for your current running transactions but in longer run it will not help if your system will need more memory to proceed the transactions.</p>
<ul>
<li>DBCC FREESYSTEMCACHE</li>
<li>DBCC FREESESSIONCACHE</li>
<li>DBCC FREEPROCCACHE</li>
</ul>
<p>Another effective way to look in to memory status is by getting the output of DBCC MEMORYSTATUS command. You would get a good starting point to look in to culprit memory consumers.</p>
<p>We can also start collecting performance monitor counters for memory. Perfmon counters like the value of <em>SQL Server: Buffer Manager\Buffer Cache Hit Ratio, SQL Server: Memory Manager and Page Life Expectancy</em> will be very helpful in identifying memory pressure on SQL Server system. Analyze the trend for these counters and then decide whether issue is coming during some specific operations or system is continuously facing memory pressure.</p>
<p>Based on these analyses you can choose to either increase the system memory, increase the SQL Server memory allocation or reschedule some of the memory specific transactions to the off hours when load is minimum on the system. You can also reduce the batch size of the transaction to reduce the memory pressure. This will be certainly helpful in troubleshooting memory issues.</p>
<p>It is not necessary that your transactions are poorly designed always that is why SQL Server is taking lot of memory to process it. Sometimes even our systems on which SQL Server runs might have problem that end up with memory pressure. So you should consider all these points while fixing any performance issue.<br />
I hope you like this article. Please follow us on our <a href="https://www.facebook.com/Techyaz/">Facebook</a> page and <a href="https://twitter.com/Tech_yaz">Twitter</a> handle to get latest updates.</p>
<p><em><strong><span style="color: #800000;">Read More:</span></strong></em></p>
<ul>
<li><strong><a href="http://techyaz.com/sql-server/sql-server-dmvs/4-different-usages-dbcc-sqlperf-sql-server/" target="_blank" rel="noopener">4 Usages of DBCC SQLPERF in SQL Server</a></strong></li>
<li><strong><a href="http://techyaz.com/sql-server/troubleshooting/manage-transaction-log-file-during-data-load/" target="_blank" rel="noopener">Manage Transaction Log File during Bulk Data Load</a></strong></li>
<li><strong><a href="http://techyaz.com/sql-server/improve-sql-server-bulk-data-import-performance/" target="_blank" rel="noopener">How to Improve Bulk Data Load Performance?</a></strong></li>
<li><strong><a href="http://techyaz.com/sql-server/overview-on-sql-server-performance-tuning/" target="_blank" rel="noopener">Overview of SQL Server Performance Tuning</a></strong></li>
<li><strong><a href="http://techyaz.com/sql-server/identify-disk-bottleneck-using-perfmon-counters/" target="_blank" rel="noopener">Identify Disk Bottleneck in SQL Server using Perfmon Disk Counters</a></strong></li>
</ul>
<p>&nbsp;</p>
<p>The post <a href="https://techyaz.com/sql-server/performance-tuning/sql-server-error-701-there-is-insufficient-system-memory-to-run-this-query/">SQL Server Error 701: There is Insufficient System Memory to Run this Query</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://techyaz.com/sql-server/performance-tuning/sql-server-error-701-there-is-insufficient-system-memory-to-run-this-query/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Change SQL Server Instance Name?</title>
		<link>https://techyaz.com/sql-server/change-sql-server-instance-name/</link>
					<comments>https://techyaz.com/sql-server/change-sql-server-instance-name/#respond</comments>
		
		<dc:creator><![CDATA[Manvendra Deo Singh]]></dc:creator>
		<pubDate>Mon, 23 Apr 2018 10:18:35 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server Administration]]></category>
		<category><![CDATA[T-SQL]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[SQL Server Connectivity Issue]]></category>
		<category><![CDATA[Stored Procedures]]></category>
		<guid isPermaLink="false">http://techyaz.com/?p=2112</guid>

					<description><![CDATA[<p>Changing SQL Server Instance name is not a routine task. Although, sometimes we get requirements to change SQL Instance name. There are multiple scenarios in which we need to rename SQL Server Instance like: If you have changed database server&#46;&#46;&#46;</p>
<p>The post <a href="https://techyaz.com/sql-server/change-sql-server-instance-name/">How to Change SQL Server Instance Name?</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Changing SQL Server Instance name is not a routine task. Although, sometimes we get requirements to change SQL Instance name. There are multiple scenarios in which we need to rename SQL Server Instance like:</p>
<ul>
<li>If you have changed database server name then we should change SQL Server Instance name as well.</li>
<li>If you have cloned a database server from DBSERVER1 to DBSERVER2. Here, SQL Server installed on DBSERVER1 will be copied with same name to DBSERVER2. You need to change the SQL Server instance name on DBSERVER2.</li>
<li>Naming convention is not met.</li>
</ul>
<p>Please keep in mind that we cannot change complete name of SQL Server named instance. Suppose you have installed a named instance <em>SERVERNAME</em>\<em>DBInstance1 </em>on your server. If you want to rename this named instance then we can only change first part of this name i.e. <em>SERVERNAME</em>. You cannot change <em>DBInstance1</em> so your named instance will look like <em>DBSERVERNAME</em>\<em>DBInstance1</em> post name change.</p>
<h3><span style="color: #333399;">Impact of Changing SQL Server Instance Name</span></h3>
<p><img loading="lazy" decoding="async" class="size-full wp-image-2113 alignright" src="http://techyaz.com/wp-content/uploads/2018/04/Rename-SQL-Server-Instance.png" alt="Rename SQL Server Instance name" width="300" height="300" srcset="https://techyaz.com/wp-content/uploads/2018/04/Rename-SQL-Server-Instance.png 300w, https://techyaz.com/wp-content/uploads/2018/04/Rename-SQL-Server-Instance-150x150.png 150w, https://techyaz.com/wp-content/uploads/2018/04/Rename-SQL-Server-Instance-160x160.png 160w, https://techyaz.com/wp-content/uploads/2018/04/Rename-SQL-Server-Instance-320x320.png 320w" sizes="auto, (max-width: 300px) 100vw, 300px" /></p>
<p>We need to plan carefully before renaming any SQL Server Instance. Below is the list of possible impacts that you should go through while renaming SQL Server Instance name.</p>
<ul>
<li>Those domain users who are accessing or connecting to the SQL Server Instance as part of Windows group will not be able to connect to renamed instance of SQL Server. Make sure to update the Windows group to specify the new computer name to establish connectivity to the SQL Server instance.</li>
<li>You would not be able to access reporting services after renaming the instance name. You should follow steps mentioned in attached article to <strong><a href="http://techyaz.com/sql-server/troubleshooting/configure-reporting-services-after-renaming-sql-server-instance/" target="_blank" rel="noopener">rename SQL Server instance that is running with reporting services</a></strong>.</li>
<li>If you have database mirroring on the SQL Server instance then you need to drop the mirroring and then reconfigure it post renaming the SQL Server Instance.</li>
<li>Renaming SQL Server instance name does not support if your instance has replication, except when you use log shipping with replication.</li>
<li>You can change the name of SQL Server instance on secondary server in log shipping if the primary server is permanently lost.</li>
<li>If you have linked server configurations then it will be affected by the computer renaming operation. Use <strong>sp_addlinkedserver</strong>or <strong>sp_setnetname</strong> to update computer name references.</li>
</ul>
<h3><span style="color: #333399;">Rename SQL Server Instance</span></h3>
<p>SQL Server instance name along with other system metadata stores in <em>sys.servers</em> system object. We need to update details in system metadata to reflect new name. Also i would suggest to not change SQL Server Instance name directly on your production server.</p>
<p>Suppose you have installed default instance of SQL Server in your database server. If you have changed the name of your database server then you need to update the name of default SQL Server instance as well in sys.servers system table. First, we need to drop the existing SQL Server instance name then we will add new name as per our choice. Follow below steps to change SQL Server instance name.</p>
<pre><span style="color: #0000ff;"><strong><span style="color: #008000;">--Drop existing name</span>
sp_dropserver [old_Instance_name]; </strong></span>
<span style="color: #0000ff;"><strong>GO </strong></span>

<span style="color: #0000ff;"><strong><span style="color: #008000;">--Update New name</span>
sp_addserver [new_Instance_name], local; </strong></span>
<span style="color: #0000ff;"><strong>GO</strong></span></pre>
<p>If you have installed a named instance on your database server then you can run below command to change SQL Server Instance name.</p>
<pre><strong><span style="color: #0000ff;">sp_dropserver [old_name\instancename]; </span></strong>
<strong><span style="color: #0000ff;">GO </span></strong>

<strong><span style="color: #0000ff;">sp_addserver [new_name\instancename], local; </span></strong>
<strong><span style="color: #0000ff;">GO</span></strong></pre>
<p><strong>Note:</strong> Make sure to restart SQL Server services post running above commands to reflect these changes.</p>
<p>You can verify the changes by running below commands or by querying sys.servers system table. If you have not restarted SQL Server services then you might be getting older SQL Server instance name. So restart SQL Server service to apply new changes.</p>
<pre><span style="color: #0000ff;"><strong>SELECT @@SERVERNAME</strong></span></pre>
<p>If you have remote logins on your database server then you might get error 15190 while running sp_dropserver command. Read below article to fix this issue and then proceed with the instance name change.</p>
<ul>
<li><strong><a href="http://techyaz.com/sql-server/troubleshooting/fix-error-15190-there-are-still-remote-logins-for-the-server-dbserver/" target="_blank" rel="noopener">Fix Error 15190: There are still remote logins for the server</a></strong></li>
</ul>
<p>I hope you like this article. Please follow our <a href="https://www.facebook.com/Techyaz/" target="_blank" rel="noopener">Facebook</a> and on <a href="https://twitter.com/Tech_yaz">Twitter</a> handle to get latest updates.</p>
<p><span style="color: #800000;"><em><strong>Read More:</strong></em></span></p>
<ul>
<li><strong><a href="http://techyaz.com/sql-server/troubleshooting/configure-reporting-services-after-renaming-sql-server-instance/" target="_blank" rel="noopener">Configure Reporting Services After Renaming SQL Server Instance Name</a></strong></li>
<li><strong><a href="http://techyaz.com/sql-server/find-when-sql-server-was-installed/" target="_blank" rel="noopener">How to Find When SQL Server was Installed on your database server?</a></strong></li>
<li><strong><a href="http://techyaz.com/sql-server/what-should-be-the-best-value-for-fill-factor-in-sql-server/" target="_blank" rel="noopener">What should be best value for fill factor in SQL Server?</a></strong></li>
<li><strong><a href="http://techyaz.com/sql-server/troubleshooting/to-find-out-no-of-traces-running-on-your-db-instance/" target="_blank" rel="noopener">Find all trace profilers running on SQL Server Instance</a></strong></li>
<li><strong><a href="http://techyaz.com/sql-server/troubleshooting/how-to-move-a-table-to-a-different-filegroup/" target="_blank" rel="noopener">How to Move a Table to Another Filegroup?</a></strong></li>
</ul>
<p>The post <a href="https://techyaz.com/sql-server/change-sql-server-instance-name/">How to Change SQL Server Instance Name?</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://techyaz.com/sql-server/change-sql-server-instance-name/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Configure Reporting Services after Renaming SQL Server Instance</title>
		<link>https://techyaz.com/sql-server/ssrs/configure-reporting-services-after-renaming-sql-server-instance/</link>
					<comments>https://techyaz.com/sql-server/ssrs/configure-reporting-services-after-renaming-sql-server-instance/#comments</comments>
		
		<dc:creator><![CDATA[Manvendra Deo Singh]]></dc:creator>
		<pubDate>Thu, 19 Apr 2018 13:09:35 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server Administration]]></category>
		<category><![CDATA[SSRS]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[reporting services]]></category>
		<category><![CDATA[ssrs]]></category>
		<guid isPermaLink="false">http://techyaz.com/?p=2115</guid>

					<description><![CDATA[<p>Sometimes we need to change the name of the server or computer on which SQL Server instance is running. Once we make changes in server name we need to change the name of installed SQL Server instance name as well&#46;&#46;&#46;</p>
<p>The post <a href="https://techyaz.com/sql-server/ssrs/configure-reporting-services-after-renaming-sql-server-instance/">How to Configure Reporting Services after Renaming SQL Server Instance</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Sometimes we need to change the name of the server or computer on which SQL Server instance is running. Once we make changes in server name we need to change the name of installed SQL Server instance name as well to avoid any issue. Read attached article if you are planning to<strong> <a href="http://techyaz.com/sql-server/troubleshooting/configure-reporting-services-after-renaming-sql-server-instance/" target="_blank" rel="noopener">change SQL Server Instance name</a></strong>. Here, i am going to discuss how to configure reporting services after renaming SQL Server Instance.  You can follow below steps to rename report server.</p>
<p>I have also described multiple impacts of renaming SQL Server Instances. One of the impact of renaming SQL Server Instance that has SQL Server reporting services is also mentioned there and impact is reporting services will stop working if you simply change SQL Server instance name of report server. We need to perform some additional steps to reconfigure report server after a computer name change.</p>
<h3><span style="color: #333399;">Configure Report Server After Renaming SQL Server Instance</span></h3>
<p><img loading="lazy" decoding="async" class="size-full wp-image-2116 alignright" src="http://techyaz.com/wp-content/uploads/2018/04/Configure-SSRS-After-Renameing-Instance-Name.png" alt="Configure SSRS After Renaming SQL Server Instance" width="300" height="300" srcset="https://techyaz.com/wp-content/uploads/2018/04/Configure-SSRS-After-Renameing-Instance-Name.png 300w, https://techyaz.com/wp-content/uploads/2018/04/Configure-SSRS-After-Renameing-Instance-Name-150x150.png 150w, https://techyaz.com/wp-content/uploads/2018/04/Configure-SSRS-After-Renameing-Instance-Name-160x160.png 160w, https://techyaz.com/wp-content/uploads/2018/04/Configure-SSRS-After-Renameing-Instance-Name-320x320.png 320w" sizes="auto, (max-width: 300px) 100vw, 300px" /></p>
<p>You should rename SQL Server instance as per steps described in above attached link. Once you have changed SQL Server instance name then you should follow below additional steps to make reporting services accessible.</p>
<ul>
<li>Launch <strong>SQL Server Reporting Services Configuration tool</strong> and connect to the report server that uses the report server database on the renamed server.</li>
<li>Go to <strong>Database</strong> Setup page.</li>
<li>Enter SQL Server name in <strong>Server Name</strong> and then click <strong>Connect</strong>. If Reporting Services is configured using the server name, you must update the database connection information whenever the server name is changed.</li>
<li>Click <strong>Apply</strong> and close the SSRS Configuration tool.</li>
<li>Now search and open a config file <strong>RSReportServer.</strong><strong>config</strong> in a text editor and modify the <strong>UrlRoot </strong>setting to reflect the new server name.</li>
<li><strong>UrlRoot </strong>setting is used by delivery extensions to compose the URL used to access items stored on the report server. Changing the report server URL address requires that you update the <strong>UrlRoot</strong> setting so that subscriptions continue to deliver reports as expected.</li>
<li>In the same file, if it is set, modify the <strong>ReportServerUrl </strong>setting to reflect the new server name. Note if this setting is empty then do nothing.</li>
</ul>
<p>I hope you like this article. Please follow our <a href="https://www.facebook.com/Techyaz/">Facebook</a> page and <a href="https://twitter.com/Tech_yaz">Twitter</a> handle to get latest updates.</p>
<p><span style="color: #800000;"><em><strong>Read More:</strong></em></span></p>
<ul>
<li><strong><a href="http://techyaz.com/sql-server/troubleshooting/fix-error-15190-there-are-still-remote-logins-for-the-server-dbserver/" target="_blank" rel="noopener">Fix Error 15190: There are still remote logins for the server</a></strong></li>
<li><strong><a href="http://techyaz.com/sql-server/troubleshooting/change-sql-server-instance-name/" target="_blank" rel="noopener">How to Change SQL Server Instance Name?</a></strong></li>
</ul>
<p>&nbsp;</p>
<p>The post <a href="https://techyaz.com/sql-server/ssrs/configure-reporting-services-after-renaming-sql-server-instance/">How to Configure Reporting Services after Renaming SQL Server Instance</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://techyaz.com/sql-server/ssrs/configure-reporting-services-after-renaming-sql-server-instance/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>Fix Error 15190: There are still remote logins for the server &#8216;DBSERVER&#8217;.</title>
		<link>https://techyaz.com/sql-server/troubleshooting/fix-error-15190-there-are-still-remote-logins-for-the-server-dbserver/</link>
					<comments>https://techyaz.com/sql-server/troubleshooting/fix-error-15190-there-are-still-remote-logins-for-the-server-dbserver/#respond</comments>
		
		<dc:creator><![CDATA[Manvendra Deo Singh]]></dc:creator>
		<pubDate>Wed, 18 Apr 2018 09:22:59 +0000</pubDate>
				<category><![CDATA[Linked_server]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server Administration]]></category>
		<category><![CDATA[T-SQL]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[logins]]></category>
		<guid isPermaLink="false">http://techyaz.com/?p=2109</guid>

					<description><![CDATA[<p>I got this error 15190 while renaming SQL Server Instance name. I was not able to drop the existing SQL Server instance name using sp_dropserver stored procedure and was getting error 15190. Full description of this error is given below.&#46;&#46;&#46;</p>
<p>The post <a href="https://techyaz.com/sql-server/troubleshooting/fix-error-15190-there-are-still-remote-logins-for-the-server-dbserver/">Fix Error 15190: There are still remote logins for the server &#8216;DBSERVER&#8217;.</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>I got this error 15190 while <strong><a href="http://techyaz.com/sql-server/troubleshooting/change-sql-server-instance-name/" target="_blank" rel="noopener">renaming SQL Server Instance name</a>.</strong> I was not able to drop the existing SQL Server instance name using <em>sp_dropserver</em> stored procedure and was getting error 15190. Full description of this error is given below.</p>
<p><em><span style="color: #ff0000;">Server: Msg 15190, Level 16, State 1, Procedure sp_dropserver</span></em><br />
<em><span style="color: #ff0000;"> There are still remote logins for the server &#8216;DBSERVER&#8217;.</span></em></p>
<h3><span style="color: #333399;">Error 15190 – Root Cause</span></h3>
<p><img loading="lazy" decoding="async" class="size-full wp-image-2110 alignright" src="http://techyaz.com/wp-content/uploads/2018/04/error-15190.png" alt="error 15190" width="300" height="300" srcset="https://techyaz.com/wp-content/uploads/2018/04/error-15190.png 300w, https://techyaz.com/wp-content/uploads/2018/04/error-15190-150x150.png 150w, https://techyaz.com/wp-content/uploads/2018/04/error-15190-160x160.png 160w, https://techyaz.com/wp-content/uploads/2018/04/error-15190-320x320.png 320w" sizes="auto, (max-width: 300px) 100vw, 300px" /></p>
<p>As we know we need to first drop the existing details of SQL Server instance name from metadata system table sys.servers and then add new instance name in order to change the instance name. I was doing the same and running below command to drop the old instance name.</p>
<pre><strong><span style="color: #0000ff;">sp_dropserver &lt;old_Name&gt;; </span></strong>
<strong><span style="color: #0000ff;">GO</span></strong></pre>
<p>I had received this error 15190 while executing above command and that is because of some remote logins present of the SQL Server instance.</p>
<p>If your database server has any remote login that you use for linked servers or some other purposes then you will get such issues. We need to drop all the remote logins to fix this issue and execute above command successfully.</p>
<h3><span style="color: #333399;">Solution</span></h3>
<p>To fix this issue we need to identify remote logins and drop them before changing the SQL Server instance name. We will be using a system stored procedure <em>sp_dropremotelogin</em> to drop all remote logins from our SQL Server instance. Run below command to drop all remote logins from a default instance of SQL Server.</p>
<pre><strong><span style="color: #0000ff;">sp_dropremotelogin old_name; </span></strong>
<strong><span style="color: #0000ff;">GO</span></strong></pre>
<p>If you have named instance running on your database server then you can run below command. Make sure to change the name of server in place of <em>Old_DBSERVER\Instancename</em>.</p>
<pre><span style="color: #0000ff;"><strong>sp_dropremotelogin Old_DBSERVER\Instancename; </strong></span>
<span style="color: #0000ff;"><strong>GO</strong></span></pre>
<p>Once all remote logins have been dropped you can go ahead and perform your SQL Server Instance name change operation. Make sure to create remote logins for your linked servers or alias post changing the instance name.</p>
<p>I hope you like this article. Please follow our <a href="https://www.facebook.com/Techyaz/" target="_blank" rel="noopener">Facebook</a> page and <a href="https://twitter.com/Tech_yaz">Twitter</a> handle to get latest updates.</p>
<p><span style="color: #800000;"><em><strong>Read More:</strong></em></span></p>
<ul>
<li><strong><a href="http://techyaz.com/sql-server/troubleshooting/change-sql-server-instance-name/" target="_blank" rel="noopener">How to Change SQL Server Instance Name?</a></strong></li>
<li><strong><a href="http://techyaz.com/sql-server/troubleshooting/configure-reporting-services-after-renaming-sql-server-instance/" target="_blank" rel="noopener">How to Rename SQL Server Instance that is running with SQL Server Reporting Services?</a></strong></li>
<li><strong><a href="http://techyaz.com/sql-server/troubleshooting/fix-error-15434-not-drop-login-user-currently-logged/" target="_blank" rel="noopener">Fix Error 15434: Could not drop login &#8220;domain\loginname&#8221; as the user is currently logged in</a></strong></li>
<li><strong><a href="http://techyaz.com/sql-server/troubleshooting/fix-the-error-15174/" target="_blank" rel="noopener">Fix Error 15174: Login owns one or more databases. Change the owner of database before dropping the login.</a></strong></li>
<li><strong><a href="http://techyaz.com/sql-server/sql-server-on-linux/change-hostname-red-hat-linux-server/" target="_blank" rel="noopener">How to Change Hostname of RHEL system?</a></strong></li>
</ul>
<p>The post <a href="https://techyaz.com/sql-server/troubleshooting/fix-error-15190-there-are-still-remote-logins-for-the-server-dbserver/">Fix Error 15190: There are still remote logins for the server &#8216;DBSERVER&#8217;.</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://techyaz.com/sql-server/troubleshooting/fix-error-15190-there-are-still-remote-logins-for-the-server-dbserver/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Fix Error 1105: Could not allocate space for object in database because the filegroup is full.</title>
		<link>https://techyaz.com/sql-server/troubleshooting/fix-error-1105/</link>
					<comments>https://techyaz.com/sql-server/troubleshooting/fix-error-1105/#respond</comments>
		
		<dc:creator><![CDATA[Manvendra Deo Singh]]></dc:creator>
		<pubDate>Mon, 16 Apr 2018 06:40:16 +0000</pubDate>
				<category><![CDATA[SQL Server Administration]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[HowTO]]></category>
		<category><![CDATA[log space]]></category>
		<category><![CDATA[space issues]]></category>
		<category><![CDATA[SQL_Error_Code]]></category>
		<category><![CDATA[T-SQL]]></category>
		<guid isPermaLink="false">http://techyaz.com/?p=2090</guid>

					<description><![CDATA[<p>Today, I got error 1105 on one of the database server. We were processing some bulk transactions on a database but failed because of space issue. Full description of error 1105 is given below. Error 1105, Severity 17, State 2&#46;&#46;&#46;</p>
<p>The post <a href="https://techyaz.com/sql-server/troubleshooting/fix-error-1105/">Fix Error 1105: Could not allocate space for object in database because the filegroup is full.</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Today, I got error 1105 on one of the database server. We were processing some bulk transactions on a database but failed because of space issue. Full description of error 1105 is given below.</p>
<p><em><span style="color: #ff0000;">Error 1105, Severity 17, State 2</span></em><br />
<em><span style="color: #ff0000;"> Could not allocate space for object &#8216;Object_Name’ in database &#8216;DB_Name’ because the &#8216;Primary’ filegroup is full. Create disk space by deleting unneeded files, dropping objects in the filegroup, adding additional files to the filegroup, or setting autogrowth on for existing files in the filegroup.</span></em></p>
<h3><span style="color: #333399;">Error 1105 – Root Cause</span></h3>
<p>As error suggests, this issue was generated because database was not able to allocate space anymore. Whenever you get such space issue, all transactions will be stopped until you make some room in the database. All transactions will be stopped because of non availability of space because none of the transaction will get any space to proceed their transactions. There are many reasons you can get space issues. Some of them are:</p>
<p><img loading="lazy" decoding="async" class="size-full wp-image-2091 alignright" src="http://techyaz.com/wp-content/uploads/2018/04/Error-1105.png" alt="error 1105" width="300" height="300" srcset="https://techyaz.com/wp-content/uploads/2018/04/Error-1105.png 300w, https://techyaz.com/wp-content/uploads/2018/04/Error-1105-150x150.png 150w, https://techyaz.com/wp-content/uploads/2018/04/Error-1105-160x160.png 160w, https://techyaz.com/wp-content/uploads/2018/04/Error-1105-320x320.png 320w" sizes="auto, (max-width: 300px) 100vw, 300px" /></p>
<ul>
<li>Data or Log drive is full.</li>
<li>Database file/s has restricted file growth</li>
<li>Database File Autogrowth is not enabled.</li>
<li>Some tables are growing faster than our prediction.</li>
<li>Some long running transaction is eating all space.</li>
</ul>
<p>We generally get error 1105 when any database including tempdb or any transaction log file get full and runs out of space. File growth restriction is also a possible reason you can get error 1105. Make sure to check all database files associated with your database to make sure there is no file growth restriction is set that is causing to generate this error. Sometimes when you restrict the file growth and the file size reached its limit, you may get this error message when trying insert / updates on database. I have explained multiple solutions to overcome this issue. Have a look at below section to get the solution of such space issues.</p>
<h3><span style="color: #333399;">Solution</span></h3>
<p>To fix this error we need to make space in the database so that all running transactions can execute and log their operations. We have multiple solutions to fix such issue based on the nature of the issues. Some of the solutions are given below:</p>
<ul>
<li>First you should check if any unwanted file is not there in data or log drive. Sometimes we placed backup files in data or log drive and forgot to delete it. Make sure to remove or move such unwanted files to make space for your database.</li>
<li>If any of the database files have restricted file growth then you should immediately turn on autogrow feature of the data or log file. You can read below article to understand what should be the perfect value for autogrowth of a data or log file.</li>
</ul>
<p style="padding-left: 90px;"><strong><u><a href="http://techyaz.com/sql-server/understanding-database-autogrowth-sql-server/" target="_blank" rel="noopener">How to Enable Autogrowth and What should be the Best value for File Autogrowth?</a></u></strong></p>
<ul>
<li>If size of your database file is limited to some value then make sure to extend the size of that file or I would suggest going with unrestricted growth. Read above attached article to get more about this.</li>
<li>If your data or log drive is running out of space then you should add more files to the file group on different drive where you have enough space. You can use below command to add any data or log file to your desired drive. Make sure to change the drive path as per your correct path.</li>
</ul>
<pre style="padding-left: 60px;"><strong><span style="color: #0000ff;">ALTER DATABASE Techyaz</span></strong>
<strong><span style="color: #0000ff;">ADD FILE (</span></strong>
<strong><span style="color: #0000ff;">NAME = techyaz_Data3,</span></strong>
<strong><span style="color: #0000ff;">FILENAME = 'F:\MSSQL\DATA\techyaz_DataFile3.ndf')</span></strong></pre>
<ul>
<li>We can also free disk space by dropping index or tables that are no longer needed. You can also consider data purging for unwanted tables or indexes.</li>
<li>You can also consider moving some of the database files to different drive to make some space for your database.</li>
</ul>
<p>I hope you like this article. Please follow our <a href="https://www.facebook.com/Techyaz/">Facebook</a> page and <a href="https://twitter.com/Tech_yaz">Twitter</a> handle to get latest updates.</p>
<p><span style="color: #800000;"><em><strong>Read More:</strong></em></span></p>
<ul>
<li><strong><a href="http://techyaz.com/sql-server/troubleshooting/fix-error-1101-could-not-allocate-a-new-page-for-database/" target="_blank" rel="noopener">Fix Error 1101: Could not allocate a new page for database</a></strong></li>
<li><strong><a href="http://techyaz.com/sql-server/avoid-database-shrink-operation/" target="_blank" rel="noopener">Why should we Avoid Database Shrink Operation?</a></strong></li>
<li><strong><a href="http://techyaz.com/sql-server/always-turn-off-database-auto-shrink/" target="_blank" rel="noopener">Why should we always Disable Autoshrink property?</a></strong></li>
</ul>
<p>The post <a href="https://techyaz.com/sql-server/troubleshooting/fix-error-1105/">Fix Error 1105: Could not allocate space for object in database because the filegroup is full.</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://techyaz.com/sql-server/troubleshooting/fix-error-1105/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Fix Error 15123: The configuration option does not exist.</title>
		<link>https://techyaz.com/sql-server/troubleshooting/fix-error-15123/</link>
					<comments>https://techyaz.com/sql-server/troubleshooting/fix-error-15123/#respond</comments>
		
		<dc:creator><![CDATA[Manvendra Deo Singh]]></dc:creator>
		<pubDate>Tue, 10 Apr 2018 13:00:57 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server Administration]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[HowTO]]></category>
		<category><![CDATA[sp_configure]]></category>
		<category><![CDATA[SQL_Error_Code]]></category>
		<guid isPermaLink="false">http://techyaz.com/?p=2075</guid>

					<description><![CDATA[<p>Yesterday, one of my teammate was facing an issue while enabling a server level parameter using T-SQL command sp_configure. He was trying to enable extended procedure xp_cmdshell using sp_configure command but he received error 15123. Full description of error is given below.&#46;&#46;&#46;</p>
<p>The post <a href="https://techyaz.com/sql-server/troubleshooting/fix-error-15123/">Fix Error 15123: The configuration option does not exist.</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Yesterday, one of my teammate was facing an issue while enabling a server level parameter using T-SQL command <em>sp_configure</em>. He was trying to enable extended procedure <em>xp_cmdshell</em> using <em>sp_configure</em> command but he received error 15123. Full description of error is given below.</p>
<p><em><span style="color: #ff0000;">Msg 15123, Level 16, State 1, Procedure sp_configure, Line 51</span></em><br />
<em><span style="color: #ff0000;"> The configuration option &#8216;xp_cmdshell&#8217; does not exist, or it may be an advanced option.</span></em></p>
<p>The screenshot of the error is given in below image.</p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-2078" src="http://techyaz.com/wp-content/uploads/2018/04/1-error15123.png" alt="Error 15123" width="704" height="194" srcset="https://techyaz.com/wp-content/uploads/2018/04/1-error15123.png 704w, https://techyaz.com/wp-content/uploads/2018/04/1-error15123-300x83.png 300w" sizes="auto, (max-width: 704px) 100vw, 704px" /></p>
<p>You might get this error while changing or viewing values of any advanced server configuration option. Here I will show you how to fix this error and make such changes successfully.</p>
<h3><span style="color: #333399;">Error 15123 – Root Cause</span></h3>
<p>As we know, there are lot of server level configurations that we can see or change using command <em>sp_configure</em>. Some of the server level configuration options categorized as advanced options and that cannot be viewed or changed if the value of “<strong><em>show advanced options</em></strong>” is set to 0 or disabled.</p>
<p>We can view “<em>show advanced options</em>” value by running <em>sp_configure</em> command. If the run value of this command is set to 0 it means this option is disabled and you cannot see any advanced server configurations.</p>
<p>To see or change the advance server level configurations we need to enable “<em>show advanced options</em>” by setting its value to 1 using <em>sp_configure</em>. Run below command to check the current run value for “<em>show advanced options</em>”. You can also simply type sp_configure command and execute it to get its details along with all other server configuration options.</p>
<pre><strong><span style="color: #0000ff;">exec sp_configure ‘show advanced options’</span></strong></pre>
<p>We can see run value of parameter “<em>show advanced option</em>” is set as zero it means we cannot view or change any advanced server configurations using command <em>sp_configure</em>.</p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-2079" src="http://techyaz.com/wp-content/uploads/2018/04/2-error15123.png" alt="Enable Show Advanced Options" width="571" height="214" srcset="https://techyaz.com/wp-content/uploads/2018/04/2-error15123.png 571w, https://techyaz.com/wp-content/uploads/2018/04/2-error15123-300x112.png 300w" sizes="auto, (max-width: 571px) 100vw, 571px" /></p>
<p>This is the main reason behind getting error 15123 and we can get this error while changing any advance server level parameters. Read below section to enable “<em>show advanced options</em>” and change the values of advanced server configurations.</p>
<h3><span style="color: #333399;">Solution</span></h3>
<p>Generally, we get error 15123 because “<em>show advanced options</em>” is disabled and set to zero and it’s not allow to do anything with advanced server options. As we have seen “<em>show advanced options</em>” is set to zero in above screenshot. Here, we will enable it and then run again same command that we have ran in first screenshot to enable <em>xp_cmdshell</em> extended procedure.</p>
<p>Let’s enable “<em>show advanced options</em>” option to view or change the advance server level configurations by running below command.</p>
<pre><strong><span style="color: #0000ff;">exec sp_configure ‘show advanced options’, 1</span></strong>
<strong><span style="color: #0000ff;"> RECONFIGURE WITH OVERRIDE</span></strong></pre>
<p>Above command has been executed successfully. You can see this in below screenshot.</p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-2080" src="http://techyaz.com/wp-content/uploads/2018/04/3-error15123.png" alt="Enable show advanced options" width="829" height="191" srcset="https://techyaz.com/wp-content/uploads/2018/04/3-error15123.png 829w, https://techyaz.com/wp-content/uploads/2018/04/3-error15123-300x69.png 300w, https://techyaz.com/wp-content/uploads/2018/04/3-error15123-768x177.png 768w" sizes="auto, (max-width: 829px) 100vw, 829px" /></p>
<p>Now we can go ahead and view any advanced options by running simply <em>sp_configure</em> command. If you need to make any changes on existing values of advanced server options then also you can do it using <em>sp_configure</em> command now. Let’s go ahead and run same command that we had ran in first image to enable <em>xp_cmdshell</em>.</p>
<pre><strong><span style="color: #0000ff;">exec sp_configure 'xp_cmdshell', 1</span></strong>
<strong><span style="color: #0000ff;"> reconfigure with override</span></strong></pre>
<p>We can see this command has been executed successfully this time without any error.</p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-2081" src="http://techyaz.com/wp-content/uploads/2018/04/4-error15123.jpg" alt="enable xp_cmdshell" width="832" height="176" srcset="https://techyaz.com/wp-content/uploads/2018/04/4-error15123.jpg 832w, https://techyaz.com/wp-content/uploads/2018/04/4-error15123-300x63.jpg 300w, https://techyaz.com/wp-content/uploads/2018/04/4-error15123-768x162.jpg 768w" sizes="auto, (max-width: 832px) 100vw, 832px" /></p>
<p>Whenever you get error 15123 while viewing or changing values of any advanced option you should first enable or set the value for option “<em><strong>show advanced options</strong></em>” then you can make your desired changes accordingly.</p>
<p>I hope you like this article. Please follow our <a href="https://www.facebook.com/Techyaz/">Facebook</a> page and <a href="https://twitter.com/Tech_yaz">Twitter</a> handle to get latest updates.</p>
<p><em><strong><span style="color: #800000;">Read More:</span></strong></em></p>
<ul>
<li><strong><a href="http://techyaz.com/sql-server/sql-server-administration/change-network-packet-size-sql-server/" target="_blank" rel="noopener">How to change Network Packet size in SQL Server</a></strong></li>
<li><strong><a href="http://techyaz.com/sql-server/troubleshooting/fixing-error-233-how-to-set-the-user-connections-server-configuration-option-in-sql-server/" target="_blank" rel="noopener">Fix Error 233: How to Set the User Connections Server Configuration option in SQL Server</a></strong></li>
<li><strong><a href="http://techyaz.com/sql-server/sql-server-memory-allocation-min-max-server-memory-configuration/" target="_blank" rel="noopener">Understanding SQL Server Memory Allocation</a></strong></li>
<li><strong><a href="http://techyaz.com/interview-questions/sql-server-dba-interview-questions-answers/" target="_blank" rel="noopener">SQL Server DBA Interview Questions &amp; Answer</a></strong></li>
</ul>
<p>&nbsp;</p>
<p>The post <a href="https://techyaz.com/sql-server/troubleshooting/fix-error-15123/">Fix Error 15123: The configuration option does not exist.</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://techyaz.com/sql-server/troubleshooting/fix-error-15123/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Fix Error 18452: Login failed. The login is from an untrusted domain</title>
		<link>https://techyaz.com/sql-server/troubleshooting/fix-error-18452-login-failed-login-from-untrusted-domain/</link>
					<comments>https://techyaz.com/sql-server/troubleshooting/fix-error-18452-login-failed-login-from-untrusted-domain/#comments</comments>
		
		<dc:creator><![CDATA[Manvendra Deo Singh]]></dc:creator>
		<pubDate>Tue, 03 Apr 2018 15:20:47 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server Administration]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[AlwaysOn]]></category>
		<category><![CDATA[login failed]]></category>
		<category><![CDATA[logins]]></category>
		<category><![CDATA[security]]></category>
		<guid isPermaLink="false">http://techyaz.com/?p=2058</guid>

					<description><![CDATA[<p>Recently a user has reported error 18452 while connecting to database server. Full description of this error is given below: Error: 18452, Severity: 14, State: 1. Login failed. The login is from an untrusted domain and cannot be used with&#46;&#46;&#46;</p>
<p>The post <a href="https://techyaz.com/sql-server/troubleshooting/fix-error-18452-login-failed-login-from-untrusted-domain/">Fix Error 18452: Login failed. The login is from an untrusted domain</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Recently a user has reported error 18452 while connecting to database server. Full description of this error is given below:</p>
<p><span style="color: #ff0000;"><em>Error: 18452, Severity: 14, State: 1.</em></span><br />
<span style="color: #ff0000;"><em>Login failed. The login is from an untrusted domain and cannot be used with Windows authentication.</em></span></p>
<p>You can see the screenshot of the error 18452 in below image.</p>
<p><img loading="lazy" decoding="async" class="alignnone wp-image-2068" src="http://techyaz.com/wp-content/uploads/2018/04/1-errormin-1024x152.jpg" alt="error 18452" width="838" height="124" srcset="https://techyaz.com/wp-content/uploads/2018/04/1-errormin-1024x152.jpg 1024w, https://techyaz.com/wp-content/uploads/2018/04/1-errormin-300x45.jpg 300w, https://techyaz.com/wp-content/uploads/2018/04/1-errormin-768x114.jpg 768w, https://techyaz.com/wp-content/uploads/2018/04/1-errormin.jpg 1118w" sizes="auto, (max-width: 838px) 100vw, 838px" /></p>
<h3><span style="color: #333399;">Error 18452 – Root Cause</span></h3>
<p>Reason behind error 18452 is because of wrong security authentication mode configuration. SQL Server is set to accept only windows logins to connect to database instance.</p>
<p>As we know SQL Server uses two authentication modes to accept database connections. One is <em>Windows Authentication mode</em> and another one is <em>SQL Server and Windows Authentication mode</em>. We also call it <em>Mixed Authentication mode</em>.</p>
<p>Sometimes, SQL Server authentication mode is set to <em>SQL Server and Windows Authentication mode</em> to accept SQL as well as windows connections but still you will face this issue. That might be because you try to connect to a server that has <a href="http://techyaz.com/sql-server/alwayson-availability-group/" target="_blank" rel="noopener">Always on Availability Group</a> configuration or database mirroring configuration.</p>
<p>Suppose you have AOAG configuration and you are connecting to database using primary replica name not listener name using a login for which default database is set as availability database. If failover got happen during your activity or you are connecting to secondary replica using a login for which default database is set as availability database then also you will get this error 18452 along with some SSPI context error that I have given below.</p>
<p><span style="color: #ff0000;"><em>Error: 17806, Severity: 20, State: 14.</em></span><br />
<span style="color: #ff0000;"><em>SSPI handshake failed with error code 0x8009030c, state 14 while establishing a connection with integrated security; the connection has been closed. Reason: AcceptSecurityContext failed. The Windows error code indicates the cause of failure. The logon attempt failed  </em></span></p>
<p>SSPI handshake errors comes because of Kerberos failure, which would most likely be related to non-existent SPN or bad SPN for SQL Server.</p>
<h3><span style="color: #333399;">Solution</span></h3>
<p>To fix this issue first we need to check the authentication mode set for your SQL Server Instance. If your SQL Server instance is running with windows authentication mode then you must change it to Mixed mode so that windows and SQL both type of logins can be authenticated.</p>
<p>To check the configured authentication mode for your SQL Server Instance, we need to launch SQL Server Instance property window. Right click at the instance node and click at the properties option as shown in below screenshot.</p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-2059" src="http://techyaz.com/wp-content/uploads/2018/04/2-error-min.jpg" alt="Launch SQL Server Instance Property Window" width="319" height="525" srcset="https://techyaz.com/wp-content/uploads/2018/04/2-error-min.jpg 319w, https://techyaz.com/wp-content/uploads/2018/04/2-error-min-182x300.jpg 182w" sizes="auto, (max-width: 319px) 100vw, 319px" /></p>
<p>Once you will click at <strong>Properties</strong> option, you will be getting below SQL Server instance property window. Click at <strong>Security</strong> option from left side pane. You can see current <strong>Server Authentication</strong> configuration is set to <strong><em>Windows Authentication mode</em></strong> in below screenshot.</p>
<p><img loading="lazy" decoding="async" class="alignnone wp-image-2060" src="http://techyaz.com/wp-content/uploads/2018/04/3-error-min.jpg" alt="SQL Server Instance Property Window" width="638" height="573" srcset="https://techyaz.com/wp-content/uploads/2018/04/3-error-min.jpg 703w, https://techyaz.com/wp-content/uploads/2018/04/3-error-min-300x269.jpg 300w" sizes="auto, (max-width: 638px) 100vw, 638px" /></p>
<p>Now we will change it to <strong><em>SQL Server and Windows Authentication mode</em></strong>. Select the radio button for <em>SQL Server and Windows Authentication mode</em> option and click ok button to proceed. You can see that I have selected above mode to apply the changes.</p>
<p><img loading="lazy" decoding="async" class="alignnone wp-image-2061" src="http://techyaz.com/wp-content/uploads/2018/04/4-error-min.jpg" alt="SQL Server Instance Property Window" width="638" height="578" srcset="https://techyaz.com/wp-content/uploads/2018/04/4-error-min.jpg 702w, https://techyaz.com/wp-content/uploads/2018/04/4-error-min-300x272.jpg 300w" sizes="auto, (max-width: 638px) 100vw, 638px" /></p>
<p>Restart SQL Server services to apply the changes.</p>
<p>If your SQL Server Instance is already set with <em>SQL Server and Windows Authentication mode</em> then you should fix this issue in separate way. As I described above that one of the probable reason to get this error 18452 is because you might use AOAG replica server name to connect to the database with the login for which default database is set as the AOAG availability database.</p>
<p>If failover will happen then you would not be able to access the database because it will become secondary. Error 18452 will be generated along with SSPI handshake errors because same database is set as default database for your login that has become inaccessible now because of acting secondary database in AOAG. Failover will not happen for you because you are using replica server name to make database connection.</p>
<p>Possible solution to fix this issue is failback the AOAG to your earlier primary replica or you should use AOAG Listener name to make database connection. Also, to avoid this error during failover you should set default database for your login to master rather than availability database.</p>
<p>I hope you like this article. Please follow our <a href="https://www.facebook.com/Techyaz/">Facebook</a> page and <a href="https://twitter.com/Tech_yaz">Twitter</a> handle to get latest updates.</p>
<p><em><strong><span style="color: #800000;">Read More:</span></strong></em></p>
<ul>
<li><strong><a href="http://techyaz.com/sql-server/troubleshooting/login-failed-user_name-microsoft-sql-server-error-18456/" target="_blank" rel="noopener">Fix Error 18456: Login failed for user &#8220;User_Name&#8221;</a></strong></li>
<li><strong><a href="http://techyaz.com/sql-server/troubleshooting/fix-error-4064-cannot-open-user-default-database-login-failed/" target="_blank" rel="noopener">Fix Error 4064: Cannot open user default database. Login failed</a></strong></li>
<li><strong><a href="http://techyaz.com/sql-server/troubleshooting/fix-error-53-not-open-connection-sql-server/" target="_blank" rel="noopener">Error 53: Could not open a connection on SQL Server</a></strong></li>
<li><strong><a href="http://techyaz.com/sql-server/alwayson/fix-aoag-listener-error-19471-kerberos-status-showing-handle-invalid/" target="_blank" rel="noopener">AOAG Listener Error 19471: The handle is Invalid</a></strong></li>
</ul>
<p>The post <a href="https://techyaz.com/sql-server/troubleshooting/fix-error-18452-login-failed-login-from-untrusted-domain/">Fix Error 18452: Login failed. The login is from an untrusted domain</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://techyaz.com/sql-server/troubleshooting/fix-error-18452-login-failed-login-from-untrusted-domain/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
			</item>
	</channel>
</rss>
