<?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 Administration - Techyaz.com</title>
	<atom:link href="https://techyaz.com/category/sql-server/sql-server-administration/feed/" rel="self" type="application/rss+xml" />
	<link></link>
	<description>Tips, Tutorials and How-to Topics</description>
	<lastBuildDate>Thu, 03 May 2018 11:32:36 +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 Administration - Techyaz.com</title>
	<link></link>
	<width>32</width>
	<height>32</height>
</image> 
	<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>Top 10 Performance Counters to Identify SQL Server Memory Pressure</title>
		<link>https://techyaz.com/sql-server/performance-tuning/top-10-performance-counters-to-identify-sql-server-memory-pressure/</link>
					<comments>https://techyaz.com/sql-server/performance-tuning/top-10-performance-counters-to-identify-sql-server-memory-pressure/#respond</comments>
		
		<dc:creator><![CDATA[Manvendra Deo Singh]]></dc:creator>
		<pubDate>Mon, 30 Apr 2018 11:52:11 +0000</pubDate>
				<category><![CDATA[Performance Tuning]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server Administration]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[Wait Types]]></category>
		<category><![CDATA[Memory Issues]]></category>
		<category><![CDATA[Perfmon Counters]]></category>
		<category><![CDATA[Perfmon Memory Counters]]></category>
		<category><![CDATA[performance tuning]]></category>
		<category><![CDATA[SQL_Server_Memory_Management]]></category>
		<guid isPermaLink="false">http://techyaz.com/?p=2196</guid>

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

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

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

					<description><![CDATA[<p>We get error 1101 because of space issues. Database engine doesn’t able to allocate new pages to the database because of insufficient disk space. The error details are given below: Error: 1101, Severity: 17, State: 2 Could not allocate a&#46;&#46;&#46;</p>
<p>The post <a href="https://techyaz.com/sql-server/troubleshooting/fix-error-1101-could-not-allocate-a-new-page-for-database/">Fix Error 1101: Could not allocate a new page for database</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>We get error 1101 because of space issues. Database engine doesn’t able to allocate new pages to the database because of insufficient disk space. The error details are given below:</p>
<p><em><span style="color: #ff0000;">Error: 1101, Severity: 17, State: 2</span></em><br />
<em><span style="color: #ff0000;"> Could not allocate a new page for database ‘DBNAME&#8217; because of insufficient disk space in filegroup &#8216;PRIMARY&#8217;. Create the necessary space by dropping objects in the filegroup, adding additional files to the filegroup, or setting autogrowth on for existing files in the filegroup.</span></em></p>
<p>There is another error 1105 that is also very much like above error code. Error 1105 can also be fixed using same solution given in this article.</p>
<h3><span style="color: #333399;">Error 1101 &#8211; Root Cause</span></h3>
<p>Main reason behind error 1101 or error 1105 is the insufficient disk space in filegroup/files. You might also get this error if your database drives are running out of space. There are multiple reasons that can cause this error to generate. Some of them are given below.</p>
<ul>
<li>You have restricted database maximum file size or put size limits for files.</li>
<li>Database file drives are running out of space.</li>
<li>Autogrowth is not enabled for database files.</li>
</ul>
<h3><span style="color: #333399;">Solutions</span></h3>
<p>To fix this issue we need to make space for database files to grow. Issue might vary depending on the nature of issue mentioned in above section. Sometimes, you might face this issue if maximum size for database files are restricted to some values so whenever database will grow to that point, SQL Server will not allow to allocate any page to that database. Sometimes you might get error 1101 because you don’t have any space on your database drives. Here, I will discuss each case individually and its solution to fix it.</p>
<h5><span style="color: #993300;">Unrestrict or Increase Database File Size Limits</span></h5>
<p>You might have enough space in your database drives but still you can get error 1101 because the maximum file size of database files is limited to some value and that causes not to grow your database beyond that size. You can unrestrict or increase the existing value of maximum file size to some bigger value. We have also an option to set database file size to unlimited size value that means database file will grow till the database file drive limit. Make sure to set appropriate autogrowth size for each database files.</p>
<p>You can set unlimited file size option or increase the value of maximum file size using GUI in SQL Server Management Studio or using ALTER statement.</p>
<ul>
<li>Connect to Database Instance in <strong>SQL Server Management Studio</strong>. Expand <strong>Database</strong> folder.</li>
<li>Right Click on your database and choose <strong>Property window</strong>.</li>
<li>Click on <strong>Files</strong> tab from left side pane in database property window.</li>
<li>Here you can see all database files. Now you can click on three dots given next of database files in “Autogrowth/Maxsize” column. You can see max size is set to a limited value as shown in below screenshot. I have chosen unlimited option and clicked on Ok button.</li>
</ul>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-1991 size-full" src="http://techyaz.com/wp-content/uploads/2018/03/1-SizeLimit-min.jpg" alt="Set Database file size to unlimited" width="394" height="314" srcset="https://techyaz.com/wp-content/uploads/2018/03/1-SizeLimit-min.jpg 394w, https://techyaz.com/wp-content/uploads/2018/03/1-SizeLimit-min-300x239.jpg 300w" sizes="auto, (max-width: 394px) 100vw, 394px" /></p>
<p>Now we will not get any issue if our database drive has enough space.</p>
<h5><span style="color: #993300;">Space in Database Drives</span></h5>
<p>Another possibility for this error is, there might be possibility that your drives on which you have placed your database files are running out of space. If this is the case then you have below 4 options.</p>
<ul>
<li>Add additional database file to different disk where there is enough space.</li>
<li>Move additional/unwanted files from your existing database drives.</li>
<li>Drop/Purge or Move unwanted data (table/indexes)</li>
<li>Add Additional Disk Space</li>
</ul>
<p>Immediate fix of this issue is to add new database file to another drive where you have enough space to run your transactions. You can use below command to add addition database file to another disk.</p>
<pre><strong><span style="color: #0000ff;">USE [master]</span></strong>
<strong><span style="color: #0000ff;">GO</span></strong>
<strong><span style="color: #0000ff;">ALTER DATABASE [DBNAME]</span></strong>
<strong><span style="color: #0000ff;">ADD FILE (NAME = N'NewFileName', FILENAME = N'F:\mssql\data\newdatafile.ndf', SIZE = 100096KB, FILEGROWTH = 10240KB)</span></strong>
<strong><span style="color: #0000ff;">TO FILEGROUP [SECONDARY]</span></strong>
<strong><span style="color: #0000ff;">GO</span></strong></pre>
<p>You can also add new database file in SQL Server Management Studio by launching Database Property Window. Select Files from left side pane and Click on “Add” button showing in below screenshot. Make sure to set autogrowth value carefully for any database file. Also it is recommended to enable IFI – Instant File Initialization to speed up autogrowth process for your databases. Refer to below article to get best value for autogrowth for your database files. You can also read what are the benefits and how to enable IFI &#8211; Instant File Initialization in below article.</p>
<ul>
<li><strong><a href="http://techyaz.com/sql-server/understanding-database-autogrowth-sql-server/" target="_blank" rel="noopener">What Should be the Best Value for database Autogrowth settings?</a></strong></li>
<li><strong><a href="http://techyaz.com/sql-server/instant-file-initialization-enable-on-sql-server-instance/" target="_blank" rel="noopener">How to Enable Instant File Initialization in SQL Server?</a></strong></li>
</ul>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-1993 size-full" src="http://techyaz.com/wp-content/uploads/2018/03/2-SizeLimit.jpg" alt="Add database file using GUI" width="705" height="633" srcset="https://techyaz.com/wp-content/uploads/2018/03/2-SizeLimit.jpg 705w, https://techyaz.com/wp-content/uploads/2018/03/2-SizeLimit-300x269.jpg 300w" sizes="auto, (max-width: 705px) 100vw, 705px" /></p>
<p>You can also have a look at the existing database drives whether there is any unwanted files or older backup files (*.bak) are not stored. Sometimes we run backups into database drives and forgot to delete or move them. Make sure to drop or move all unwanted files to some other location. Database drives should have only database files.</p>
<p>Final and long-term solution is the data purging. Identify the database objects that are not needed and then plan the data removal or data purging process to make space on your database.</p>
<p>We also have an option to extend the database drives as per the data growth. Make sure to plan this activity carefully before deploying it on production servers.</p>
<h5><span style="color: #993300;">Enable Autogrowth</span></h5>
<p>I have already written an article on Database autogrowth property setting. Read attached article to <a href="http://techyaz.com/sql-server/understanding-database-autogrowth-sql-server/" target="_blank" rel="noopener">find out best value for Autogrowth settings</a>.</p>
<p>You might get error 1101 if you have not enabled authogrowth setting for your database files. You need to enable it by launching database property window. You can click on three dots next to each database files in column “Authogrowth/Maxsize” and click at the enable authogrowth checkbox as showing in below screenshot.</p>
<p><img loading="lazy" decoding="async" class="size-full wp-image-1994 aligncenter" src="http://techyaz.com/wp-content/uploads/2018/03/3-Autogrowth-min.jpg" alt="Enable Autogrowth" width="701" height="631" srcset="https://techyaz.com/wp-content/uploads/2018/03/3-Autogrowth-min.jpg 701w, https://techyaz.com/wp-content/uploads/2018/03/3-Autogrowth-min-300x270.jpg 300w" sizes="auto, (max-width: 701px) 100vw, 701px" /></p>
<p>You can also use ALTER statement to enable database autogrowth setting for your database file. Remember, you need to run this ALTER statement for each database file separately.</p>
<p>Run below ALTER command to enable autogrowth for database file.</p>
<pre><span style="color: #008000;"><strong>--Pass logical filename of your database file for under NAME section.</strong></span>
<span style="color: #0000ff;"><strong>ALTER DATABASE [Techyaz] MODIFY FILE ( NAME = N'Techyaz_Data', FILEGROWTH = 10000KB )</strong></span></pre>
<p>Make sure to enable Instant File Initialization to speedup autogrowth operations. Links to enable Instant File Initialization is attached in this article.</p>
<p>If you are facing this issue for tempdb database then you can consider one more option apart from all of the above options. And this option is to restart SQL Server service if it&#8217;s allowed. Keep in mind, SQL Server service restart will cause an outage for few minutes but it will create new tempdb files with initial size and error 1101 will be disappeared. This is not recommended solution because of outage so you should work on long terms solutions.</p>
<p>You can also use above solutions to fix error 1105 that is very much similar to error 1101. 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-msg-5144-and-5145-for-long-or-failed-autogrow/" target="_blank" rel="noopener">Fix Error 5144 and Error 5145 for Long or Failed Autogrow of Database Files</a></strong></li>
<li><strong><a href="http://techyaz.com/sql-server/understanding-database-autogrowth-sql-server/" target="_blank" rel="noopener">Understanding Autogrowth Operation in SQL Server Databases</a></strong></li>
<li><strong><a href="http://techyaz.com/sql-server/instant-file-initialization-enable-on-sql-server-instance/" target="_blank" rel="noopener">How to Enable IFI &#8211; Instant File Initialization?</a></strong></li>
<li><strong><a href="http://techyaz.com/sql-server/troubleshooting/manage-transaction-log-file-during-data-load/" target="_blank" rel="noopener">Manage Database Files during huge Data Load</a></strong></li>
</ul>
<p>The post <a href="https://techyaz.com/sql-server/troubleshooting/fix-error-1101-could-not-allocate-a-new-page-for-database/">Fix Error 1101: Could not allocate a new page for database</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-1101-could-not-allocate-a-new-page-for-database/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>Manage Transaction Log File during Data Load</title>
		<link>https://techyaz.com/sql-server/troubleshooting/manage-transaction-log-file-during-data-load/</link>
					<comments>https://techyaz.com/sql-server/troubleshooting/manage-transaction-log-file-during-data-load/#respond</comments>
		
		<dc:creator><![CDATA[Ganesh Bekkinkeri]]></dc:creator>
		<pubDate>Mon, 15 Jan 2018 12:58:25 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server Administration]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[bulk data load]]></category>
		<category><![CDATA[data load]]></category>
		<category><![CDATA[transaction log]]></category>
		<guid isPermaLink="false">http://techyaz.com/?p=1487</guid>

					<description><![CDATA[<p>Have you even face that your transaction log file is growing exceptionally and you have to manage log file to make it in his size limit? Managing transaction log file is not an easy job if you have to run&#46;&#46;&#46;</p>
<p>The post <a href="https://techyaz.com/sql-server/troubleshooting/manage-transaction-log-file-during-data-load/">Manage Transaction Log File during Data Load</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Have you even face that your transaction log file is growing exceptionally and you have to manage log file to make it in his size limit? Managing transaction log file is not an easy job if you have to run huge data import. I was working on a migration project where we had to import huge set of data into SQL Server database. We had changed multiple configurational parameters to <a href="http://techyaz.com/sql-server/improve-sql-server-bulk-data-import-performance/" target="_blank" rel="noopener">speed up data migration</a> and set appropriate data and log file size before starting the migration. We observed that the log file was growing extensively during data load. Log file was almost 80% full and data load was still in progress. This was a potential risk that could have caused this import to fail. We had to manage transaction log file during data load to avoid this risk and make this import successful without any issue. We had options to add log file to the database or extend the log drive. I used <a href="http://techyaz.com/sql-server/sql-server-dmvs/4-different-usages-dbcc-sqlperf-sql-server/" target="_blank" rel="noopener">DBCC SQLPERF</a> command to get the log space usage statistics. Please have a look at the log space size of database <strong>TY1</strong> in last row.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-1493" src="http://techyaz.com/wp-content/uploads/2018/01/1-Check-Logspace-min.jpg" alt="Check Log File Size" width="447" height="293" srcset="https://techyaz.com/wp-content/uploads/2018/01/1-Check-Logspace-min.jpg 447w, https://techyaz.com/wp-content/uploads/2018/01/1-Check-Logspace-min-300x197.jpg 300w" sizes="auto, (max-width: 447px) 100vw, 447px" /></p>
<p>We had few options to overcome this issue. As we were running this database in simple recovery mode, so we didn’t have an option to run the <a href="http://techyaz.com/sql-server/understanding-sql-server-backups/" target="_blank" rel="noopener">Transaction Log backup</a>. We tried to <a href="http://techyaz.com/sql-server/troubleshooting/fix-error-3023-error-3013-error-3041/" target="_blank" rel="noopener">shrink the log file to manage transaction log file</a> but it was not allowing us to do so. This might be due to the data load execution was in process and active transaction.</p>
<p>Finally, we left out with two options; either extend the log drive or add a log file to the database on a drive that has enough space to accumulate the logs. Extending the existing drive was not possible because data load was in progress and we need to fix this issue without stopping the import/data load. So, we decided to go with another option that was to add a database log file to a drive that has enough space. I have given you step by step method to add a log file to a database in below section.</p>
<h4><span style="color: #333399;">Add Log File to a Database</span></h4>
<p>I will show you how to add log file to a database using T-SQL statements and using GUI in SQL Server Management Studio to manage transaction log file during data load. This way you can manage if your transaction log file is growing faster.</p>
<p><span style="color: #ff6600;"><em><strong>Using T-SQL Statement</strong></em></span></p>
<p>Open new query window and run below T-SQL statement to add a log file <strong>TY1_Log3.ldf</strong> to database <strong>TY1</strong> on F drive. Have a look at below T-SQL code to get other details like sizing and growth details.</p>
<pre><strong><span style="color: #008000;">--Replace your Database Name and file details in below T-SQL Code.</span>
<span style="color: #0000ff;">ALTER DATABASE [TY1]
ADD LOG FILE (NAME = 'TY1_Log3', FILENAME = 'F:\TY1_Log3.ldf', SIZE = 20080 MB, FILEGROWTH = 5024 MB)
GO
</span></strong></pre>
<p>Once you execute above T-SQL statement, your log file <strong>TY1_Log3.ldf</strong> will be added on <strong>F drive</strong> to the database <strong>TY1</strong>.</p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-1494 size-full" src="http://techyaz.com/wp-content/uploads/2018/01/2-Add-Log-File-T-SQL-min.jpg" alt="Add log file to database" width="781" height="172" srcset="https://techyaz.com/wp-content/uploads/2018/01/2-Add-Log-File-T-SQL-min.jpg 781w, https://techyaz.com/wp-content/uploads/2018/01/2-Add-Log-File-T-SQL-min-300x66.jpg 300w, https://techyaz.com/wp-content/uploads/2018/01/2-Add-Log-File-T-SQL-min-768x169.jpg 768w" sizes="auto, (max-width: 781px) 100vw, 781px" /></p>
<p>Remember, add the log file in a drive where you have enough space. If you will add log file to data file drive then you might face IO pressure because both data and log files will be on same drive so avoid to keep data and log file on same drive.</p>
<p><span style="color: #ff6600;"><em><strong>Using GUI in SSMS</strong></em></span></p>
<ol>
<li>Launch <strong>SQL Server Management Studio</strong> and connect to the instance of the <strong>SQL Server Database Engine</strong>. Expand <strong>Databases </strong>folder, right-click the database in which you have to add the log file, and then click <strong>Properties</strong>.</li>
<li>In the <strong>Database Properties </strong>dialog box, select the <strong>Files</strong> page from left side pane.</li>
<li>To add a transaction log file, click <strong>Add </strong>button from lower right side pane.</li>
<li>In the <strong>Database files </strong>grid, enter a logical name for the file. The file name must be unique within the database. Select the file type as <strong>log</strong>. Specify the initial size of the file. Set <strong>Autogrowth</strong> column as per your requirement.</li>
<li>Specify the path for the file location along with physical log file name. The specified path must exist before adding the file. Make sure that your drive has enough space to host this log file.</li>
<li>Click on OK button to create this add this log file to the database.</li>
</ol>
<p>Once you performed step 6, log file will be added to your database on your identified drive name. These exercises (adding log file to database) doesn&#8217;t require any downtime or it will not interrupt any existing transactions. This way you can manage transaction log file during data load if your transaction log file is growing faster.</p>
<p><span style="color: #800000;"><em><strong>Read More</strong></em></span></p>
<ul>
<li><a href="http://techyaz.com/sql-server/get-total-virtual-log-files/" target="_blank" rel="noopener">How to get Total no. of Virtual Log Files in a Transaction Log file?</a></li>
<li><a href="http://techyaz.com/sql-server/understanding-transaction-log-architecture/" target="_blank" rel="noopener">Understanding Transaction Log File Architecture</a></li>
<li><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></li>
<li><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></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> page and <a href="https://twitter.com/Tech_yaz">Twitter</a> handle to get latest updates.</p>
<p>The post <a href="https://techyaz.com/sql-server/troubleshooting/manage-transaction-log-file-during-data-load/">Manage Transaction Log File during Data Load</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://techyaz.com/sql-server/troubleshooting/manage-transaction-log-file-during-data-load/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
