<?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>SQL Server - Techyaz.com</title>
	<atom:link href="https://techyaz.com/tag/sql-server/feed/" rel="self" type="application/rss+xml" />
	<link></link>
	<description>Tips, Tutorials and How-to Topics</description>
	<lastBuildDate>Fri, 23 Jul 2021 14:09:13 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8</generator>

<image>
	<url>https://techyaz.com/wp-content/uploads/2017/11/cropped-Site-icon-150x150.png</url>
	<title>SQL Server - Techyaz.com</title>
	<link></link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>How to Change Authentication Mode in SQL Server?</title>
		<link>https://techyaz.com/sql-server/change-authentication-mode-in-sql-server/</link>
					<comments>https://techyaz.com/sql-server/change-authentication-mode-in-sql-server/#respond</comments>
		
		<dc:creator><![CDATA[Manvendra Deo Singh]]></dc:creator>
		<pubDate>Mon, 14 Jun 2021 16:24:20 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server Connectivity Issue]]></category>
		<guid isPermaLink="false">https://techyaz.com/?p=2539</guid>

					<description><![CDATA[<p>Authentication is a process to establish a successful connection. SQL Server provides two types of authentication modes to connect to their database instances. Authentication Mode is configured while installing SQL Server instance. We can also change SQL Server authentication mode&#46;&#46;&#46;</p>
<p>The post <a href="https://techyaz.com/sql-server/change-authentication-mode-in-sql-server/">How to Change Authentication Mode in SQL Server?</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Authentication is a process to establish a successful connection. SQL Server provides two types of authentication modes to connect to their database instances. Authentication Mode is configured while installing SQL Server instance. We can also change SQL Server authentication mode later post installation. Below are two types of authentication modes in SQL Server.</p>



<ul class="wp-block-list"><li>Mixed Mode ( Windows +SQL Server login )</li><li>Windows Mode (Only Windows)</li></ul>



<p>Mixed mode provides two ways to establish database connections. One is using SQL Server logins at SQL Server layer and another one is using Windows domain user authenticated using active directory and whose login is created and mapped on SQL Server instance.</p>



<p>Windows Mode has only one way to establish database connections and that is using windows domain accounts. We must map windows accounts on SQL Server first before making any database connections. This mode doesn&#8217;t provide access to SQL Server logins. </p>



<p class="has-text-color has-vivid-red-color"><strong>Read More to Grow:</strong></p>



<ul class="wp-block-list"><li><strong><a href="https://techyaz.com/interview-questions/sql-server-interview-questions/sql-server-interview-questions-answers-indexes/" target="_blank" rel="noreferrer noopener">SQL Server Interview Questions &amp; Answers on Indexes</a></strong></li><li><strong><a href="https://techyaz.com/learning/prepare-for-job-interview/" target="_blank" rel="noreferrer noopener">How to Prepare for a Job Interview?</a></strong></li><li><strong><a href="https://techyaz.com/interview-questions/sql-server-interview-questions/sql-server-alwayson-interview-questions-answers/" target="_blank" rel="noreferrer noopener">SQL Server Alwayson Interview Questions &amp; Answers</a></strong></li><li><strong><a href="https://techyaz.com/interview-questions/sql-server-interview-questions/replication-qa-part-1/">SQL Server Replication Interview Questions &amp; Answers</a></strong></li></ul>



<h2 class="wp-block-heading">Why Windows Authentication Mode is More Secure in SQL Server?</h2>



<p>Windows mode is secure than Mixed mode authentication because mixed mode has SQL Server authentication which cannot use Kerberos security protocol. Windows account needs to be authenticated to domain active directory every time you establish a database connection. Also, Windows provides additional password policies that are not available for SQL Server logins and that is why Microsoft always recommends to use Windows authentication mode wherever it&#8217;s possible.</p>



<p>One more risk with Mixed mode is the encrypted SQL Server Authentication login password must be passed over the network at the time of the connection. Some applications that connect automatically will store the password at the client. These are additional attack points. </p>



<h2 class="wp-block-heading">Change Authentication Mode in SQL Server</h2>



<p>You can configure authentication mode in SQL Server during installing it to your system. SQL Server installation windows will allow you to choose any one of above given authentication modes. If you will choose mixed authentication mode then you need to provide sa password as per windows password policy. You can also change existing authentication mode setting to another one as per your business need.</p>



<p>Let&#8217;s assume you have installed SQL Server with Mixed authentication mode and now you have to change it to Windows Authentication mode. This section will explain step by step process to change SQL Server authentication mode.</p>



<p>We can set or change authentication mode in SQL Server either using SQL Server management studio or using T-SQL statements. </p>



<h3 class="wp-block-heading"><strong>Using SQL Server Management Studio</strong></h3>



<ol class="wp-block-list"><li>Launch SQL Server Management Studio, connect to your target SQL Server instance.</li><li>In SQL Server Management Studio Object Explorer, right-click the server, and then click&nbsp;<strong>Properties</strong>.</li><li>On the&nbsp;<strong>Security</strong>&nbsp;page, under&nbsp;<strong>Server authentication</strong>, you can see both authentication modes. Select any as per your need and then click&nbsp;<strong>OK</strong>.</li><li>This change will require SQL Server service restart. A popup window will appear to ask you to restart the service when you will click at OK button in above step. </li><li>In Object Explorer, right-click your server, and then click&nbsp;<strong>Restart</strong>. If SQL Server Agent is running, it must also be restarted.</li></ol>



<p>You have changed your authentication mode from Mixed mode to Windows using SQL Server Management Studio. </p>



<p>If you are changing authentication mode from Windows to Mixed mode then make sure to enable SQL Server login sa account. This account gets disabled during windows authentication mode to secure your SQL Server instance as sa is generic SQL Server login as it can be targeted by hackers to access your instance. Below are the steps to enable this account:</p>



<ol class="wp-block-list"><li>In Object Explorer, expand&nbsp;<strong>Security</strong>, expand Logins, right-click&nbsp;<strong>sa</strong>, and then click&nbsp;<strong>Properties</strong>.</li><li>On the&nbsp;<strong>General</strong>&nbsp;page, you might have to create and confirm a password for the&nbsp;<strong>sa</strong>&nbsp;login.</li><li>On the&nbsp;<strong>Status</strong>&nbsp;page, in the&nbsp;<strong>Login</strong>&nbsp;section, click&nbsp;<strong>Enabled</strong>, and then click&nbsp;<strong>OK</strong>.</li></ol>



<h3 class="wp-block-heading"><strong>Using T-SQL Statement</strong></h3>



<p>Microsoft has provided an extended stored procedure to chnage authenication mode in SQL Server using T-SQL statement. This extended stored procedure chnages windows registry entries so be careful while changing authentication mode in SQL Server using T-SQL statements. Make sure to take a backup of windows registry before executing this script.</p>



<p><code><strong>USE [master]<br>GO<br>EXEC xp_instance_regwrite N'HKEY_LOCAL_MACHINE',<br>N'Software\Microsoft\MSSQLServer\MSSQLServer',<br>N'LoginMode', REG_DWORD, 1<br>GO</strong></code></p>



<p>Above command has again changed authenticating mode from mixed to windows.</p>



<p>If you are doing other way around then make sure to enable sa login as i suggested above. You can also use below T-SQL statement to enable sa account.</p>



<p><code><strong>ALTER LOGIN sa ENABLE ;<br>GO<br>ALTER LOGIN sa WITH PASSWORD = 'STRONG-PASSWORD' ;<br>GO</strong></code></p>



<p>Here, i have explained how to change SQL Server authentication mode from Windows to Mixed mode or vice versa. Please comment us if you have any feedback on this article.</p>



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



<ul class="wp-block-list"><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: Login failed for user ‘User_Name’.</a> </strong></li><li><strong><a href="https://techyaz.com/sql-server/change-sql-server-instance-name/" target="_blank" rel="noreferrer noopener">How to Change SQL Server Instance Name?</a> </strong></li><li><strong><a href="https://techyaz.com/sql-server/t-sql/create-logon-trigger-restrict-sysadmin-logins-connect-sql-server-given-time-interval/" target="_blank" rel="noreferrer noopener">Create a Logon Trigger to Restrict sysadmin logins to connect to SQL Server for given Time Interval</a> </strong></li><li><strong><a href="https://techyaz.com/sql-server/troubleshooting/fix-error-18452-login-failed-login-from-untrusted-domain/" target="_blank" rel="noreferrer noopener">Fix Error 18452: Login failed. The login is from an untrusted domain</a> </strong></li></ul>



<p></p>
<p>The post <a href="https://techyaz.com/sql-server/change-authentication-mode-in-sql-server/">How to Change Authentication Mode in SQL Server?</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://techyaz.com/sql-server/change-authentication-mode-in-sql-server/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>How to Change Database Default Locations in SQL Server?</title>
		<link>https://techyaz.com/sql-server/change-database-default-locations-sql-server/</link>
					<comments>https://techyaz.com/sql-server/change-database-default-locations-sql-server/#respond</comments>
		
		<dc:creator><![CDATA[Manvendra Deo Singh]]></dc:creator>
		<pubDate>Thu, 03 May 2018 11:16:42 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server Administration]]></category>
		<category><![CDATA[data file]]></category>
		<category><![CDATA[data_files]]></category>
		<category><![CDATA[database property]]></category>
		<category><![CDATA[log files]]></category>
		<guid isPermaLink="false">http://techyaz.com/?p=2215</guid>

					<description><![CDATA[<p>Sometimes, we need to change default database File locations to some other path in SQL Server. If you have configured SQL Server default database file location as drive C then all SQL Server databases will be created in the path&#46;&#46;&#46;</p>
<p>The post <a href="https://techyaz.com/sql-server/change-database-default-locations-sql-server/">How to Change Database Default Locations in SQL Server?</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Sometimes, we need to change default database File locations to some other path in SQL Server. If you have configured SQL Server default database file location as drive C then all SQL Server databases will be created in the path set as database default locations if you have not mentioned their specific drives during database creation. You might need to change this path as per your environment standard. Here, I am going to show you how to view or change database default location in SQL Server.</p>
<p>One thing we should always keep in mind that if we change database default path in SQL Server then it will not change or move the database file locations for your existing databases. If you want to move all existing databases or you want to change database files path to the new location then you need to manually do it for each database.</p>
<p>Once you will change default database file locations then all databases you will create on that SQL Server Instance will be created on new location. Suppose your existing SQL Server default database location is set in C drive and now you have decided to change it to D drive for data files and F drive for Log files then all databases you will create post this change will be created in these both drives. If you will mention any other specific drive during database creation then SQL Server uses that drive and not these database default locations. The SQL Server data file will be created in D drive and log file will be created in F drive but all the existing databases that were created earlier in C drive will not move to new SQL server database file location. If you want to move these databases or want to change database files location then you need to manually do it either by detach-attach method or by ALTER statement.</p>
<h3><span style="color: #333399;">Change Database Default Locations in SQL Server</span></h3>
<p>It&#8217;s very simple method to change default log file location or default data file location in SQL Server. Let’s start to change default database path in SQL Server.</p>
<ul>
<li>Launch SQL Server Management Studio and connect to your SQL Server Instance for which you must change default log file location or default data file location in SQL Server.</li>
<li>Now right click at SQL Server Instance node and choose Properties option.</li>
<li>You will get server properties window on your screen. Click at “Database Settings” from left side pane. You will get all server level details for SQL Server databases in right side pane. Look at the database default locations option given bottom of the right-side pane. Here you can see separate default location for data files, Log file and backup files.</li>
</ul>
<p><img fetchpriority="high" decoding="async" class="size-full wp-image-2216 aligncenter" src="http://techyaz.com/wp-content/uploads/2018/05/default-db-path-min.png" alt="Change Default database file location in SQL Server" width="693" height="631" srcset="https://techyaz.com/wp-content/uploads/2018/05/default-db-path-min.png 693w, https://techyaz.com/wp-content/uploads/2018/05/default-db-path-min-300x273.png 300w" sizes="(max-width: 693px) 100vw, 693px" /></p>
<ul>
<li>You can see database default locations for each file are showing in C drive. It means every database that will be created without mentioning their data or log file location will go to above given SQL Server database default locations.</li>
<li>To change database default path, you need to browse current database default locations for each file to new the new location. Click at three dots showing next to data file or log file locations and then select the new path.</li>
<li>Repeat same exercise for each file. To change default data file location, click at three dots next to data path and select new path here. Similarly, click at three dots next to log file location to change default log file location. If you want to change default backup file location then do the same for backup location as well.</li>
<li>Click ak Ok button once you made changes for desired database file locations.</li>
<li>Last step is to restart SQL Server services to apply this change and bring it into effect.</li>
</ul>
<p>Once you will restart SQL Server services, your SQL Server default database location will be changed to the new path. 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/get-total-virtual-log-files/" target="_blank" rel="noopener">Get Total Number of Virtual Log Files in SQL Server Transaction Log File</a></strong></li>
<li><strong><a href="http://techyaz.com/sql-server/troubleshooting/fix-error-1105/" target="_blank" rel="noopener">SQL Server Error 1105: Could Not Allocate Space for Object in Database because the filegroup is full</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>
<li><strong><a href="http://techyaz.com/sql-server/always-turn-off-database-auto-shrink/" target="_blank" rel="noopener">Why Should You Always Turn Off Database Auto Shrink Property?</a></strong></li>
</ul>
<p>&nbsp;</p>
<p>The post <a href="https://techyaz.com/sql-server/change-database-default-locations-sql-server/">How to Change Database Default Locations in SQL Server?</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://techyaz.com/sql-server/change-database-default-locations-sql-server/feed/</wfw:commentRss>
			<slash:comments>0</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 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="(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>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 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="(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 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>How to Find When SQL Server was Installed?</title>
		<link>https://techyaz.com/sql-server/find-when-sql-server-was-installed/</link>
					<comments>https://techyaz.com/sql-server/find-when-sql-server-was-installed/#respond</comments>
		
		<dc:creator><![CDATA[Manvendra Deo Singh]]></dc:creator>
		<pubDate>Sun, 08 Apr 2018 09:36:05 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server Administration]]></category>
		<category><![CDATA[HowTO]]></category>
		<category><![CDATA[installation]]></category>
		<category><![CDATA[logins]]></category>
		<guid isPermaLink="false">http://techyaz.com/?p=2070</guid>

					<description><![CDATA[<p>Have you ever thought when SQL Server instance was installed on your machine? If you don&#8217;t have idea about finding SQL Server installation date then you should keep reading this article where i have described how to know when SQL&#46;&#46;&#46;</p>
<p>The post <a href="https://techyaz.com/sql-server/find-when-sql-server-was-installed/">How to Find When SQL Server was Installed?</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Have you ever thought when SQL Server instance was installed on your machine? If you don&#8217;t have idea about finding SQL Server installation date then you should keep reading this article where i have described how to know when SQL Server was installed on your database server?</p>
<p>There are many ways to check SQL Server installation date on your machine. Here i am going to discuss two popular methods that we can use easily to get install date of SQL Server. Let’s go one by one in step by step process.</p>
<h3><span style="color: #333399;">Method 1</span></h3>
<p>As we know whenever we install SQL Server, a SQL Server Agent job named <strong><em>“syspolicy_purge_history”</em></strong> got created. The install date of SQL Server instance will be same as the create date of this job because this job was created during SQL Server installation. So, if you need to find when SQL Server was installed on your database server then you can get it by create date info of above job. Follow below steps to get the details.</p>
<p>You can expand <em>SQL Server Agent</em> folder in SSMS and then <em>Jobs</em> folder. Here you can see this job. We can launch <em>Properties</em> window of job <strong><em>“syspolicy_purge_history”</em></strong> or you can query msdb database to get the details of this job. Here, I have launched Properties windows of this job and we can see the create date of this job is below screenshot. It means this SQL Server Instance was installed on 27<sup>th</sup> July 2017 as showing as create date of below job.</p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-2071" src="http://techyaz.com/wp-content/uploads/2018/04/1_agentjob-min.jpg" alt="Get SQL Server Installation Date" width="705" height="635" srcset="https://techyaz.com/wp-content/uploads/2018/04/1_agentjob-min.jpg 705w, https://techyaz.com/wp-content/uploads/2018/04/1_agentjob-min-300x270.jpg 300w" sizes="auto, (max-width: 705px) 100vw, 705px" /></p>
<h3><span style="color: #333399;">Method 2</span></h3>
<p>Another method to get SQL Server install date on your database server is by using SQL Server system logins. These system logins get created when we install SQL Server. Some of the system logins are <em>NT SERVICE\SQLWriter, NT Service\MSSQLSERVER, NT AUTHORITY\SYSTEM and NT AUTHORITY\NETWORK SERVICE</em>. You can also see some of the system logins that starts with hash <strong>#</strong> like <em>##MS_Policy*****</em> etc. As I said these logins get created during SQL Server installation so to get SQL Server installation date we can check the create date of any such logins.</p>
<p>You can run below commands to check the create date of any of system logins. I have executed below commands to check create date of three system logins.</p>
<pre><span style="color: #0000ff;"><strong>SELECT name, create_date</strong></span>
<span style="color: #0000ff;"><strong>FROM sys.server_principals</strong></span>
<span style="color: #0000ff;"><strong>WHERE name='NT SERVICE\SQLWriter'</strong></span>
<span style="color: #0000ff;"><strong>GO</strong></span>

<span style="color: #0000ff;"><strong>SELECT name, create_date</strong></span>
<span style="color: #0000ff;"><strong>FROM sys.server_principals</strong></span>
<span style="color: #0000ff;"><strong>WHERE name='NT Service\MSSQLSERVER'</strong></span>
<span style="color: #0000ff;"><strong>GO</strong></span>

<span style="color: #0000ff;"><strong>SELECT name, create_date</strong></span>
<span style="color: #0000ff;"><strong>FROM sys.server_principals</strong></span>
<span style="color: #0000ff;"><strong>WHERE name='NT AUTHORITY\SYSTEM'</strong></span>
<span style="color: #0000ff;"><strong>GO</strong></span></pre>
<p>We can see create date of all above SQL Server system logins are same as the create date of system job &#8220;<strong><em>syspolicy_purge_history&#8221; </em></strong>that is described in method 1. So, SQL Server install date on this database server was 27<sup>th</sup> July 2017 as shown in below image.</p>
<p><img loading="lazy" decoding="async" class="alignnone wp-image-2072" src="http://techyaz.com/wp-content/uploads/2018/04/2-systemaccounts-min.jpg" alt="Get SQL Server Installation date using system logins" width="577" height="418" srcset="https://techyaz.com/wp-content/uploads/2018/04/2-systemaccounts-min.jpg 559w, https://techyaz.com/wp-content/uploads/2018/04/2-systemaccounts-min-300x217.jpg 300w" sizes="auto, (max-width: 577px) 100vw, 577px" /></p>
<p>You can also get SQL Server install date by getting update date of system account <em><strong>sa</strong></em>. As we have disabled <em><strong>sa</strong> </em>account as part of SQL Server hardening so last update was captured when we disabled this account. But this does not show correct info always because if anybody has enabled this account and again disabled it then this will give you inaccurate information but you can use this information to compare the update date information with the create date of other logins and jobs. This will help you in identifying the install date of SQL Server in more accurate manner.</p>
<pre><strong><span style="color: #0000ff;">SELECT *</span></strong>
<strong><span style="color: #0000ff;">FROM syslogins</span></strong>
<strong><span style="color: #0000ff;">WHERE name='sa'</span></strong>
<strong><span style="color: #0000ff;">GO</span></strong>

<strong><span style="color: #0000ff;">SELECT *</span></strong>
<strong><span style="color: #0000ff;">FROM sys.server_principals</span></strong>
<strong><span style="color: #0000ff;">WHERE name='NT AUTHORITY\SYSTEM'</span></strong>
<strong><span style="color: #0000ff;">GO</span></strong></pre>
<p>You can see the update date of <em><strong>sa</strong></em> account and create date of the another system login shows same date that is also the SQL Server Installation date.</p>
<p><img loading="lazy" decoding="async" class="alignnone size-large wp-image-2073" src="http://techyaz.com/wp-content/uploads/2018/04/3_sa-min-1024x307.jpg" alt="update date of sa account" width="1024" height="307" srcset="https://techyaz.com/wp-content/uploads/2018/04/3_sa-min-1024x307.jpg 1024w, https://techyaz.com/wp-content/uploads/2018/04/3_sa-min-300x90.jpg 300w, https://techyaz.com/wp-content/uploads/2018/04/3_sa-min-768x230.jpg 768w, https://techyaz.com/wp-content/uploads/2018/04/3_sa-min.jpg 1071w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></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><span style="color: #800000;"><em><strong>Read More:</strong></em></span></p>
<ul>
<li><strong><a href="http://techyaz.com/sql-server/troubleshooting/sql-server-evaluation-period-has-expired-and-how-to-upgrade-it/" target="_blank" rel="noopener">SQL Server Evaluation Period has Expired and How to Upgrade it?</a></strong></li>
<li><strong><a href="http://techyaz.com/sql-server/create-logon-trigger-restrict-sysadmin-logins-connect-sql-server-given-time-interval/" target="_blank" rel="noopener">Create a Logon Trigger to Restrict sysadmin logins to Connect to SQL Server during a given time Interval</a></strong></li>
<li><strong><a href="http://techyaz.com/category/interview-questions/sql-server-interview-questions/">SQL Server Interview Questions &amp; Answers</a></strong></li>
</ul>
<p>The post <a href="https://techyaz.com/sql-server/find-when-sql-server-was-installed/">How to Find When SQL Server was Installed?</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://techyaz.com/sql-server/find-when-sql-server-was-installed/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>
		<item>
		<title>How to Enable, Disable or Check SQL Server Trace Flags?</title>
		<link>https://techyaz.com/sql-server/how-to-enable-disable-or-check-sql-server-trace-flags/</link>
					<comments>https://techyaz.com/sql-server/how-to-enable-disable-or-check-sql-server-trace-flags/#comments</comments>
		
		<dc:creator><![CDATA[Manvendra Deo Singh]]></dc:creator>
		<pubDate>Sun, 01 Apr 2018 12:17:44 +0000</pubDate>
				<category><![CDATA[DBCC & DMVs]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server Administration]]></category>
		<category><![CDATA[T-SQL]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[DBCC]]></category>
		<category><![CDATA[SQL Server Configuration Manager]]></category>
		<category><![CDATA[trace flags]]></category>
		<guid isPermaLink="false">http://techyaz.com/?p=2047</guid>

					<description><![CDATA[<p>Trace flags are used to gather in-depth information about certain logs during some transactions. We use DBCC commands to enable trace flags, disable trace flags or check the status of trace flags. Here i am going to discuss about SQL&#46;&#46;&#46;</p>
<p>The post <a href="https://techyaz.com/sql-server/how-to-enable-disable-or-check-sql-server-trace-flags/">How to Enable, Disable or Check SQL Server Trace Flags?</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Trace flags are used to gather in-depth information about certain logs during some transactions. We use DBCC commands to enable trace flags, disable trace flags or check the status of trace flags. Here i am going to discuss about SQL Server Trace flag and how we can enable, disable or check their status whether they are enabled or disabled on your SQL Server Instance.</p>
<p>Let&#8217;s start with the basics. MSDN says &#8220;Trace flags are used to temporarily set specific server characteristics or to switch off a particular behavior. Trace flags are frequently used to diagnose performance issues or to debug stored procedures or complex computer systems.&#8221;</p>
<p>There are two types of trace flags in SQL Server.</p>
<ul>
<li>Session</li>
<li>Global</li>
</ul>
<p>We can enable trace flag for the context of a specific query that we can run under a session. Session trace flags can be enabled for a connection and are visible only to that connection. This type of trace flag never affects another session running on your database server and the effect of the trace flag is lost when that connection logs out.</p>
<p>Global trace flags are set at the server level and must be enabled globally. If you will try to enable global trace flag for a particular session then there will not be any impact of this trace flag. Let&#8217;s go ahead and understand how we can check the status of trace flags running on your SQL Server instance.</p>
<h3><span style="color: #333399;">Check Trace Flag Status</span></h3>
<p>We use <strong><em>DBCC TRACESTATUS</em></strong> command to check all running or active trace flags on database system. We can also check the status of a specific trace flag using this DBCC command. The output of this DBCC command has four columns. First column is the trace flag number, second column shows the status of trace flag, third and fourth columns are showing whether the trace flag is enabled at the global level or session level.</p>
<p>The status column of this DBCC command has two values. The value shows whether the trace flag is ON (1) or OFF (0). You can see the below screenshot to understand the trace flags and their status.</p>
<pre><span style="color: #0000ff;"><strong>DBCC TRACESTATUS</strong></span></pre>
<p>We can run above DBCC command in different ways to get distinct outputs about trace flags status. Here, I am giving you few examples to use DBCC TRACESTATUS command.</p>
<p>Run below command to display the status of all trace flags that are currently enabled globally.</p>
<pre><span style="color: #0000ff;"><strong>DBCC TRACESTATUS(-1);  </strong></span>
<span style="color: #0000ff;"><strong>GO</strong></span></pre>
<p>We can even get status of multiple specific trace flags by executing below command. Run below command to get the status of trace flags 8690 and 1118.</p>
<pre><span style="color: #0000ff;"><strong>DBCC TRACESTATUS (8690, 1118);  </strong></span>
<span style="color: #0000ff;"><strong>GO</strong></span></pre>
<p>If you want to list all the trace flags that are enabled for the current session then you can get it by running below command.</p>
<pre><span style="color: #0000ff;"><strong>DBCC TRACESTATUS();  </strong></span>
<span style="color: #0000ff;"><strong>GO</strong></span></pre>
<p>If you want to check whether trace flag status for specific trace is enabled globally or not then you can run below command.</p>
<pre><span style="color: #0000ff;"><strong>DBCC TRACESTATUS(8690, -1)</strong></span></pre>
<h3><span style="color: #333399;">Enable Trace Flag</span></h3>
<p>We enable trace flags to gather more information about certain logs during some transactions. We use DBCC TRACEON command to enable SQL Server trace flags. Here, I will show you different uses of DBCC TRACEON command to enable trace flags.</p>
<p>Remember, all trace flags enabled using DBCC TRACEON command will be disabled once you restart the SQL Server service. If you want to enable any trace flag permanently then we recommend that you should enable them at startup, by using the <strong>-T</strong> command line option. This ensures the trace flag remains active after a server restart. You can launch <strong>SQL Server Configuration Manager</strong> and open the <strong>Properties</strong> window of <strong>SQL Server service</strong>. Here you can click on <strong>Startup Parameters</strong> tab. Here you can add your trace flag number along with <strong>-T</strong> and then click on Ok button to close the window.</p>
<p>If we need to enable a trace flag globally then we need to run below command with <strong>-1</strong> option as shown in below screenshot.</p>
<pre><span style="color: #0000ff;"><strong>DBCC TRACEON (8690, -1)</strong></span></pre>
<p>Now we can check the trace flag status whether it’s been enabled globally on our database system or not.</p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-2048" src="http://techyaz.com/wp-content/uploads/2018/04/1-traceon-min.jpg" alt="Enable Trace flag globally DBCC TRACEON" width="691" height="127" srcset="https://techyaz.com/wp-content/uploads/2018/04/1-traceon-min.jpg 691w, https://techyaz.com/wp-content/uploads/2018/04/1-traceon-min-300x55.jpg 300w" sizes="auto, (max-width: 691px) 100vw, 691px" /></p>
<p>If you want this trace to be enabled for current connection only then you should run below command. You can remove -1 from above command.</p>
<pre><span style="color: #0000ff;"><strong>DBCC TRACEON (8690);  </strong></span>
<span style="color: #0000ff;"><strong>GO</strong></span></pre>
<p>Even you can enable multiple trace flags by running single command. You can run below command to enable trace flag 8690 and 1117 globally. If you want to enable it for current connection only then you can remove -1 from below command.</p>
<pre><span style="color: #0000ff;"><strong>DBCC TRACEON (8690, 1117, -1);  </strong></span>
<span style="color: #0000ff;"><strong>GO</strong></span></pre>
<p>Run below DBCC command to check the status of the trace flag that we have enabled by running above command.</p>
<pre><span style="color: #0000ff;"><strong>DBCC TRACESTATUS</strong></span></pre>
<p>You can see trace flag 8690 is showing along with its value set as<strong> 1</strong> for session as well as global in below screenshot.</p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-2049" src="http://techyaz.com/wp-content/uploads/2018/04/2-tracestatus-min.jpg" alt="Check trace flag status using DBCC TRACESTATUS" width="383" height="225" srcset="https://techyaz.com/wp-content/uploads/2018/04/2-tracestatus-min.jpg 383w, https://techyaz.com/wp-content/uploads/2018/04/2-tracestatus-min-300x176.jpg 300w" sizes="auto, (max-width: 383px) 100vw, 383px" /></p>
<p>If you want to check trace flag status for specific trace number then you can run below command. Below command will let you know whether trace flag 8690 is enabled globally or not.</p>
<pre><span style="color: #0000ff;"><strong>DBCC TRACESTATUS(8690, -1)</strong></span></pre>
<h3><span style="color: #333399;">Disable Trace Flag</span></h3>
<p>Similarly, we can disable trace flag 8690 that we have enabled in above section by executing another DBCC command known as DBCC TRACEOFF. Run below command to disable trace flag. If we will use -1 value along with DBCC TRACEOFF command that means it will disable this trace flag globally.</p>
<pre><span style="color: #0000ff;"><strong>DBCC TRACEOFF(8690, -1)</strong></span></pre>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-2050" src="http://techyaz.com/wp-content/uploads/2018/04/3-traceon-min.jpg" alt="Disable Trace flag using DBCC TRACEOFF" width="699" height="128" srcset="https://techyaz.com/wp-content/uploads/2018/04/3-traceon-min.jpg 699w, https://techyaz.com/wp-content/uploads/2018/04/3-traceon-min-300x55.jpg 300w" sizes="auto, (max-width: 699px) 100vw, 699px" /></p>
<p>If you want to disable it for current connection only then we will remove <strong>-1</strong> from above command and run below command.</p>
<pre><span style="color: #0000ff;"><strong>DBCC TRACEOFF(8690);   </strong></span>
<span style="color: #0000ff;"><strong>GO</strong></span></pre>
<p>Now we can again check the status of trace flag 8690 whether this trace is still active or it has been deactivated by above command.</p>
<pre><span style="color: #0000ff;"><strong>DBCC TRACESTATUS</strong></span></pre>
<p>We can see trace 8690 is disabled now and this trace flag cannot be active in below image.</p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-2051" src="http://techyaz.com/wp-content/uploads/2018/04/4-tracestatus-min.jpg" alt="dbcc tracestatus post deactivating a trace" width="394" height="214" srcset="https://techyaz.com/wp-content/uploads/2018/04/4-tracestatus-min.jpg 394w, https://techyaz.com/wp-content/uploads/2018/04/4-tracestatus-min-300x163.jpg 300w" sizes="auto, (max-width: 394px) 100vw, 394px" /></p>
<p>If you want to check trace flag status for a individual trace then you can run below command.</p>
<pre><span style="color: #0000ff;"><strong>DBCC TRACESTATUS(8690, -1)</strong></span></pre>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-2052" src="http://techyaz.com/wp-content/uploads/2018/04/5-tracestatus-min.jpg" alt="Check trace flag globally enabled or not" width="396" height="137" srcset="https://techyaz.com/wp-content/uploads/2018/04/5-tracestatus-min.jpg 396w, https://techyaz.com/wp-content/uploads/2018/04/5-tracestatus-min-300x104.jpg 300w" sizes="auto, (max-width: 396px) 100vw, 396px" /></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" target="_blank" rel="noopener">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/to-find-out-no-of-traces-running-on-your-db-instance/" target="_blank" rel="noopener">Find Total no of Running Traces files on your Database Server</a></strong></li>
<li><strong><a href="http://techyaz.com/sql-server/avoid-database-shrink-operation/" target="_blank" rel="noopener">Understanding Database Shrink Operation</a></strong></li>
<li><strong><a href="http://techyaz.com/sql-server/how-to-avoid-page-split-in-sql-server/" target="_blank" rel="noopener">How to Avoid Page Split in SQL Server?</a></strong></li>
</ul>
<p>The post <a href="https://techyaz.com/sql-server/how-to-enable-disable-or-check-sql-server-trace-flags/">How to Enable, Disable or Check SQL Server Trace Flags?</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://techyaz.com/sql-server/how-to-enable-disable-or-check-sql-server-trace-flags/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>Fix Error 1418: The server network address cannot be reached or does not exist.</title>
		<link>https://techyaz.com/sql-server/troubleshooting/fix-error-1418-the-server-network-address-cannot-be-reached-or-does-not-exist/</link>
					<comments>https://techyaz.com/sql-server/troubleshooting/fix-error-1418-the-server-network-address-cannot-be-reached-or-does-not-exist/#respond</comments>
		
		<dc:creator><![CDATA[Manvendra Deo Singh]]></dc:creator>
		<pubDate>Tue, 27 Mar 2018 16:53:07 +0000</pubDate>
				<category><![CDATA[AlwaysOn]]></category>
		<category><![CDATA[Database Mirroring]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[endpoints]]></category>
		<category><![CDATA[HowTO]]></category>
		<category><![CDATA[SQL Server Configuration Manager]]></category>
		<category><![CDATA[SQL_Error_Code]]></category>
		<guid isPermaLink="false">http://techyaz.com/?p=1997</guid>

					<description><![CDATA[<p>We got error 1418 while configuring Database Mirroring on one of the SQL Server database instance. The error details are given below: The server network address “TCP://ServerName.abc.local:5022&#8243; cannot be reached or does not exist. Check the network address name and&#46;&#46;&#46;</p>
<p>The post <a href="https://techyaz.com/sql-server/troubleshooting/fix-error-1418-the-server-network-address-cannot-be-reached-or-does-not-exist/">Fix Error 1418: The server network address cannot be reached or does not exist.</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>We got error 1418 while configuring Database Mirroring on one of the SQL Server database instance. The error details are given below:</p>
<p><em><span style="color: #ff0000;">The server network address <strong>“TCP://ServerName.abc.local:5022&#8243;</strong> cannot be reached or does not exist. Check the network address name and that the ports for the local and remote endpoints are operational. (Microsoft SQL Server, Error: 1418)</span></em></p>
<h3><span style="color: #333399;">Reason behind Error 1418</span></h3>
<p>Main reason behind database mirroring error 1418 is because the specified server network address cannot be reached or does not exist. The server network address cannot be reached because of multiple reasons. Some of them are given below.</p>
<p><img loading="lazy" decoding="async" class="size-full wp-image-2000 alignright" src="http://techyaz.com/wp-content/uploads/2018/03/fix-error-1418.png" alt="fix error 1418" width="300" height="300" srcset="https://techyaz.com/wp-content/uploads/2018/03/fix-error-1418.png 300w, https://techyaz.com/wp-content/uploads/2018/03/fix-error-1418-150x150.png 150w, https://techyaz.com/wp-content/uploads/2018/03/fix-error-1418-160x160.png 160w, https://techyaz.com/wp-content/uploads/2018/03/fix-error-1418-320x320.png 320w" sizes="auto, (max-width: 300px) 100vw, 300px" /></p>
<ul>
<li>Principal, Mirror and Witness servers are not talking to each other.</li>
<li>Wrong network address name, mirror server instance name or port number.</li>
<li>Mirror database is not ready for mirroring.</li>
<li>Principal or mirror server instance is behind a firewall.</li>
<li>You are using local system account to run SQL Server services and not using certificates for authentication.</li>
<li>SQL Server services are running with different domain accounts on Principal and Mirror server and service accounts don&#8217;t have enough permission on endpoints.</li>
<li>Different endpoint encryption value set on Principal, Mirror and Witness server.</li>
<li>Endpoints are not started on the partner servers.</li>
<li>Principal server instance is not listening on the port assigned to its database mirroring endpoint.</li>
</ul>
<p>We need to verify each option mentioned above carefully to fix this error.</p>
<h3><span style="color: #333399;">Solution</span></h3>
<p>The solution of this issue may vary case to case depending on the nature of issue. To fix this issue we need to find out the main root cause behind error 1418. The root cause may be anything that is given in above section. Here I will describe each probable reason given above and its solution to fix this issue. Make sure to go through with each point given in this article.</p>
<h5><span style="color: #993300;">Principal, Mirror and Witness Servers Should be Accessible</span></h5>
<p>Make sure that SQL Server Instances installed on Principal, Mirror &amp; Witness servers are accessible to each other. If remote login for any SQL Server instance is not enabled then you might get this issue. You can enable remote connectivity by <strong><a href="http://techyaz.com/sql-server/troubleshooting/fix-error-40-network-related-instance-specific-error-occurred-establishing-connection/" target="_blank" rel="noopener">enabling TCP/IP and Named Pipes protocols in SQL Server Configuration Manager</a></strong>. Each system must access the ports of the other SQL Server instances over TCP. You can try telnet the SQL Server ports of other partners.</p>
<h5><span style="color: #993300;">Verify Correct System Details </span></h5>
<p>Sometimes we entered wrong details that end up with throwing errors. Make sure to verify the network address name, mirror server instance name and its port numbers are correct. You can recheck all the details whether you have entered them correctly or not.</p>
<h5><span style="color: #993300;">Mirror Database Preparation</span></h5>
<p>Verify that the mirror database is ready for database mirroring. We should prepare mirror database before configuring or during configuring database mirroring. It is suggested to keep identical drive path for mirror database files. Below are the steps you should take care for preparing your mirroring database.</p>
<ul>
<li>Run full backup and subsequent transactional log backup of the Principal database and copy it to the Mirror server.</li>
<li>Restore database with same name in norecovery state on Mirror server with the copied backup files from above step. You must ensure that restored database on mirror server should be in restoring mode before starting database mirroring configuration.</li>
</ul>
<h5><span style="color: #993300;">Firewall/Ports</span></h5>
<p>One of the probable reason to get error 1418 is partner servers are behind firewall. Make sure that the principal server instance and destination mirror server instance is not behind a firewall and they should talk to each other. Principal server, Mirror server and witness server should be accessible to each other.</p>
<p>Verify that SQL Server port and endpoint ports are enabled and accessible via telnet. If not or you are not able to telnet any of the partner instance from any server participating in mirroring then you should ask your network admins to open these ports to establish the connectivity over given port.</p>
<h5><span style="color: #993300;">Endpoints</span></h5>
<p>Make sure that endpoint has been created on principal, mirror and witness servers. Verify that the endpoints are started on each partner server instances. You can check endpoint status by running below T-SQL query on each instance.</p>
<pre><strong><span style="color: #0000ff;">SELECT state_desc FROM sys.database_mirroring_endpoints</span></strong></pre>
<p>If either endpoint is not started, execute below ALTER ENDPOINT statement to start it.</p>
<pre><span style="color: #008000;"><strong>#Change the name of your endpoints. Here endpoint name is Mirroring</strong></span>
<strong><span style="color: #0000ff;">ALTER ENDPOINT Mirroring</span></strong>
<strong><span style="color: #0000ff;">STATE = STARTED</span></strong>
<strong><span style="color: #0000ff;">AS TCP (LISTENER_PORT = &lt;port_number&gt;)</span></strong>
<strong><span style="color: #0000ff;">FOR database_mirroring (ROLE = ALL);</span></strong>
<strong><span style="color: #0000ff;">GO</span></strong></pre>
<p>Recheck that the principal server instance is listening on the port assigned to its database mirroring endpoint and the mirror server instance is listening on its port. If a partner is not listening on its assigned port, modify the database mirroring endpoint to listen on a different port.</p>
<p>Sometimes this issue got fixed by dropping the existing endpoint and recreate it again on partner servers.</p>
<h5><span style="color: #993300;">Service Accounts</span></h5>
<p>Do not use <em>local system</em> account to run SQL Server services. If you don’t have any choice and want to use local system then ensure to use certificates for authentications.</p>
<p>Make sure that service accounts that you are using to run SQL Server services must have CONNECT permission to mirroring endpoints. Also, if you are configuring database mirroring between two domains then the login of one account must be created in <strong>master</strong> database on the other computer, and that login must be granted CONNECT permissions on the endpoint.</p>
<p>It&#8217;s always advisable to use same service accounts to run SQL Server services on all three Instances on Principal, Mirror and Witness server.</p>
<p>You can comment us your experience about fixing this issue. We will update this article with your solution that you have used to fix this issue.</p>
<p>I hope you like this article. Please follow us on our <a href="https://www.facebook.com/Techyaz/" target="_blank" rel="noopener">Facebook</a> page and <a href="https://twitter.com/Tech_yaz" target="_blank" rel="noopener">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/fix-error-15141-server-principal-owns-one-endpoints-cannot-dropped/" target="_blank" rel="noopener">Fix Error 15141: The server principal owns one or more endpoints and cannot be dropped</a></strong></li>
<li><strong><a href="http://techyaz.com/sql-server/troubleshooting/fix-alwayson-error-35250-joining-database-secondary-replica-resulted-error/" target="_blank" rel="noopener">Fix AOAG Error 35250: Joining database on Secondary Replica resulted in an error</a></strong></li>
<li><strong><a href="http://techyaz.com/sql-server/upgrade-patch-availability-group-instances/" target="_blank" rel="noopener">How to Upgrade or Patch Availability Group Instances?</a></strong></li>
<li><strong><a href="http://techyaz.com/sql-server/alwayson/sql-server-alwayson-interview-questions-answers/" target="_blank" rel="noopener">SQL Server Always On Interview Questions and Answers</a></strong></li>
</ul>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>The post <a href="https://techyaz.com/sql-server/troubleshooting/fix-error-1418-the-server-network-address-cannot-be-reached-or-does-not-exist/">Fix Error 1418: The server network address cannot be reached or 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-1418-the-server-network-address-cannot-be-reached-or-does-not-exist/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Understanding Database Shrink Operation and Why Should We Avoid It?</title>
		<link>https://techyaz.com/sql-server/avoid-database-shrink-operation/</link>
					<comments>https://techyaz.com/sql-server/avoid-database-shrink-operation/#comments</comments>
		
		<dc:creator><![CDATA[Manvendra Deo Singh]]></dc:creator>
		<pubDate>Fri, 16 Mar 2018 09:54:27 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server Administration]]></category>
		<category><![CDATA[database property]]></category>
		<category><![CDATA[Shrink]]></category>
		<guid isPermaLink="false">http://techyaz.com/?p=1951</guid>

					<description><![CDATA[<p>Database Shrink is a process to remove unused space allocated to the database or database files to the disk. When we shrink database log file or data files, it recovers space by moving pages of data from the end of&#46;&#46;&#46;</p>
<p>The post <a href="https://techyaz.com/sql-server/avoid-database-shrink-operation/">Understanding Database Shrink Operation and Why Should We Avoid It?</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Database Shrink is a process to remove unused space allocated to the database or database files to the disk. When we shrink database log file or data files, it recovers space by moving pages of data from the end of the file to unoccupied space closer to the front of the file. Data that is moved to shrink database files can be scattered to any available location in the file. This causes index fragmentation and can slow the performance of queries that search a range of the index. To eliminate the fragmentation, consider rebuilding the indexes on the file after shrinking.</p>
<p><img loading="lazy" decoding="async" class="size-full wp-image-1952 alignright" src="http://techyaz.com/wp-content/uploads/2018/03/shrink.png" alt="Should We Shrink SQL Server Database or files?" width="300" height="300" srcset="https://techyaz.com/wp-content/uploads/2018/03/shrink.png 300w, https://techyaz.com/wp-content/uploads/2018/03/shrink-150x150.png 150w, https://techyaz.com/wp-content/uploads/2018/03/shrink-160x160.png 160w, https://techyaz.com/wp-content/uploads/2018/03/shrink-320x320.png 320w" sizes="auto, (max-width: 300px) 100vw, 300px" /></p>
<p>There are two ways to perform shrink operation on your SQL Server databases.</p>
<h5><span style="color: #333399;">Automatic Shrinking</span></h5>
<p>Automatic Shrinking can be enabled by setting <strong>Auto_Shrink</strong> database property to ON. SQL Server database engine will automatically perform shrink database operation on your database whenever required. Unless we have a specific requirement, we should not set the AUTO_SHRINK database option to ON because it degrades your database performance. SQL Server shrink database files also increases IO overhead that leads to poor performance. Read below article where I have explained how this option degrades database performance and why we should not set Auto_Shrink database option to ON.</p>
<ul>
<li><strong><a href="http://techyaz.com/sql-server/always-turn-off-database-auto-shrink/" target="_blank" rel="noopener">Why Should You Always Turn Off Database Auto Shrink Property?</a></strong></li>
</ul>
<h5><span style="color: #333399;">Manual Shrinking</span></h5>
<p>We can use DBCC SHRINKDATABASE or DBCC SHRINKFILE statement to manually shrink database log file or data file within a database. Shrink database operation runs at file level. When you use DBCC SHRINKDATABASE, it also shrink the size of data or log files. We can stop the execution of DBCC SHRINKDATABASE and DBCC SHRINKFILE operations at any point in the process, and any completed work is retained.</p>
<p>One question most of the DBA ask that should we shrink database or should we shrink database log file or data file in SQL Server?The answer of this question is simple, we should not perform shrink operation regularly. Database Shrink operation is resource intensive operations because data pages are moved from the end of the file to unoccupied space closer to the front of the file. This process put pressure on system IO and CPU and also causes high fragmentation. You might also face some blocking issues during the shrink operation. That&#8217;s the reason it’s not recommended to shrink data file or log file on frequent or routine basis. SQL Server shrink database files should be avoided.</p>
<p>We should generally perform shrink operation if we truncate or drop table or tables from the database. If we remove or purge bigger chunk of data from your database then also we can perform shrink operation to reclaim the unused space to the disk. Always leave some space to the database to perform its routine operations. Most databases require some free space for regular day-to-day operations. Do Not Shrink such databases and their database files because databases will again allocate required space for their operation. Make sure to rebuild your indexes post database shrink operation if you need to perform it.</p>
<p>Also you should keep this in mind that we cannot shrink a database while the database is being backed up. Similarly, you cannot backup a database while a shrink operation on the database is in process. Here you have learnt about SQL Server shrink database files.<br />
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/always-turn-off-database-auto-shrink/" target="_blank" rel="noopener">Why Should You Always Turn Off Database Auto Shrink Property?</a></strong></li>
<li><strong><a href="http://techyaz.com/sql-server/understanding-database-autogrowth-sql-server/" target="_blank" rel="noopener">What is the best value for database file autogrowth?</a></strong></li>
<li><strong><a href="http://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: Failed Data or Log file Autogrow Operation</a></strong></li>
<li><strong><a href="http://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>
</ul>
<p>The post <a href="https://techyaz.com/sql-server/avoid-database-shrink-operation/">Understanding Database Shrink Operation and Why Should We Avoid It?</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://techyaz.com/sql-server/avoid-database-shrink-operation/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>SQL Server Evaluation Period has Expired and How to Upgrade it?</title>
		<link>https://techyaz.com/sql-server/sql-server-evaluation-period-has-expired-and-how-to-upgrade-it/</link>
					<comments>https://techyaz.com/sql-server/sql-server-evaluation-period-has-expired-and-how-to-upgrade-it/#respond</comments>
		
		<dc:creator><![CDATA[Manvendra Deo Singh]]></dc:creator>
		<pubDate>Tue, 13 Mar 2018 12:00:05 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server Administration]]></category>
		<category><![CDATA[SQL Server UPGRADE]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[installation]]></category>
		<category><![CDATA[License key]]></category>
		<category><![CDATA[SQL Server Uninstallation]]></category>
		<guid isPermaLink="false">http://techyaz.com/?p=1927</guid>

					<description><![CDATA[<p>Generally, we download SQL Server evaluation edition to learn or do some testing before deployments. Evaluation edition of SQL Server is free for 180 days and it is equivalent to SQL Server Enterprise Version. If the validity of Evaluation period&#46;&#46;&#46;</p>
<p>The post <a href="https://techyaz.com/sql-server/sql-server-evaluation-period-has-expired-and-how-to-upgrade-it/">SQL Server Evaluation Period has Expired and How to Upgrade it?</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Generally, we download SQL Server evaluation edition to learn or do some testing before deployments. Evaluation edition of SQL Server is free for 180 days and it is equivalent to SQL Server Enterprise Version. If the validity of Evaluation period i.e. 180 days will exceed then SQL Server will shut down and will not come online. We need to activate this SQL Server instance to a licensed version if we want to keep it running. Here, I will show you how to upgrade SQL Server Evaluation edition to Enterprise, Standard or Developer edition in step by step process.</p>
<p>Recently, one of the SQL Server Instance suddenly stopped working and shutdown automatically. We failed to bring its services online. Even we were not able to launch SQL Server Management studio. When we checked windows event viewer, we had seen multiple event ids for SQL Server like Event ID 7024, Event ID 17051 etc. We got this error because SQL Server evaluation period has expired for this instance.</p>
<p>As I said, SQL Server was down and I tried starting it from SQL Server Configuration Manager. It never come online so I decided to check Windows event viewer. I saw event id 7024 that says something wrong with application SQL Server. You can see the screenshot of event id 7024.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-large wp-image-1928" src="http://techyaz.com/wp-content/uploads/2018/03/1-Event-Viewer-Error-min-1024x327.png" alt="Event ID 7024" width="1024" height="327" srcset="https://techyaz.com/wp-content/uploads/2018/03/1-Event-Viewer-Error-min-1024x327.png 1024w, https://techyaz.com/wp-content/uploads/2018/03/1-Event-Viewer-Error-min-300x96.png 300w, https://techyaz.com/wp-content/uploads/2018/03/1-Event-Viewer-Error-min-768x246.png 768w, https://techyaz.com/wp-content/uploads/2018/03/1-Event-Viewer-Error-min.png 1073w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></p>
<p>We can see error 17051 is captured for SQL Server in above screenshot. When I scrolled next error details I saw below details with event id 17051 that says “<em>SQL Server evaluation period has expired</em>”. When you look into SQL Server error log, you will get below details.</p>
<p><span style="color: #ff0000;"><strong>Error: 17051, Severity: 16, State: 1</strong>.</span><br />
<span style="color: #ff0000;"> <strong>SQL Server evaluation period has expired.</strong></span></p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-1934" src="http://techyaz.com/wp-content/uploads/2018/03/2-Event-Viewer-Error-min.png" alt="SQL Server Evaluation Period has expired" width="955" height="231" srcset="https://techyaz.com/wp-content/uploads/2018/03/2-Event-Viewer-Error-min.png 955w, https://techyaz.com/wp-content/uploads/2018/03/2-Event-Viewer-Error-min-300x73.png 300w, https://techyaz.com/wp-content/uploads/2018/03/2-Event-Viewer-Error-min-768x186.png 768w" sizes="auto, (max-width: 955px) 100vw, 955px" /></p>
<p>Then I decided to check the installed version of SQL Server that clearly says that we had installed SQL Server Evaluation version on this database server. You can get it by launching property window of SQL Server service in SQL Server Configuration Manager. You can see this in below screenshot.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-1935" src="http://techyaz.com/wp-content/uploads/2018/03/3-Event-Viewer-Error-min.png" alt="Evaluation Edition in Service Property Window" width="431" height="501" srcset="https://techyaz.com/wp-content/uploads/2018/03/3-Event-Viewer-Error-min.png 431w, https://techyaz.com/wp-content/uploads/2018/03/3-Event-Viewer-Error-min-258x300.png 258w" sizes="auto, (max-width: 431px) 100vw, 431px" /></p>
<p>Now we had to upgrade SQL Server evaluation edition to bring it online and make it work as it was working before. To start this, we need SQL Server setup files to perform this upgrade. Follow below steps to activate your expired SQL Server evaluation version to either standard, enterprise or developer edition.</p>
<h3><span style="color: #333399;">Upgrade SQL Server Evaluation Edition to Enterprise Edition</span></h3>
<p>First decide on which edition you want to upgrade your expired SQL Server evaluation edition instance. Copy identified edition of SQL Server setup files to the target or impacted SQL Server machine. Now we will launch SQL Server Installation Center to run this upgrade. Make sure to run this whole process using sysadmin account.</p>
<p>Double click on Setup.exe file to start the upgrade. You will get <strong>SQL Server Installation Center</strong> once you run setup.exe file of SQL Server setup. Click at “<strong>Maintenance</strong>” tab from left side pane as shown in below image and then click on “<strong>Edition Upgrade”</strong> option from right side pane.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-1936" src="http://techyaz.com/wp-content/uploads/2018/03/4-SQL-Setup-min.png" alt="SQL Server Installation Center" width="798" height="598" srcset="https://techyaz.com/wp-content/uploads/2018/03/4-SQL-Setup-min.png 798w, https://techyaz.com/wp-content/uploads/2018/03/4-SQL-Setup-min-300x225.png 300w, https://techyaz.com/wp-content/uploads/2018/03/4-SQL-Setup-min-768x576.png 768w" sizes="auto, (max-width: 798px) 100vw, 798px" /></p>
<p>Once you click at Edition upgrade, below image will come to proceed. This screen will come to enter the product key of SQL Server. Verify the correct product key and click on next button to proceed.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-1938" src="http://techyaz.com/wp-content/uploads/2018/03/5-SQL-Setup-min.png" alt="Enter Product key" width="815" height="621" srcset="https://techyaz.com/wp-content/uploads/2018/03/5-SQL-Setup-min.png 815w, https://techyaz.com/wp-content/uploads/2018/03/5-SQL-Setup-min-300x229.png 300w, https://techyaz.com/wp-content/uploads/2018/03/5-SQL-Setup-min-768x585.png 768w" sizes="auto, (max-width: 815px) 100vw, 815px" /></p>
<p>Once you click at next button you will get below pop up “<em>Evaluation period has expired</em>”. Click on Ok button to proceed.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-1939" src="http://techyaz.com/wp-content/uploads/2018/03/6-SQL-Setup-min.png" alt="Pop up evaluation period has expired" width="819" height="617" srcset="https://techyaz.com/wp-content/uploads/2018/03/6-SQL-Setup-min.png 819w, https://techyaz.com/wp-content/uploads/2018/03/6-SQL-Setup-min-300x226.png 300w, https://techyaz.com/wp-content/uploads/2018/03/6-SQL-Setup-min-768x579.png 768w" sizes="auto, (max-width: 819px) 100vw, 819px" /></p>
<p>Next screen will come to accept the License Terms. Click at Next button after selecting “<em>I accept license terms</em>” checkbox option.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-1940" src="http://techyaz.com/wp-content/uploads/2018/03/7-SQL-Setup-min.png" alt="Accept License Terms" width="823" height="621" srcset="https://techyaz.com/wp-content/uploads/2018/03/7-SQL-Setup-min.png 823w, https://techyaz.com/wp-content/uploads/2018/03/7-SQL-Setup-min-300x226.png 300w, https://techyaz.com/wp-content/uploads/2018/03/7-SQL-Setup-min-768x579.png 768w" sizes="auto, (max-width: 823px) 100vw, 823px" /></p>
<p>Here, you will get installed components of SQL Server. Verify the SQL Server instance and click on next button to proceed. You can see edition is showing as Evaluation in below screenshot.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-1941" src="http://techyaz.com/wp-content/uploads/2018/03/8-SQL-Setup-min.png" alt="Instance of SQL Server Installed on this machine" width="821" height="619" srcset="https://techyaz.com/wp-content/uploads/2018/03/8-SQL-Setup-min.png 821w, https://techyaz.com/wp-content/uploads/2018/03/8-SQL-Setup-min-300x226.png 300w, https://techyaz.com/wp-content/uploads/2018/03/8-SQL-Setup-min-768x579.png 768w" sizes="auto, (max-width: 821px) 100vw, 821px" /></p>
<p>Once you will click at Next button, rules will be checked by the setup and you can see the progress bar in below image.</p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-1942 size-full" src="http://techyaz.com/wp-content/uploads/2018/03/9-SQL-Setup-min.png" alt="Check Rules" width="817" height="609" srcset="https://techyaz.com/wp-content/uploads/2018/03/9-SQL-Setup-min.png 817w, https://techyaz.com/wp-content/uploads/2018/03/9-SQL-Setup-min-300x224.png 300w, https://techyaz.com/wp-content/uploads/2018/03/9-SQL-Setup-min-768x572.png 768w" sizes="auto, (max-width: 817px) 100vw, 817px" /></p>
<p>Now it’s time for final window of this upgrade process where you need to recheck and verify the details and if everything looks good then click at “Upgrade” button to start the upgrade process.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-1943" src="http://techyaz.com/wp-content/uploads/2018/03/10-SQL-Setup-min.png" alt="Run the upgrade" width="823" height="615" srcset="https://techyaz.com/wp-content/uploads/2018/03/10-SQL-Setup-min.png 823w, https://techyaz.com/wp-content/uploads/2018/03/10-SQL-Setup-min-300x224.png 300w, https://techyaz.com/wp-content/uploads/2018/03/10-SQL-Setup-min-768x574.png 768w" sizes="auto, (max-width: 823px) 100vw, 823px" /></p>
<p>Setup will process and end up with new upgraded edition. You have been activated SQL Server to run it on your server and it has been upgraded to your identified edition of SQL Server i.e Enterprise edition.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-1944" src="http://techyaz.com/wp-content/uploads/2018/03/11-SQL-Setup-min.png" alt="Upgraded" width="807" height="621" srcset="https://techyaz.com/wp-content/uploads/2018/03/11-SQL-Setup-min.png 807w, https://techyaz.com/wp-content/uploads/2018/03/11-SQL-Setup-min-300x231.png 300w, https://techyaz.com/wp-content/uploads/2018/03/11-SQL-Setup-min-768x591.png 768w" sizes="auto, (max-width: 807px) 100vw, 807px" /></p>
<p>You can check the upgraded edition by launching property window of SQL Server service in SQL Server Configuration window. We can see now edition is showing as Enterprise Edition. Here, we have upgraded SQL Server evaluation version to Enterprise edition of SQL Server 2014.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-1945" src="http://techyaz.com/wp-content/uploads/2018/03/12-SQL-Service-min.png" alt="SQL Server Service Property " width="429" height="503" srcset="https://techyaz.com/wp-content/uploads/2018/03/12-SQL-Service-min.png 429w, https://techyaz.com/wp-content/uploads/2018/03/12-SQL-Service-min-256x300.png 256w" sizes="auto, (max-width: 429px) 100vw, 429px" /></p>
<p>Now you can go ahead and launch SQL Server Management Studio and establish database connection to check and verify all details to make sure everything is ok on your database server.<br />
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/update-license-key-product-key-sql-server-instance/" target="_blank" rel="noopener">How to update License Key or Product Key of SQL Server?</a></strong></li>
<li><strong><a href="http://techyaz.com/sql-server/troubleshooting/fix-sql-server-installation-error-1639/" target="_blank" rel="noopener">Fix SQL Server Installation Error 1639</a></strong></li>
<li><strong><a href="http://techyaz.com/interview-questions/sql-server-dba-interview-questions-answers/" target="_blank" rel="noopener">SQL Server Interview Questions &amp; Answers</a></strong></li>
</ul>
<p>The post <a href="https://techyaz.com/sql-server/sql-server-evaluation-period-has-expired-and-how-to-upgrade-it/">SQL Server Evaluation Period has Expired and How to Upgrade it?</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://techyaz.com/sql-server/sql-server-evaluation-period-has-expired-and-how-to-upgrade-it/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Fix SQL Server Error 233: No process is on the other end of the pipe</title>
		<link>https://techyaz.com/sql-server/troubleshooting/fix-error-233-no-process-end-pipe/</link>
					<comments>https://techyaz.com/sql-server/troubleshooting/fix-error-233-no-process-end-pipe/#comments</comments>
		
		<dc:creator><![CDATA[Manvendra Deo Singh]]></dc:creator>
		<pubDate>Thu, 15 Feb 2018 09:43:23 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[HowTO]]></category>
		<category><![CDATA[SQL Server Configuration Manager]]></category>
		<category><![CDATA[SQL Server Connectivity Issue]]></category>
		<category><![CDATA[SQL_Error_Code]]></category>
		<guid isPermaLink="false">http://techyaz.com/?p=1869</guid>

					<description><![CDATA[<p>Today, I got SQL Server error 233 no process is on the other end of the pipe while connecting to one of the SQL Server instance using SSMS client. SQL Error 233 was saying No process is on the other&#46;&#46;&#46;</p>
<p>The post <a href="https://techyaz.com/sql-server/troubleshooting/fix-error-233-no-process-end-pipe/">Fix SQL Server Error 233: No process is on the other end of the pipe</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Today, I got <em>SQL Server error 233 no process is on the other end of the pipe</em> while connecting to one of the SQL Server instance using SSMS client. SQL Error 233 was saying <strong>No process is on the other end of the pipe</strong> and its details are given as:</p>
<p><span style="color: #ff0000;"><em>A connection was successfully established with the server, but then an error occurred during the login process. (provider: Shared Memory Provider, error: 0 – No process is on the other end of the pipe) (Microsoft SQL Server, Error: 233)</em></span></p>
<p>You can see the screenshot of this error that I had received while making a database connection.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-1871" src="http://techyaz.com/wp-content/uploads/2018/02/error-233-min.jpg" alt="Error 233" width="619" height="315" srcset="https://techyaz.com/wp-content/uploads/2018/02/error-233-min.jpg 619w, https://techyaz.com/wp-content/uploads/2018/02/error-233-min-300x153.jpg 300w" sizes="auto, (max-width: 619px) 100vw, 619px" /></p>
<h3><span style="color: #333399;">SQL Server Error 233 No process is on the other end of the pipe &#8211; Root Cause</span></h3>
<p>Above SQL error 233 suggests the provider name as Shared Memory Provider. We know Shared Memory is a protocol used in SQL Server along with TCP/IP and Named pipe. We decided to check the settings and values for all protocols in SQL Server Configuration Manager.</p>
<p>I launched <a href="http://techyaz.com/sql-server/troubleshooting/fix-sql-server-configuration-manager-issue-mmc-not-create-snap/" target="_blank" rel="noopener">SQL Server Configuration manager</a> and expanded SQL Server Network Protocols from left side pane. Here, you can see an option “<em>Protocols for MSSQLSERVER</em>”.  MSSQLSERVER is the name of SQL Server Instance as default instance has been installed there. If you have named instance installed on your machine then you might get “<em>Protocols for &lt;INSTANCENAME&gt;</em>.</p>
<p>Now click on this option “<em>Protocols for MSSQLSERVER</em>”, you can see all three protocols used in SQL Server in right side pane as shown in below image.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-1872" src="http://techyaz.com/wp-content/uploads/2018/02/error233-1-min.png" alt="SQL Server Configuration Manager to check Protocols" width="792" height="273" srcset="https://techyaz.com/wp-content/uploads/2018/02/error233-1-min.png 792w, https://techyaz.com/wp-content/uploads/2018/02/error233-1-min-300x103.png 300w, https://techyaz.com/wp-content/uploads/2018/02/error233-1-min-768x265.png 768w" sizes="auto, (max-width: 792px) 100vw, 792px" /></p>
<p>Here we can see Shared Memory protocol is set as Enabled but Named Pipes is set as Disabled that should be enabled to make successful database connection. This was the main reason for getting this error. Keep reading this article to fix this issue in next section.</p>
<p>I have also written another aspect of SQL Server Error 233 in below article. You might get this error if your SQL Server Instance has exceeded the total number of user connections set in server configurations. Have a look at this article as well.</p>
<ul>
<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 SQL Server Error 233: User Connections Server Configuration option in SQL Server</a></strong></li>
</ul>
<h3><span style="color: #333399;">Solution</span></h3>
<p>We get error 233 ( SQL Server no process is on the other end of the pipe )because SQL Server client cannot connect to the server. This error could occur because the server is not configured to accept remote connections. To fix this issue, we will use the SQL Server Configuration Manager tool to allow SQL Server to accept remote connections. Here, in our case one of the protocol Named Pipe was disabled that’s why we were getting error. We will go ahead and fix this issue by enable the Named Pipe protocol. You might get this issue due to any protocol being disabled.</p>
<p>Make sure to enable Shared Memory, TCP/IP and Named Pipe protocols. Launch <strong>SQL Server Configuration Manager</strong>. Expand <strong>SQL Server Network Configuration</strong> from left side pane and click on <strong>Protocols for MSSQLSERVER</strong>. MSSQLSERVER is SQL Server Instance name. Now you will see all protocols in to right side pane. Right click on given protocols that is disabled and select <strong>Enable</strong> button to enable that protocols.</p>
<p>Named Pipe protocol was disabled in my case so I have launched <strong>Properties</strong> window of this protocol and selected Enabled option as <strong>Yes</strong> from dropdown as shown in below screenshot. Now click on Apply and Ok button to apply this change on SQL Server. It will ask you to restart the SQL Server service to apply these changes in to effect. <strong>Restart SQL Server services</strong> from SQL Server Configuration manager. Once services will come online, try to connect to your SQL Server instance, this time you will not face error 233 and you will be able to make successful database connection.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-1873" src="http://techyaz.com/wp-content/uploads/2018/02/error233-2-min.jpg" alt="Enable Named Pipe Protocol" width="592" height="536" srcset="https://techyaz.com/wp-content/uploads/2018/02/error233-2-min.jpg 592w, https://techyaz.com/wp-content/uploads/2018/02/error233-2-min-300x272.jpg 300w" sizes="auto, (max-width: 592px) 100vw, 592px" /></p>
<p>If you are still facing same issue ( no process is on the other end of the pipe )then you can also check “<strong><em>Allow Remote Connections</em></strong>” settings for this SQL Server instance. This setting must be enabled to connect to databases remotely. Connect to SQL Server Instance in SSMS locally on database server. Right click on <strong>SQL Server instance name</strong> in SSMS and choose <strong>Properties</strong>. You will get Server properties window. Click on <strong>Connections</strong> from left side pane and tick the check box on <strong>Allow remote connections to this server</strong> option from right side pane.</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><span style="color: #800000;"><em><strong>Read More Articles on SQL Server Connection Issues:</strong></em></span></p>
<ul>
<li><strong><a href="http://techyaz.com/sql-server/troubleshooting/fix-sql-network-interfaces-error-28-server-doesnt-support-requested-protocol/" target="_blank" rel="noopener">Fix SQL Server Network Interfaces Error 28: Server doesn&#8217;t support requested protocol</a></strong></li>
<li><strong><a href="http://techyaz.com/sql-server/troubleshooting/fix-error-40-network-related-instance-specific-error-occurred-establishing-connection/" target="_blank" rel="noopener">Error 40: A network-related or instance-specific error occurred while establishing a connection to SQL Server</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">Fix Error 53: Could not open a connection on SQL Server</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</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">Error 233: How to set the user connections server configuration option in SQL Server</a></strong></li>
</ul>
<p>The post <a href="https://techyaz.com/sql-server/troubleshooting/fix-error-233-no-process-end-pipe/">Fix SQL Server Error 233: No process is on the other end of the pipe</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-233-no-process-end-pipe/feed/</wfw:commentRss>
			<slash:comments>5</slash:comments>
		
		
			</item>
	</channel>
</rss>
