<?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 2014 &#8211; Database Research &amp; Development</title>
	<atom:link href="https://www.dbrnd.com/tag/sql-server-2014/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.dbrnd.com</link>
	<description>BIGData &#124; NoSQL &#124; MSSQL &#124; MySQL &#124; PostgreSQL</description>
	<lastBuildDate>Wed, 28 Feb 2018 03:17:13 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0.4</generator>
	<item>
		<title>SQL Server 2016: Drop table operation failed on table because it is not supported operation on system-versioned temporal tables</title>
		<link>https://www.dbrnd.com/2018/03/sql-server-2016-drop-table-operation-failed-on-table-because-it-is-not-supported-operation-on-system-versioned-temporal-tables/</link>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Tue, 06 Mar 2018 16:16:09 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[dbrnd]]></category>
		<category><![CDATA[drop table]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server 2014]]></category>
		<category><![CDATA[SQL Server Administrator]]></category>
		<category><![CDATA[SQL Server Monitoring]]></category>
		<category><![CDATA[SQL Server Performance Tunning]]></category>
		<category><![CDATA[SQL Server Tips and Tricks]]></category>
		<category><![CDATA[System-versioned]]></category>
		<category><![CDATA[system-versioned temporal table]]></category>
		<category><![CDATA[TSQL]]></category>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=4272</guid>

					<description><![CDATA[In the previous post, I shared basic about SQL Server 2016 System-versioned temporal tables and how you can create it. In the previous post, I created a tbl_Studetns table and now for testing, I am going to drop it here. [crayon-6a9eb673b3b7e068415577/] But unfortunately, I got the below error. [crayon-6a9eb673b3b80598594307/] The reason is, it is a [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2018%2F03%2Fsql-server-2016-drop-table-operation-failed-on-table-because-it-is-not-supported-operation-on-system-versioned-temporal-tables%2F&amp;linkname=SQL%20Server%202016%3A%20Drop%20table%20operation%20failed%20on%20table%20because%20it%20is%20not%20supported%20operation%20on%20system-versioned%20temporal%20tables" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2018%2F03%2Fsql-server-2016-drop-table-operation-failed-on-table-because-it-is-not-supported-operation-on-system-versioned-temporal-tables%2F&amp;linkname=SQL%20Server%202016%3A%20Drop%20table%20operation%20failed%20on%20table%20because%20it%20is%20not%20supported%20operation%20on%20system-versioned%20temporal%20tables" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2018%2F03%2Fsql-server-2016-drop-table-operation-failed-on-table-because-it-is-not-supported-operation-on-system-versioned-temporal-tables%2F&amp;linkname=SQL%20Server%202016%3A%20Drop%20table%20operation%20failed%20on%20table%20because%20it%20is%20not%20supported%20operation%20on%20system-versioned%20temporal%20tables" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2018%2F03%2Fsql-server-2016-drop-table-operation-failed-on-table-because-it-is-not-supported-operation-on-system-versioned-temporal-tables%2F&amp;linkname=SQL%20Server%202016%3A%20Drop%20table%20operation%20failed%20on%20table%20because%20it%20is%20not%20supported%20operation%20on%20system-versioned%20temporal%20tables" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_reddit" href="https://www.addtoany.com/add_to/reddit?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2018%2F03%2Fsql-server-2016-drop-table-operation-failed-on-table-because-it-is-not-supported-operation-on-system-versioned-temporal-tables%2F&amp;linkname=SQL%20Server%202016%3A%20Drop%20table%20operation%20failed%20on%20table%20because%20it%20is%20not%20supported%20operation%20on%20system-versioned%20temporal%20tables" title="Reddit" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2018%2F03%2Fsql-server-2016-drop-table-operation-failed-on-table-because-it-is-not-supported-operation-on-system-versioned-temporal-tables%2F&amp;linkname=SQL%20Server%202016%3A%20Drop%20table%20operation%20failed%20on%20table%20because%20it%20is%20not%20supported%20operation%20on%20system-versioned%20temporal%20tables" title="Pocket" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.dbrnd.com%2F2018%2F03%2Fsql-server-2016-drop-table-operation-failed-on-table-because-it-is-not-supported-operation-on-system-versioned-temporal-tables%2F&#038;title=SQL%20Server%202016%3A%20Drop%20table%20operation%20failed%20on%20table%20because%20it%20is%20not%20supported%20operation%20on%20system-versioned%20temporal%20tables" data-a2a-url="https://www.dbrnd.com/2018/03/sql-server-2016-drop-table-operation-failed-on-table-because-it-is-not-supported-operation-on-system-versioned-temporal-tables/" data-a2a-title="SQL Server 2016: Drop table operation failed on table because it is not supported operation on system-versioned temporal tables"></a></p><p>In the previous post, I shared basic about SQL Server 2016 System-versioned temporal tables and how you can create it. </p>
<p>In the previous post, I created a tbl_Studetns table and now for testing, I am going to drop it here. </p>
<pre class="crayon-plain-tag">DROP TABLE tbl_Students
GO</pre> </p>
<p>But unfortunately, I got the below error.</p>
<pre class="crayon-plain-tag">Msg 13552, Level 16, State 1, Line 1
Drop table operation failed on table 'RND.dbo.tbl_Students' because it is not supported operation on system-versioned temporal tables.</pre> </p>
<p>The reason is, it is a system-versioned table and its dependent object is tbl_StudentsHistory table. </p>
<p>The solution is to disable system-versioned on that table by executing following statement.</p>
<pre class="crayon-plain-tag">ALTER TABLE dbo.tbl_Students SET (SYSTEM_VERSIONING = OFF)</pre> </p>
<p>Now, you can drop the tbl_Students table. </p>
<p><strong>Please note:</strong><br />
We disabled the System-versioned so it will not drop a tbl_StudentsHistory table. If you want to tbl_StudentsHistory, you can use drop command to drop it. </p>
<pre class="crayon-plain-tag">DROP TABLE tbl_StudentsHistory
GO</pre> </p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>SQL Server 2014: Buffer Pool Extension to improve I/O throughput and Query Cache</title>
		<link>https://www.dbrnd.com/2018/01/sql-server-2014-buffer-pool-extension-to-improve-cpu-io-throughput-and-query-cache/</link>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Mon, 15 Jan 2018 16:16:11 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[bpe file]]></category>
		<category><![CDATA[Buffer Pool Area]]></category>
		<category><![CDATA[buffer pool extension]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[dbrnd]]></category>
		<category><![CDATA[memory cache]]></category>
		<category><![CDATA[procedure cache]]></category>
		<category><![CDATA[Query Cache]]></category>
		<category><![CDATA[solid-state drive]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server 2014]]></category>
		<category><![CDATA[SQL Server Administrator]]></category>
		<category><![CDATA[SQL Server Buffer]]></category>
		<category><![CDATA[SQL Server Monitoring]]></category>
		<category><![CDATA[SQL Server Performance Tunning]]></category>
		<category><![CDATA[SQL Server Tips and Tricks]]></category>
		<category><![CDATA[SSD Drive]]></category>
		<category><![CDATA[TSQL]]></category>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=4266</guid>

					<description><![CDATA[<div><img width="679" height="452" src="https://www.dbrnd.com/wp-content/uploads/2017/12/SQL-RAM-Performance-679x452.jpg" class="attachment-post-image size-post-image wp-post-image" alt="SQL RAM Performance" decoding="async" fetchpriority="high" srcset="https://www.dbrnd.com/wp-content/uploads/2017/12/SQL-RAM-Performance-679x452.jpg 679w, https://www.dbrnd.com/wp-content/uploads/2017/12/SQL-RAM-Performance-850x566.jpg 850w, https://www.dbrnd.com/wp-content/uploads/2017/12/SQL-RAM-Performance.jpg 959w" sizes="(max-width: 679px) 100vw, 679px" /></div>SQL Server 2014 introduced Buffer Pool Extension to improve the performance of query cache which reduces the Disk I/O and increase the overall performance. This buffer pool area is a global resource shared by all databases, and it stores cache related information like frequently used data, frequently executed execution plans and pages information. The buffer [&#8230;]]]></description>
										<content:encoded><![CDATA[<div><img width="679" height="452" src="https://www.dbrnd.com/wp-content/uploads/2017/12/SQL-RAM-Performance-679x452.jpg" class="attachment-post-image size-post-image wp-post-image" alt="SQL RAM Performance" decoding="async" srcset="https://www.dbrnd.com/wp-content/uploads/2017/12/SQL-RAM-Performance-679x452.jpg 679w, https://www.dbrnd.com/wp-content/uploads/2017/12/SQL-RAM-Performance-850x566.jpg 850w, https://www.dbrnd.com/wp-content/uploads/2017/12/SQL-RAM-Performance.jpg 959w" sizes="(max-width: 679px) 100vw, 679px" /></div><p><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2018%2F01%2Fsql-server-2014-buffer-pool-extension-to-improve-cpu-io-throughput-and-query-cache%2F&amp;linkname=SQL%20Server%202014%3A%20Buffer%20Pool%20Extension%20to%20improve%20I%2FO%20throughput%20and%20Query%20Cache" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2018%2F01%2Fsql-server-2014-buffer-pool-extension-to-improve-cpu-io-throughput-and-query-cache%2F&amp;linkname=SQL%20Server%202014%3A%20Buffer%20Pool%20Extension%20to%20improve%20I%2FO%20throughput%20and%20Query%20Cache" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2018%2F01%2Fsql-server-2014-buffer-pool-extension-to-improve-cpu-io-throughput-and-query-cache%2F&amp;linkname=SQL%20Server%202014%3A%20Buffer%20Pool%20Extension%20to%20improve%20I%2FO%20throughput%20and%20Query%20Cache" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2018%2F01%2Fsql-server-2014-buffer-pool-extension-to-improve-cpu-io-throughput-and-query-cache%2F&amp;linkname=SQL%20Server%202014%3A%20Buffer%20Pool%20Extension%20to%20improve%20I%2FO%20throughput%20and%20Query%20Cache" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_reddit" href="https://www.addtoany.com/add_to/reddit?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2018%2F01%2Fsql-server-2014-buffer-pool-extension-to-improve-cpu-io-throughput-and-query-cache%2F&amp;linkname=SQL%20Server%202014%3A%20Buffer%20Pool%20Extension%20to%20improve%20I%2FO%20throughput%20and%20Query%20Cache" title="Reddit" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2018%2F01%2Fsql-server-2014-buffer-pool-extension-to-improve-cpu-io-throughput-and-query-cache%2F&amp;linkname=SQL%20Server%202014%3A%20Buffer%20Pool%20Extension%20to%20improve%20I%2FO%20throughput%20and%20Query%20Cache" title="Pocket" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.dbrnd.com%2F2018%2F01%2Fsql-server-2014-buffer-pool-extension-to-improve-cpu-io-throughput-and-query-cache%2F&#038;title=SQL%20Server%202014%3A%20Buffer%20Pool%20Extension%20to%20improve%20I%2FO%20throughput%20and%20Query%20Cache" data-a2a-url="https://www.dbrnd.com/2018/01/sql-server-2014-buffer-pool-extension-to-improve-cpu-io-throughput-and-query-cache/" data-a2a-title="SQL Server 2014: Buffer Pool Extension to improve I/O throughput and Query Cache"></a></p><p>SQL Server 2014 introduced Buffer Pool Extension to improve the performance of query cache which reduces the Disk I/O and increase the overall performance.</p>
<blockquote><p>This buffer pool area is a global resource shared by all databases, and it stores cache related information like frequently used data, frequently executed execution plans and pages information.<img decoding="async" class="alignright wp-image-4270 size-full" title="SQL Server Buffer Extension" src="https://www.dbrnd.com/wp-content/uploads/2017/01/SQLServerBufferExtension.png" alt="SQLServerBufferExtension" width="256" height="256" srcset="https://www.dbrnd.com/wp-content/uploads/2017/01/SQLServerBufferExtension.png 256w, https://www.dbrnd.com/wp-content/uploads/2017/01/SQLServerBufferExtension-150x150.png 150w" sizes="(max-width: 256px) 100vw, 256px" /></p></blockquote>
<blockquote><p>The buffer pool area is a kind of memory cache which holds the frequently used result and returns the result from it rather than needing to go back to disk to retrieve the results.</p>
<p>The buffer pool is limited by the max server memory configuration option and the total available RAM.</p></blockquote>
<p><strong>Now using the concept of Buffer Pool Extension,</strong></p>
<blockquote><p>You can configure additional SSD disk to work as other buffer pool area. It doesn&#8217;t mean that you are increasing the RAM.</p>
<p>Why SSD (solid-state drive), because of it ten times faster than regular disk.</p>
<p>You should add SSD as buffer pool extension because with normal disk you will not get expected performance of the buffer pool.</p></blockquote>
<p><strong>What you should do?</strong></p>
<blockquote><p>Attached one SSD drive to the server and alter the server configuration parameter by adding the .bpe file. This BPE (Buffer Pool Extension) file works as an additional buffer pool area.</p></blockquote>
<blockquote><p>You just give to correct folder path of your SSD drive with .bpe filename and size, it automatically creates .bpe file with specified size.</p></blockquote>
<p><strong>Enable Buffer Pool Extenstion:</strong><br />
<pre class="crayon-plain-tag">USE master 
GO
ALTER SERVER CONFIGURATION 
SET BUFFER POOL EXTENSION ON
(FILENAME = 'F:\SQLData\SQL2014_dbrnd.BPE', SIZE = 30 GB);
GO</pre>
<p><strong>Disable Buffer Pool Extension:</strong><br />
<pre class="crayon-plain-tag">USE master 
GO
ALTER SERVER CONFIGURATION 
SET BUFFER POOL EXTENSION OFF;</pre>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>SQL Server 2014: sys.column_store_row_groups to find information on Columnstore row groups</title>
		<link>https://www.dbrnd.com/2018/01/sql-server-2014-sys-column_store_row_groups-to-find-information-on-columnstore-row-groups-fragmentation/</link>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Wed, 10 Jan 2018 16:16:25 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server DBA Script]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[Columnstore Index]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[dbrnd]]></category>
		<category><![CDATA[fragmentation]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server 2014]]></category>
		<category><![CDATA[SQL Server Administrator]]></category>
		<category><![CDATA[SQL Server Monitoring]]></category>
		<category><![CDATA[SQL Server Performance Tunning]]></category>
		<category><![CDATA[SQL Server Tips and Tricks]]></category>
		<category><![CDATA[sys.column_store_row_groups]]></category>
		<category><![CDATA[TSQL]]></category>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=4216</guid>

					<description><![CDATA[SQL Server 2014 introduced sys.column_store_row_groups system view for finding the information on the Columnstore row groups. Using this system view, you can find information like total number of rows physically stored, and a column for the number of rows marked as deleted. If you find a high volume of deleted rows, you should decide to [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2018%2F01%2Fsql-server-2014-sys-column_store_row_groups-to-find-information-on-columnstore-row-groups-fragmentation%2F&amp;linkname=SQL%20Server%202014%3A%20sys.column_store_row_groups%20to%20find%20information%20on%20Columnstore%20row%20groups" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2018%2F01%2Fsql-server-2014-sys-column_store_row_groups-to-find-information-on-columnstore-row-groups-fragmentation%2F&amp;linkname=SQL%20Server%202014%3A%20sys.column_store_row_groups%20to%20find%20information%20on%20Columnstore%20row%20groups" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2018%2F01%2Fsql-server-2014-sys-column_store_row_groups-to-find-information-on-columnstore-row-groups-fragmentation%2F&amp;linkname=SQL%20Server%202014%3A%20sys.column_store_row_groups%20to%20find%20information%20on%20Columnstore%20row%20groups" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2018%2F01%2Fsql-server-2014-sys-column_store_row_groups-to-find-information-on-columnstore-row-groups-fragmentation%2F&amp;linkname=SQL%20Server%202014%3A%20sys.column_store_row_groups%20to%20find%20information%20on%20Columnstore%20row%20groups" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_reddit" href="https://www.addtoany.com/add_to/reddit?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2018%2F01%2Fsql-server-2014-sys-column_store_row_groups-to-find-information-on-columnstore-row-groups-fragmentation%2F&amp;linkname=SQL%20Server%202014%3A%20sys.column_store_row_groups%20to%20find%20information%20on%20Columnstore%20row%20groups" title="Reddit" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2018%2F01%2Fsql-server-2014-sys-column_store_row_groups-to-find-information-on-columnstore-row-groups-fragmentation%2F&amp;linkname=SQL%20Server%202014%3A%20sys.column_store_row_groups%20to%20find%20information%20on%20Columnstore%20row%20groups" title="Pocket" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.dbrnd.com%2F2018%2F01%2Fsql-server-2014-sys-column_store_row_groups-to-find-information-on-columnstore-row-groups-fragmentation%2F&#038;title=SQL%20Server%202014%3A%20sys.column_store_row_groups%20to%20find%20information%20on%20Columnstore%20row%20groups" data-a2a-url="https://www.dbrnd.com/2018/01/sql-server-2014-sys-column_store_row_groups-to-find-information-on-columnstore-row-groups-fragmentation/" data-a2a-title="SQL Server 2014: sys.column_store_row_groups to find information on Columnstore row groups"></a></p><p>SQL Server 2014 introduced sys.column_store_row_groups system view for finding the information on the Columnstore row groups.</p>
<blockquote><p>Using this system view, you can find information like total number of rows physically stored, and a column for the number of rows marked as deleted.</p></blockquote>
<blockquote><p>If you find a high volume of deleted rows, you should decide to rebuild it. </p></blockquote>
<p><strong>T-SQL Script:</strong></p>
<pre class="crayon-plain-tag">SELECT
	OBJECT_NAME([csrg].[object_id]) AS TableName
	,[i].[name] AS IndexName
	,[csrg].[row_group_id]
	,[csrg].[delta_store_hobt_id]
	,[csrg].[state_description]
	,[csrg].[total_rows]
	,[csrg].[deleted_rows]
	,[csrg].[size_in_bytes]
FROM sys.column_store_row_groups AS csrg
LEFT OUTER JOIN sys.indexes AS i
	ON [csrg].[object_id] = [i].[object_id]
		AND [csrg].[index_id] = [i].[index_id]
ORDER BY [TableName],[IndexName]
GO</pre> </p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>SQL Server 2016: Columnstore Index on Memory Optimized In Memory OLTP Tables</title>
		<link>https://www.dbrnd.com/2018/01/sql-server-2016-columnstore-index-on-memory-optimized-in-memory-oltp-tables/</link>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Sun, 07 Jan 2018 16:16:46 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[column store index]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[dbrnd]]></category>
		<category><![CDATA[Hekaton]]></category>
		<category><![CDATA[In-Memory Database]]></category>
		<category><![CDATA[memory database]]></category>
		<category><![CDATA[Memory Optimized Table]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server 2014]]></category>
		<category><![CDATA[SQL Server 2016]]></category>
		<category><![CDATA[SQL Server Administrator]]></category>
		<category><![CDATA[SQL Server Monitoring]]></category>
		<category><![CDATA[SQL Server Performance Tunning]]></category>
		<category><![CDATA[SQL Server Tips and Tricks]]></category>
		<category><![CDATA[TSQL]]></category>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=4201</guid>

					<description><![CDATA[<div><img width="675" height="400" src="https://www.dbrnd.com/wp-content/uploads/2017/12/SQLRam.jpg" class="attachment-post-image size-post-image wp-post-image" alt="SQLRam" decoding="async" loading="lazy" /></div>Microsoft SQL Server 2016 comes with a variety of new additions and I am happy for exploring the new features of SQL Server 2016. Microsoft SQL Server 2014 introduced Hekaton engine which used for In-Memory Database objects. SQL Server 2014: Create Memory Optimized File Group and Table SQL Server 2016 introduced Columnstore index for Memory-Optimized [&#8230;]]]></description>
										<content:encoded><![CDATA[<div><img width="675" height="400" src="https://www.dbrnd.com/wp-content/uploads/2017/12/SQLRam.jpg" class="attachment-post-image size-post-image wp-post-image" alt="SQLRam" decoding="async" loading="lazy" /></div><p><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2018%2F01%2Fsql-server-2016-columnstore-index-on-memory-optimized-in-memory-oltp-tables%2F&amp;linkname=SQL%20Server%202016%3A%20Columnstore%20Index%20on%20Memory%20Optimized%20In%20Memory%20OLTP%20Tables" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2018%2F01%2Fsql-server-2016-columnstore-index-on-memory-optimized-in-memory-oltp-tables%2F&amp;linkname=SQL%20Server%202016%3A%20Columnstore%20Index%20on%20Memory%20Optimized%20In%20Memory%20OLTP%20Tables" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2018%2F01%2Fsql-server-2016-columnstore-index-on-memory-optimized-in-memory-oltp-tables%2F&amp;linkname=SQL%20Server%202016%3A%20Columnstore%20Index%20on%20Memory%20Optimized%20In%20Memory%20OLTP%20Tables" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2018%2F01%2Fsql-server-2016-columnstore-index-on-memory-optimized-in-memory-oltp-tables%2F&amp;linkname=SQL%20Server%202016%3A%20Columnstore%20Index%20on%20Memory%20Optimized%20In%20Memory%20OLTP%20Tables" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_reddit" href="https://www.addtoany.com/add_to/reddit?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2018%2F01%2Fsql-server-2016-columnstore-index-on-memory-optimized-in-memory-oltp-tables%2F&amp;linkname=SQL%20Server%202016%3A%20Columnstore%20Index%20on%20Memory%20Optimized%20In%20Memory%20OLTP%20Tables" title="Reddit" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2018%2F01%2Fsql-server-2016-columnstore-index-on-memory-optimized-in-memory-oltp-tables%2F&amp;linkname=SQL%20Server%202016%3A%20Columnstore%20Index%20on%20Memory%20Optimized%20In%20Memory%20OLTP%20Tables" title="Pocket" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.dbrnd.com%2F2018%2F01%2Fsql-server-2016-columnstore-index-on-memory-optimized-in-memory-oltp-tables%2F&#038;title=SQL%20Server%202016%3A%20Columnstore%20Index%20on%20Memory%20Optimized%20In%20Memory%20OLTP%20Tables" data-a2a-url="https://www.dbrnd.com/2018/01/sql-server-2016-columnstore-index-on-memory-optimized-in-memory-oltp-tables/" data-a2a-title="SQL Server 2016: Columnstore Index on Memory Optimized In Memory OLTP Tables"></a></p><p>Microsoft SQL Server 2016 comes with a variety of new additions and I am happy for exploring the new features of SQL Server 2016.</p>
<p>Microsoft SQL Server 2014 introduced Hekaton engine which used for In-Memory Database objects.</p>
<blockquote class="wp-embedded-content" data-secret="dA5hDdDtd2"><p><a href="https://www.dbrnd.com/2016/01/sql-server-2014-create-memory-optimized-file-group-and-table/">SQL Server 2014: Create Memory Optimized File Group and Table</a></p></blockquote>
<p><iframe loading="lazy" class="wp-embedded-content" sandbox="allow-scripts" security="restricted"  src="https://www.dbrnd.com/2016/01/sql-server-2014-create-memory-optimized-file-group-and-table/embed/#?secret=dA5hDdDtd2" data-secret="dA5hDdDtd2" width="600" height="338" title="&#8220;SQL Server 2014: Create Memory Optimized File Group and Table&#8221; &#8212; Database Research &amp; Development" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe></p>
<blockquote><p>SQL Server 2016 introduced Columnstore index for Memory-Optimized Table which was not possible previously.<br />
If you are planning to store large amount of data In Memory, you can apply Columnstore Index on that In Memory OLTP Table.</p></blockquote>
<blockquote><p>It comes with one condition: you can not apply Columnstore Index on the particular column. It must apply to all the columns of In-Memory Table.</p></blockquote>
<p><strong>Small demonstration with all the possible errors:</strong></p>
<p><strong>Create a sample memory optimized table with column store index:</strong></p>
<pre class="crayon-plain-tag">CREATE TABLE tbl_Employees
(
	EmpID INT
	,EmpName VARCHAR(50)
	,EmpSalary INT
	,EmpDOJ DATETIME
	,INDEX idx_tbl_Employees_columnstore CLUSTERED COLUMNSTORE 
)
WITH (MEMORY_OPTIMIZED = ON)
GO</pre> </p>
<p><strong>You will get a below error:</strong></p>
<pre class="crayon-plain-tag">Msg 41321, Level 16, State 7, Line 1
The memory optimized table 'tbl_Employees' with DURABILITY=SCHEMA_AND_DATA must have a primary key.</pre> </p>
<p><strong>Add primary key on script and execute it:</strong></p>
<pre class="crayon-plain-tag">CREATE TABLE tbl_Employees
(
	EmpID INT PRIMARY KEY
	,EmpName VARCHAR(50)
	,EmpSalary INT
	,EmpDOJ DATETIME
	,INDEX idx_tbl_Employees_columnstore CLUSTERED COLUMNSTORE 
)
WITH (MEMORY_OPTIMIZED = ON)
GO</pre> </p>
<p><strong>You will get a below error:</strong></p>
<pre class="crayon-plain-tag">Msg 12317, Level 16, State 78, Line 3
Clustered indexes, which are the default for primary keys, are not supported with memory optimized tables. Specify a NONCLUSTERED index instead.</pre> </p>
<p><strong>Apply Non Clustered Primary key and execute it:</strong></p>
<pre class="crayon-plain-tag">CREATE TABLE tbl_Employees
(
	EmpID INT PRIMARY KEY NONCLUSTERED
	,EmpName VARCHAR(50)
	,EmpSalary INT
	,EmpDOJ DATETIME
	,INDEX idx_tbl_Employees_columnstore CLUSTERED COLUMNSTORE 
)
WITH (MEMORY_OPTIMIZED = ON)
GO</pre> </p>
<p><strong>If you have not created Memory Optimized File group and related files, you may get a below error:</strong></p>
<pre class="crayon-plain-tag">Msg 41337, Level 16, State 100, Line 1
Cannot create memory optimized tables. To create memory optimized tables, the database must have a MEMORY_OPTIMIZED_FILEGROUP that is online and has at least one container.</pre> </p>
<p><strong>Create memory optimized file group and data files:<br />
</strong></p><pre class="crayon-plain-tag">USE [master]
GO
ALTER DATABASE [Database_Name] 
ADD FILEGROUP [Memory_Optimized] CONTAINS MEMORY_OPTIMIZED_DATA 
GO
ALTER DATABASE [Database_Name] 
ADD FILE ( NAME = N'HekatonMemory', FILENAME = N'C:\Hekaton\hek.mdf' ) 
TO FILEGROUP [Memory_Optimized]
GO</pre><p> </p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>SQL Server 2014: Introduced DBCC CLONEDATABASE TO generate only Schema and Statistics</title>
		<link>https://www.dbrnd.com/2018/01/sql-server-2014-introduced-dbcc-clonedatabase-to-generate-only-schema-statistics-query-store/</link>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Tue, 02 Jan 2018 16:16:21 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[dbcc]]></category>
		<category><![CDATA[DBCC CLONEDATABASE]]></category>
		<category><![CDATA[dbrnd]]></category>
		<category><![CDATA[Query Store]]></category>
		<category><![CDATA[schema]]></category>
		<category><![CDATA[SNAPSHOT]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server 2014]]></category>
		<category><![CDATA[SQL Server 2016]]></category>
		<category><![CDATA[SQL Server Administrator]]></category>
		<category><![CDATA[SQL Server Monitoring]]></category>
		<category><![CDATA[SQL Server Performance Tunning]]></category>
		<category><![CDATA[SQL Server Tips and Tricks]]></category>
		<category><![CDATA[Statistics]]></category>
		<category><![CDATA[TSQL]]></category>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=4139</guid>

					<description><![CDATA[<div><img width="452" height="336" src="https://www.dbrnd.com/wp-content/uploads/2018/01/SQL-Server-Clone-Database.jpg" class="attachment-post-image size-post-image wp-post-image" alt="SQL Server Clone Database" decoding="async" loading="lazy" /></div>SQL Server 2014 introduced DBCC CLONEDATABASE for creating a blank database with only Schema and Statistics. SQL Server 2016 added support of the Query Store in DBCC CLONEDATABASE. This feature is very helpful in certain conditions. For example, Your production database size is around 800 GB, and You faced some performance related issues because the [&#8230;]]]></description>
										<content:encoded><![CDATA[<div><img width="452" height="336" src="https://www.dbrnd.com/wp-content/uploads/2018/01/SQL-Server-Clone-Database.jpg" class="attachment-post-image size-post-image wp-post-image" alt="SQL Server Clone Database" decoding="async" loading="lazy" /></div><p><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2018%2F01%2Fsql-server-2014-introduced-dbcc-clonedatabase-to-generate-only-schema-statistics-query-store%2F&amp;linkname=SQL%20Server%202014%3A%20Introduced%20DBCC%20CLONEDATABASE%20TO%20generate%20only%20Schema%20and%20Statistics" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2018%2F01%2Fsql-server-2014-introduced-dbcc-clonedatabase-to-generate-only-schema-statistics-query-store%2F&amp;linkname=SQL%20Server%202014%3A%20Introduced%20DBCC%20CLONEDATABASE%20TO%20generate%20only%20Schema%20and%20Statistics" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2018%2F01%2Fsql-server-2014-introduced-dbcc-clonedatabase-to-generate-only-schema-statistics-query-store%2F&amp;linkname=SQL%20Server%202014%3A%20Introduced%20DBCC%20CLONEDATABASE%20TO%20generate%20only%20Schema%20and%20Statistics" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2018%2F01%2Fsql-server-2014-introduced-dbcc-clonedatabase-to-generate-only-schema-statistics-query-store%2F&amp;linkname=SQL%20Server%202014%3A%20Introduced%20DBCC%20CLONEDATABASE%20TO%20generate%20only%20Schema%20and%20Statistics" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_reddit" href="https://www.addtoany.com/add_to/reddit?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2018%2F01%2Fsql-server-2014-introduced-dbcc-clonedatabase-to-generate-only-schema-statistics-query-store%2F&amp;linkname=SQL%20Server%202014%3A%20Introduced%20DBCC%20CLONEDATABASE%20TO%20generate%20only%20Schema%20and%20Statistics" title="Reddit" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2018%2F01%2Fsql-server-2014-introduced-dbcc-clonedatabase-to-generate-only-schema-statistics-query-store%2F&amp;linkname=SQL%20Server%202014%3A%20Introduced%20DBCC%20CLONEDATABASE%20TO%20generate%20only%20Schema%20and%20Statistics" title="Pocket" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.dbrnd.com%2F2018%2F01%2Fsql-server-2014-introduced-dbcc-clonedatabase-to-generate-only-schema-statistics-query-store%2F&#038;title=SQL%20Server%202014%3A%20Introduced%20DBCC%20CLONEDATABASE%20TO%20generate%20only%20Schema%20and%20Statistics" data-a2a-url="https://www.dbrnd.com/2018/01/sql-server-2014-introduced-dbcc-clonedatabase-to-generate-only-schema-statistics-query-store/" data-a2a-title="SQL Server 2014: Introduced DBCC CLONEDATABASE TO generate only Schema and Statistics"></a></p><p><em>SQL Server 2014 introduced DBCC CLONEDATABASE for creating a blank database with only Schema and Statistics.</p>
<p>SQL Server 2016 added support of the Query Store in DBCC CLONEDATABASE.</em></p>
<blockquote><p>
This feature is very helpful in certain conditions.<br />
For example, Your production database size is around 800 GB, and You faced some performance related issues because the problem of outdated Statistics or Indexes issue.</p></blockquote>
<blockquote><p>Now the situation is, you can do a test and trial in your Production Database, so DBA takes a copy of Production Database and restore it in different server for further investigation.</p></blockquote>
<blockquote><p>Do you think, this is the only one solution because Its require additional time and infrastructure.</p></blockquote>
<blockquote><p>In this kind of situation, you can use the DBCC CLONEDATABASE feature of SQL Server 2014.</p></blockquote>
<blockquote><p>It creates a blank database copy with the only Schema, Statistics and Query Store information. It is not copying the data, so it does not require any additional space.</p></blockquote>
<blockquote><p>You can find the same statistical information in the new clone database which generates the same execution plan for your investigation.</p>
<p>A Query Execution Plan is prepared to base on Database Statistics so If Database Statistics are same then you check your query execution plan without data.</p></blockquote>
<p>Once you are finished with your task with Clone Database, you can delete it.</p>
<p><strong>How internally SQL Server creates a Clone Database?</strong></p>
<blockquote><p>It validates the source database and acquires the shared lock on the source database</p>
<p>	It creates a snapshot of the source database (Include only: Schema, Statistics, Query Store)</p>
<p>	Create Clone Database and acquires an exclusive lock on it</p>
<p>	Copy the metadata, schema, statistics, query store information from the source database to clone database</p>
<p>	Release all locks from Clone Database</p></blockquote>
<p><strong>How to create a Clone Database?</strong></p>
<p>Use DBCC CLONEDATABASE command to create a Clone Database.<br />
<pre class="crayon-plain-tag">DBCC CLONEDATABASE (MyDatabase,MyDatabase_Clone);</pre>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>SQL Server 2014: WAIT_AT_LOW_PRIORITY improved the performance of ONLINE REBUILD INDEX operation</title>
		<link>https://www.dbrnd.com/2017/11/sql-server-2014-wait_at_low_priority-improved-the-performance-of-online-rebuild-index-operation/</link>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Sun, 12 Nov 2017 16:16:59 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[BLOCKER]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[dbrnd]]></category>
		<category><![CDATA[index]]></category>
		<category><![CDATA[MAX_DURATION]]></category>
		<category><![CDATA[REBUILD]]></category>
		<category><![CDATA[Rebuild Index]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server 2014]]></category>
		<category><![CDATA[SQL Server Administrator]]></category>
		<category><![CDATA[SQL Server Error]]></category>
		<category><![CDATA[SQL Server Monitoring]]></category>
		<category><![CDATA[SQL Server Performance Tuning]]></category>
		<category><![CDATA[SQL Server Programming]]></category>
		<category><![CDATA[SQL Server Tips and Tricks]]></category>
		<category><![CDATA[TSQL]]></category>
		<category><![CDATA[WAIT_AT_LOW_PRIORITY]]></category>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=6113</guid>

					<description><![CDATA[SQL Server 2014 introduced WAIT_AT_LOW_PRIORITY option which enhanced the performance of ONLINE REBUILD INDEX. In the previous version of SQL Server, REBUILD INDEX had to wait for the running transaction. But now in SQL Server 2014, you can give options like MAX_DURATION in minutes, ABORT_AFTER_WAIT with different options. For ABORT_AFTER_WAIT, took the reference from Microsoft: [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F11%2Fsql-server-2014-wait_at_low_priority-improved-the-performance-of-online-rebuild-index-operation%2F&amp;linkname=SQL%20Server%202014%3A%20WAIT_AT_LOW_PRIORITY%20improved%20the%20performance%20of%20ONLINE%20REBUILD%20INDEX%20operation" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F11%2Fsql-server-2014-wait_at_low_priority-improved-the-performance-of-online-rebuild-index-operation%2F&amp;linkname=SQL%20Server%202014%3A%20WAIT_AT_LOW_PRIORITY%20improved%20the%20performance%20of%20ONLINE%20REBUILD%20INDEX%20operation" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F11%2Fsql-server-2014-wait_at_low_priority-improved-the-performance-of-online-rebuild-index-operation%2F&amp;linkname=SQL%20Server%202014%3A%20WAIT_AT_LOW_PRIORITY%20improved%20the%20performance%20of%20ONLINE%20REBUILD%20INDEX%20operation" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F11%2Fsql-server-2014-wait_at_low_priority-improved-the-performance-of-online-rebuild-index-operation%2F&amp;linkname=SQL%20Server%202014%3A%20WAIT_AT_LOW_PRIORITY%20improved%20the%20performance%20of%20ONLINE%20REBUILD%20INDEX%20operation" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_reddit" href="https://www.addtoany.com/add_to/reddit?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F11%2Fsql-server-2014-wait_at_low_priority-improved-the-performance-of-online-rebuild-index-operation%2F&amp;linkname=SQL%20Server%202014%3A%20WAIT_AT_LOW_PRIORITY%20improved%20the%20performance%20of%20ONLINE%20REBUILD%20INDEX%20operation" title="Reddit" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F11%2Fsql-server-2014-wait_at_low_priority-improved-the-performance-of-online-rebuild-index-operation%2F&amp;linkname=SQL%20Server%202014%3A%20WAIT_AT_LOW_PRIORITY%20improved%20the%20performance%20of%20ONLINE%20REBUILD%20INDEX%20operation" title="Pocket" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F11%2Fsql-server-2014-wait_at_low_priority-improved-the-performance-of-online-rebuild-index-operation%2F&#038;title=SQL%20Server%202014%3A%20WAIT_AT_LOW_PRIORITY%20improved%20the%20performance%20of%20ONLINE%20REBUILD%20INDEX%20operation" data-a2a-url="https://www.dbrnd.com/2017/11/sql-server-2014-wait_at_low_priority-improved-the-performance-of-online-rebuild-index-operation/" data-a2a-title="SQL Server 2014: WAIT_AT_LOW_PRIORITY improved the performance of ONLINE REBUILD INDEX operation"></a></p><p>SQL Server 2014 introduced WAIT_AT_LOW_PRIORITY option which enhanced the performance of ONLINE REBUILD INDEX.</p>
<blockquote><p>In the previous version of SQL Server, REBUILD INDEX had to wait for the running transaction.<br />
But now in SQL Server 2014, you can give options like MAX_DURATION in minutes, ABORT_AFTER_WAIT with different options.</p></blockquote>
<p><a href="https://docs.microsoft.com/en-us/sql/t-sql/statements/alter-index-transact-sql" target="_blank" rel="noopener noreferrer">For ABORT_AFTER_WAIT, took the reference from Microsoft:</a></p><pre class="crayon-plain-tag">ABORT_AFTER_WAIT = [NONE | SELF | BLOCKERS]</pre><p>
<strong>NONE:</strong> Continue waiting for the lock with normal (regular) priority.</p>
<p><strong>SELF:</strong> Exit the online index rebuild DDL operation currently being executed without taking any action.</p>
<p><strong>BLOCKERS:</strong> Kill all user transactions that block the online index rebuild DDL operation so that the operation can continue. The BLOCKERS option requires the login to have ALTER ANY CONNECTION permission.</p>
<p><strong>Please check the below demonstration, where I am comparing old and new approach of REBUILD INDEX:</strong></p>
<p><strong>Create a sample table:</strong></p><pre class="crayon-plain-tag">CREATE TABLE tbl_DumpData
(
	ID INT 
	,RandomID VARCHAR(MAX)
	,CONSTRAINT pk_tbl_DumpData_ID PRIMARY KEY(ID)
)
GO</pre><p>
<p><strong>Insert dummy data:</strong></p><pre class="crayon-plain-tag">;WITH CTE AS
(
	SELECT 1 ID
	UNION all
	SELECT ID + 1
	FROM CTE   
	WHERE ID + 1 &lt;= 100000
)
INSERT INTO tbl_DumpData(ID,RandomID)
SELECT 
	ID
	,NEWID() AS RandomID
FROM CTE 
OPTION (MAXRECURSION 0)
GO</pre><p>
<p><strong>Open new session/query window, execute below update:</strong></p><pre class="crayon-plain-tag">BEGIN TRANSACTION
UPDATE tbl_DumpData SET RandomID = 39840972340234 WHERE ID = 8</pre><p>
<p><strong>Jump to old session window, and execute below REBUILD:</strong><br />
<em>It is Running&#8230; Running&#8230; Running&#8230;, because table is locked by another transaction</em></p><pre class="crayon-plain-tag">ALTER INDEX pk_tbl_DumpData_ID ON tbl_DumpData REBUILD
WITH
(
   ONLINE = ON
)
GO</pre><p>
<p><strong>Check the lock table:</strong><br />
You can find that your REBUILD query is in WAIT mode.</p><pre class="crayon-plain-tag">SELECT *FROM sys.dm_tran_locks</pre><p>
<img loading="lazy" decoding="async" class="alignnone size-full wp-image-6115" src="https://www.dbrnd.com/wp-content/uploads/2017/09/SQLIndexLock.png" alt="SQL Index Lock" width="740" height="136" srcset="https://www.dbrnd.com/wp-content/uploads/2017/09/SQLIndexLock.png 740w, https://www.dbrnd.com/wp-content/uploads/2017/09/SQLIndexLock-679x125.png 679w" sizes="auto, (max-width: 740px) 100vw, 740px" /></p>
<p><strong>Now stop the execution of the previous REBUILD, and execute below REBUILD WITH WAIT_AT_LOW_PRIORITY:</strong><br />
Set MAX_DURATION for one minute and ABORT_AFTER_WAIT type is SELF.<br />
<pre class="crayon-plain-tag">ALTER INDEX pk_tbl_DumpData_ID ON tbl_DumpData REBUILD
WITH
(
   ONLINE = ON
   (
	WAIT_AT_LOW_PRIORITY 
	(
		MAX_DURATION = 1
		,ABORT_AFTER_WAIT = SELF
	)
   )
)
GO</pre>
<p><strong>Above REBUILD will wait for One minute and then it will throw an error message:</strong><br />
<pre class="crayon-plain-tag">Msg 1222, Level 16, State 56, Line 1
Lock request time out period exceeded.</pre>
<p><strong>Now, test with BLOCKER option:</strong><br />
It will wait for one minute, and then it will kill the open UPDATE transaction to finish the REBUILD operation.<br />
<pre class="crayon-plain-tag">ALTER INDEX pk_tbl_DumpData_ID ON tbl_DumpData REBUILD
WITH
(
   ONLINE = ON
   (
	WAIT_AT_LOW_PRIORITY 
	(
		MAX_DURATION = 1
		,ABORT_AFTER_WAIT = BLOCKERS 
	)
   )
)
GO</pre>
<p><strong>Now, go to another transaction where UPDATE transaction was there:</strong><br />
Try to execute any query, you will get below error message because this session is terminated by REBUILD + BLOCKERS.<br />
<pre class="crayon-plain-tag">SELECT *FROM tbl_DumpData</pre>
<p><strong>Error:</strong><br />
<pre class="crayon-plain-tag">Msg 0, Level 20, State 0, Line 0
The connection is broken and recovery is not possible.  The connection is marked by the server as unrecoverable.  No attempt was made to restore the connection.</pre>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>SQL Server 2016: Create a FOREIGN KEY in Memory optimized Table (In-Memory OLTP)</title>
		<link>https://www.dbrnd.com/2017/02/sql-server-2016-create-a-foreign-key-in-memory-optimized-table-in-memory-oltp/</link>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Thu, 23 Feb 2017 16:16:23 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[dbrnd]]></category>
		<category><![CDATA[foreign key]]></category>
		<category><![CDATA[Hekaton]]></category>
		<category><![CDATA[In-Memory OLTP]]></category>
		<category><![CDATA[Memory Optimized Table]]></category>
		<category><![CDATA[MEMORY_OPTIMIZED_DATA]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server 2014]]></category>
		<category><![CDATA[SQL Server 2016]]></category>
		<category><![CDATA[SQL Server Administrator]]></category>
		<category><![CDATA[SQL Server Error]]></category>
		<category><![CDATA[SQL Server Monitoring]]></category>
		<category><![CDATA[SQL Server Performance Tuning]]></category>
		<category><![CDATA[SQL Server Programming]]></category>
		<category><![CDATA[SQL Server Tips and Tricks]]></category>
		<category><![CDATA[TSQL]]></category>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=4619</guid>

					<description><![CDATA[If you don&#8217;t know about the Hekaton engine of SQL Server 2014, please visit below an article. SQL Server 2014: What is Hekaton? I am very surprised with the feature list of SQL Server 2016 because it came with lots of features and improvements. Whenever I explored SQL Server 2016, I got something new. SQL [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F02%2Fsql-server-2016-create-a-foreign-key-in-memory-optimized-table-in-memory-oltp%2F&amp;linkname=SQL%20Server%202016%3A%20Create%20a%20FOREIGN%20KEY%20in%20Memory%20optimized%20Table%20%28In-Memory%20OLTP%29" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F02%2Fsql-server-2016-create-a-foreign-key-in-memory-optimized-table-in-memory-oltp%2F&amp;linkname=SQL%20Server%202016%3A%20Create%20a%20FOREIGN%20KEY%20in%20Memory%20optimized%20Table%20%28In-Memory%20OLTP%29" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F02%2Fsql-server-2016-create-a-foreign-key-in-memory-optimized-table-in-memory-oltp%2F&amp;linkname=SQL%20Server%202016%3A%20Create%20a%20FOREIGN%20KEY%20in%20Memory%20optimized%20Table%20%28In-Memory%20OLTP%29" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F02%2Fsql-server-2016-create-a-foreign-key-in-memory-optimized-table-in-memory-oltp%2F&amp;linkname=SQL%20Server%202016%3A%20Create%20a%20FOREIGN%20KEY%20in%20Memory%20optimized%20Table%20%28In-Memory%20OLTP%29" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_reddit" href="https://www.addtoany.com/add_to/reddit?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F02%2Fsql-server-2016-create-a-foreign-key-in-memory-optimized-table-in-memory-oltp%2F&amp;linkname=SQL%20Server%202016%3A%20Create%20a%20FOREIGN%20KEY%20in%20Memory%20optimized%20Table%20%28In-Memory%20OLTP%29" title="Reddit" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F02%2Fsql-server-2016-create-a-foreign-key-in-memory-optimized-table-in-memory-oltp%2F&amp;linkname=SQL%20Server%202016%3A%20Create%20a%20FOREIGN%20KEY%20in%20Memory%20optimized%20Table%20%28In-Memory%20OLTP%29" title="Pocket" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F02%2Fsql-server-2016-create-a-foreign-key-in-memory-optimized-table-in-memory-oltp%2F&#038;title=SQL%20Server%202016%3A%20Create%20a%20FOREIGN%20KEY%20in%20Memory%20optimized%20Table%20%28In-Memory%20OLTP%29" data-a2a-url="https://www.dbrnd.com/2017/02/sql-server-2016-create-a-foreign-key-in-memory-optimized-table-in-memory-oltp/" data-a2a-title="SQL Server 2016: Create a FOREIGN KEY in Memory optimized Table (In-Memory OLTP)"></a></p><p>If you don&#8217;t know about the Hekaton engine of SQL Server 2014, please visit below an article.</p>
<blockquote class="wp-embedded-content" data-secret="2OEobqI4m5"><p><a href="https://www.dbrnd.com/2016/01/sql-server-2014-what-is-hekaton/">SQL Server 2014: What is Hekaton?</a></p></blockquote>
<p><iframe loading="lazy" class="wp-embedded-content" sandbox="allow-scripts" security="restricted"  src="https://www.dbrnd.com/2016/01/sql-server-2014-what-is-hekaton/embed/#?secret=2OEobqI4m5" data-secret="2OEobqI4m5" width="600" height="338" title="&#8220;SQL Server 2014: What is Hekaton?&#8221; &#8212; Database Research &amp; Development" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe></p>
<blockquote><p>I am very surprised with the feature list of SQL Server 2016 because it came with lots of features and improvements. Whenever I explored SQL Server 2016, I got something new.<br />
SQL Server 2016 already enhanced In-Memory OLTP by introducing the list of features. Let me share one of the features here.</p></blockquote>
<p>In the previous version, you cannot create a FOREIGN KEY in memory optimized table. Now, SQL Server 2016 introduced a feature to store the reference of a table in memory so you can create a FOREIGN KEY in memory optimized tables.</p>
<blockquote><p>You can create a reference between memory optimized tables; you cannot give reference of a Non-memory optimized table to a memory optimized table.</p></blockquote>
<p>Below is a full demonstration on this.</p>
<p>If you do not configure Memory optimized file group and data file, use below script to configure it.</p>
<p><strong>Add Memory optimized file group:</strong></p>
<pre class="crayon-plain-tag">ALTER DATABASE Database_Name
ADD Filegroup OLTP_InMemory CONTAINS MEMORY_OPTIMIZED_DATA</pre> </p>
<p><strong>Add data file into created Memory optimized file group:</strong></p>
<pre class="crayon-plain-tag">ALTER DATABASE Database_Name
ADD FILE (NAME = OLTP_InMemory, FILENAME = N'C:\SQLBackup\Hekaton')
TO FILEGROUP OLTP_InMemory</pre> </p>
<p><strong>Create a sample In-Memory table:</strong></p>
<pre class="crayon-plain-tag">CREATE TABLE tbl_Departments
(
	DeptID INT PRIMARY KEY NONCLUSTERED
	,DeptName VARCHAR(20)	
)WITH ( MEMORY_OPTIMIZED = ON, DURABILITY = SCHEMA_AND_DATA)
GO</pre> </p>
<p><strong>Create a another In-Memory child table:</strong></p>
<pre class="crayon-plain-tag">CREATE TABLE tbl_Employee
(
	EmpID INT PRIMARY KEY NONCLUSTERED
	,EmpName VARCHAR(20)
	,DeptID INT
	,CONSTRAINT fk_tbl_Employee_EmpID FOREIGN KEY (DeptID) REFERENCES tbl_Departments(DeptID)
) WITH ( MEMORY_OPTIMIZED = ON, DURABILITY = SCHEMA_AND_DATA);
GO</pre> </p>
<p><strong>Try to give reference of Non-Memory optimized table to Memory optimized table:</strong></p>
<pre class="crayon-plain-tag">CREATE TABLE tbl_EmpSalary
(
	EmpSalaryID INT PRIMARY KEY 
	,EmpID INT
	,EmpSalary INT
	,EmpSalaryMonth INT
	,CONSTRAINT fk_tbl_EmpSalary_EmpID FOREIGN KEY (EmpID) REFERENCES tbl_Employee(EmpID)
)
GO</pre> </p>
<p><strong>You will get below errors:</strong></p>
<pre class="crayon-plain-tag">Msg 10778, Level 16, State 0, Line 1
Foreign key relationships between memory optimized tables and non-memory optimized tables are not supported.
Msg 1750, Level 16, State 1, Line 1
Could not create constraint or index. See previous errors.</pre> </p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>SQL Server: Error &#8211; &#8216;The operation &#8216;AUTO_CLOSE&#8217; is not supported with databases that have a MEMORY_OPTIMIZED_DATA filegroup&#8217;</title>
		<link>https://www.dbrnd.com/2017/02/sql-server-error-the-operation-auto_close-is-not-supported-with-databases-that-have-a-memory_optimized_data-filegroup/</link>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Tue, 21 Feb 2017 16:16:34 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[Auto_Close]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[dbrnd]]></category>
		<category><![CDATA[In-Memory Table]]></category>
		<category><![CDATA[In-Memory tbale]]></category>
		<category><![CDATA[Memory Optimized Table]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server 2014]]></category>
		<category><![CDATA[SQL Server Administrator]]></category>
		<category><![CDATA[SQL Server Error]]></category>
		<category><![CDATA[SQL Server Monitoring]]></category>
		<category><![CDATA[SQL Server Performance Tuning]]></category>
		<category><![CDATA[SQL Server Programming]]></category>
		<category><![CDATA[SQL Server Tips and Tricks]]></category>
		<category><![CDATA[TSQL]]></category>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=4599</guid>

					<description><![CDATA[If you don&#8217;t about the option AUTO_CLOSE, please visit the previous post. &#8216;The operation &#8216;AUTO_CLOSE&#8217; is not supported with databases that have a MEMORY_OPTIMIZED_DATA filegroup&#8217; You are getting this error because your database set to AUTO_CLOSE ON that&#8217;s why you were unable to create a memory-optimized file group or data file. If you are planning [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F02%2Fsql-server-error-the-operation-auto_close-is-not-supported-with-databases-that-have-a-memory_optimized_data-filegroup%2F&amp;linkname=SQL%20Server%3A%20Error%20%E2%80%93%20%E2%80%98The%20operation%20%E2%80%98AUTO_CLOSE%E2%80%99%20is%20not%20supported%20with%20databases%20that%20have%20a%20MEMORY_OPTIMIZED_DATA%20filegroup%E2%80%99" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F02%2Fsql-server-error-the-operation-auto_close-is-not-supported-with-databases-that-have-a-memory_optimized_data-filegroup%2F&amp;linkname=SQL%20Server%3A%20Error%20%E2%80%93%20%E2%80%98The%20operation%20%E2%80%98AUTO_CLOSE%E2%80%99%20is%20not%20supported%20with%20databases%20that%20have%20a%20MEMORY_OPTIMIZED_DATA%20filegroup%E2%80%99" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F02%2Fsql-server-error-the-operation-auto_close-is-not-supported-with-databases-that-have-a-memory_optimized_data-filegroup%2F&amp;linkname=SQL%20Server%3A%20Error%20%E2%80%93%20%E2%80%98The%20operation%20%E2%80%98AUTO_CLOSE%E2%80%99%20is%20not%20supported%20with%20databases%20that%20have%20a%20MEMORY_OPTIMIZED_DATA%20filegroup%E2%80%99" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F02%2Fsql-server-error-the-operation-auto_close-is-not-supported-with-databases-that-have-a-memory_optimized_data-filegroup%2F&amp;linkname=SQL%20Server%3A%20Error%20%E2%80%93%20%E2%80%98The%20operation%20%E2%80%98AUTO_CLOSE%E2%80%99%20is%20not%20supported%20with%20databases%20that%20have%20a%20MEMORY_OPTIMIZED_DATA%20filegroup%E2%80%99" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_reddit" href="https://www.addtoany.com/add_to/reddit?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F02%2Fsql-server-error-the-operation-auto_close-is-not-supported-with-databases-that-have-a-memory_optimized_data-filegroup%2F&amp;linkname=SQL%20Server%3A%20Error%20%E2%80%93%20%E2%80%98The%20operation%20%E2%80%98AUTO_CLOSE%E2%80%99%20is%20not%20supported%20with%20databases%20that%20have%20a%20MEMORY_OPTIMIZED_DATA%20filegroup%E2%80%99" title="Reddit" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F02%2Fsql-server-error-the-operation-auto_close-is-not-supported-with-databases-that-have-a-memory_optimized_data-filegroup%2F&amp;linkname=SQL%20Server%3A%20Error%20%E2%80%93%20%E2%80%98The%20operation%20%E2%80%98AUTO_CLOSE%E2%80%99%20is%20not%20supported%20with%20databases%20that%20have%20a%20MEMORY_OPTIMIZED_DATA%20filegroup%E2%80%99" title="Pocket" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F02%2Fsql-server-error-the-operation-auto_close-is-not-supported-with-databases-that-have-a-memory_optimized_data-filegroup%2F&#038;title=SQL%20Server%3A%20Error%20%E2%80%93%20%E2%80%98The%20operation%20%E2%80%98AUTO_CLOSE%E2%80%99%20is%20not%20supported%20with%20databases%20that%20have%20a%20MEMORY_OPTIMIZED_DATA%20filegroup%E2%80%99" data-a2a-url="https://www.dbrnd.com/2017/02/sql-server-error-the-operation-auto_close-is-not-supported-with-databases-that-have-a-memory_optimized_data-filegroup/" data-a2a-title="SQL Server: Error – ‘The operation ‘AUTO_CLOSE’ is not supported with databases that have a MEMORY_OPTIMIZED_DATA filegroup’"></a></p><p>If you don&#8217;t about the option AUTO_CLOSE, please visit the previous post. </p>
<blockquote><p>&#8216;The operation &#8216;AUTO_CLOSE&#8217; is not supported with databases that have a MEMORY_OPTIMIZED_DATA filegroup&#8217; You are getting this error because your database set to AUTO_CLOSE ON that&#8217;s why you were unable to create a memory-optimized file group or data file. </p></blockquote>
<p>If you are planning to use In-Memory OLTP tables, you must set to AUTO_CLOSE OFF. </p>
<p><strong>Using SSMS, Set Auto Close OFF:</strong></p>
<pre class="crayon-plain-tag">Right-click on database -&gt; Properties -&gt; Options -&gt; Automatice Section -&gt; Auto Close</pre>
<strong>Using TSQL, Set AUTO_CLOSE OFF:</strong></p>
<pre class="crayon-plain-tag">USE [master]
GO
ALTER DATABASE [DatabaseName] SET AUTO_CLOSE OFF;
GO</pre> </p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>SQL Server Database Administrator Interview Questions and Answers (Day-5)</title>
		<link>https://www.dbrnd.com/2016/07/sql-server-database-administrator-interview-questions-and-answers-dmv-ssis-sql-azure-offline-database-day-5/</link>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Wed, 13 Jul 2016 20:42:03 +0000</pubDate>
				<category><![CDATA[SQL Server Interview]]></category>
		<category><![CDATA[answers]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database administrator]]></category>
		<category><![CDATA[database offline]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[dbrnd]]></category>
		<category><![CDATA[dynamic management views]]></category>
		<category><![CDATA[Interviews]]></category>
		<category><![CDATA[questions]]></category>
		<category><![CDATA[sql azure]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server 2014]]></category>
		<category><![CDATA[SQL Server Administrator]]></category>
		<category><![CDATA[SQL Server Monitoring]]></category>
		<category><![CDATA[SQL Server Performance Tunning]]></category>
		<category><![CDATA[SQL Server Tips and Tricks]]></category>
		<category><![CDATA[TSQL]]></category>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=3332</guid>

					<description><![CDATA[List out Dynamic Management Views (DMV&#8217;s) and the value that they provide to developers or DBAs. dm_tran_locks &#8211; Locking and blocking. dm_clr_loaded_assemblies &#8211; Assemblies in available in SQL Server. dm_db_file_space_usage &#8211; Database file usage to determine if databases are getting low on space and need immediate attention. dm_exec_cached_plans &#8211; Cached query plans available to SQL [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F07%2Fsql-server-database-administrator-interview-questions-and-answers-dmv-ssis-sql-azure-offline-database-day-5%2F&amp;linkname=SQL%20Server%20Database%20Administrator%20Interview%20Questions%20and%20Answers%20%28Day-5%29" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F07%2Fsql-server-database-administrator-interview-questions-and-answers-dmv-ssis-sql-azure-offline-database-day-5%2F&amp;linkname=SQL%20Server%20Database%20Administrator%20Interview%20Questions%20and%20Answers%20%28Day-5%29" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F07%2Fsql-server-database-administrator-interview-questions-and-answers-dmv-ssis-sql-azure-offline-database-day-5%2F&amp;linkname=SQL%20Server%20Database%20Administrator%20Interview%20Questions%20and%20Answers%20%28Day-5%29" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F07%2Fsql-server-database-administrator-interview-questions-and-answers-dmv-ssis-sql-azure-offline-database-day-5%2F&amp;linkname=SQL%20Server%20Database%20Administrator%20Interview%20Questions%20and%20Answers%20%28Day-5%29" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_reddit" href="https://www.addtoany.com/add_to/reddit?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F07%2Fsql-server-database-administrator-interview-questions-and-answers-dmv-ssis-sql-azure-offline-database-day-5%2F&amp;linkname=SQL%20Server%20Database%20Administrator%20Interview%20Questions%20and%20Answers%20%28Day-5%29" title="Reddit" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F07%2Fsql-server-database-administrator-interview-questions-and-answers-dmv-ssis-sql-azure-offline-database-day-5%2F&amp;linkname=SQL%20Server%20Database%20Administrator%20Interview%20Questions%20and%20Answers%20%28Day-5%29" title="Pocket" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F07%2Fsql-server-database-administrator-interview-questions-and-answers-dmv-ssis-sql-azure-offline-database-day-5%2F&#038;title=SQL%20Server%20Database%20Administrator%20Interview%20Questions%20and%20Answers%20%28Day-5%29" data-a2a-url="https://www.dbrnd.com/2016/07/sql-server-database-administrator-interview-questions-and-answers-dmv-ssis-sql-azure-offline-database-day-5/" data-a2a-title="SQL Server Database Administrator Interview Questions and Answers (Day-5)"></a></p><p><strong>List out Dynamic Management Views (DMV&#8217;s) and the value that they provide to developers or DBAs.</strong></p>
<ul>
<li>dm_tran_locks &#8211; Locking and blocking.</li>
<li>dm_clr_loaded_assemblies &#8211; Assemblies in available in SQL Server.</li>
<li>dm_db_file_space_usage &#8211; Database file usage to determine if databases are getting low on space and need immediate attention.</li>
<li>dm_exec_cached_plans &#8211; Cached query plans available to SQL Server.</li>
<li>dm_exec_sessions &#8211; Sessions in SQL Server.</li>
<li>dm_exec_connections &#8211; Connections to SQL Server.</li>
<li>dm_db_index_usage_stats &#8211; Seeks, scans, lookups per index.</li>
<li>dm_io_virtual_file_stats &#8211; IO statistics for databases and log files.</li>
<li>dm_broker_connections &#8211; Service Broker connections to the network.</li>
<li>dm_os_memory_objects &#8211; SQL Server memory usage sys.dm_tran_active_transactions &#8211; Transaction state for an instance of SQL Server.</li>
</ul>
<p><strong>Please explain the relationship between logins and users in the system and user databases.</strong></p>
<blockquote><p>Logins &#8211; All logins reside in the master database</p>
<p>Users &#8211; All users reside in the master database, other system databases and in the user defined databases.</p></blockquote>
<p><strong>Briefly explain the purpose of SQL Server Integration Services (SSIS)?</strong></p>
<blockquote><p>SQL Server Integration Services (SSIS) is a platform for data integration and workflow applications. It was first introduced with SQL Server 2005 replacement for Data Transformation Service (DTS). You build extraction, transformation, and load (ETL) packages with SSIS that extract, transform, and load data. A package is an SSIS object that defines the data source, transformation, and data destination used to integrate data from diverse data sources.</p>
<p>SSIS supports a variety of formats that you can use as the data source when you import data. These formats include: Microsoft Excel, Flat files, OLE-DB data sources, XML data sources etc. SSIS also supports SQL Server and these formats as data destination formats.</p></blockquote>
<p><strong>You have a default instance for SQL Server 2012 running on one computer. You install SQL Server 2014 on a different computer. You want to migrate the user databases from SQL Server 2012 to SQL Server 2014. What should you do?</strong></p>
<blockquote><p>You should register the SQL Server 2012 instance in SQL Server 2014 Management Studio and use the Copy Database Wizard to migrate the database.</p></blockquote>
<p><strong>You are upgrading a default instance of SQL Server 2012 to SQL Server 2014. What will be used as the SQL Server service account?</strong></p>
<blockquote><p>The service account specified for the SQL Server 2012 instance will be used as the SQL Server 2014 service account.</p></blockquote>
<p><strong>If you encounter this kind of an error message, what you need to look into to solve this problem?</strong></p>
<p><strong>[Microsoft][ODBC SQL Server Driver][Named Pipes]Specified SQL Server not found.</strong></p>
<blockquote><p>Check if MS SQL Server service is running on the computer you are trying to log into.</p>
<p>Check on Client Configuration utility. Client and Server have to in sync.</p></blockquote>
<p><strong>What kind of LAN types do you know?</strong></p>
<blockquote><p>Ethernet networks and token ring networks.</p></blockquote>
<p><strong>What is SQL Azure?</strong></p>
<blockquote><p>SQL Azure is a cloud based relational database as a Service offered by Microsoft. Conceptually it is SQL server in the cloud.</p></blockquote>
<p><strong>How can we migrate from SQL server to SQL Azure?</strong></p>
<blockquote><p>For Data Migration, we can use BCP or SSIS. And for schema Migration we can use Generate Script Wizard. Also, we could use a Tool called SQL Azure migration wizard available on codeplex.</p></blockquote>
<p><strong>What is the system function to get the current user’s user id?</strong></p>
<blockquote><p>USER_ID(). Also check out other system functions like USER_NAME(), SYSTEM_USER, SESSION_USER, CURRENT_USER, USER, SUSER_SID(), HOST_NAME().</p></blockquote>
<p><strong>What are the built-ins used for processing rows?</strong></p>
<ul>
<li>Get_group_row_count(function)</li>
<li>Get_group_selection_count(function)</li>
<li>Get_group_selection(function)</li>
<li>Reset_group_selection(procedure)</li>
<li>Set_group_selection(procedure)</li>
<li>Unset_group_selection(procedure)</li>
</ul>
<p><strong>How many files can a Database contain in SQL Server?</strong></p>
<blockquote><p>A Database can contain a maximum of 32,767 files.</p></blockquote>
<p><strong>How do I troubleshoot SQL Server connectivity issues?</strong></p>
<ul>
<li>Check your SQL Server Error log to make sure that it enables TCP/IP protocol and establish the listening on a specific TCP port.</li>
<li>Enable TCP/IP protocol if you could not find the message in the Error Log.</li>
<li>Check firewall if you cannot telnet to the specific TCP port.</li>
<li>Ensure that the TCP port on which SQL Server is listening has been put into the exceptions of your firewall.</li>
</ul>
<p><strong>What is the maximum limit of SQL Server instances for a standalone computer?</strong></p>
<blockquote><p>50 instances on a stand-alone server for all SQL Server editions. SQL Server supports 25 instances on a failover cluster.</p></blockquote>
<p><strong>Why did a T-SQL script fail to run a job when it could successfully run in SQL Server Management Studio ?</strong></p>
<blockquote><p>If the SQL Server Agent Service account is different from the login account and if it does not have enough permission to execute the query, the job will fail.</p>
<p>You can simply give the SQL Server Agent Service account permissions to execute the query, this is not the best way from a security perspective. For SQL Server Agent Service account, it is recommended to give it the least amount of privileges.</p></blockquote>
<p><strong>How can I degrade a SQL Server database from a higher version to a lower one?</strong></p>
<blockquote><p>Yes, degrading a SQL Server database is not supported, but you can use a flexible workaround to resolve this issue. You can use SQL Server Management Studio to first generate scripts for a lower ersion and then use Data Import/Export Wizard to transfer data.</p></blockquote>
<p><strong>What is the difference between dropping a database and taking a database offline?</strong></p>
<blockquote><p>Drop database deletes the database along with the physical files, it is not possible to bring back the database unless you have a backup of the database.</p>
<p>When you take a database offline, you the database is not available for users, it is not deleted physically, it can be brought back online.</p></blockquote>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>SQL Server 2014: Create Memory Optimized File Group and Table</title>
		<link>https://www.dbrnd.com/2016/01/sql-server-2014-create-memory-optimized-file-group-and-table/</link>
					<comments>https://www.dbrnd.com/2016/01/sql-server-2014-create-memory-optimized-file-group-and-table/#comments</comments>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Sun, 10 Jan 2016 17:24:31 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[dbrnd]]></category>
		<category><![CDATA[MEMORY_OPTIMIZED]]></category>
		<category><![CDATA[MEMORY_OPTIMIZED_DATA]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server 2014]]></category>
		<category><![CDATA[SQL Server Administrator]]></category>
		<category><![CDATA[SQL Server Monitoring]]></category>
		<category><![CDATA[SQL Server Performance Tunning]]></category>
		<category><![CDATA[SQL Server Tips and Tricks]]></category>
		<category><![CDATA[TSQL]]></category>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=1263</guid>

					<description><![CDATA[In this post, I am showing an Optimized Memory Table with allocating dedicated Memory Optimized File Group in SQL Server 2014. In the Previous post, I discussed basic theory about In-Memory Engine of SQL Server 2014. SQL Server 2014: What is Hekaton? That is one of the optimized ways to the create an Optimized Memory [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F01%2Fsql-server-2014-create-memory-optimized-file-group-and-table%2F&amp;linkname=SQL%20Server%202014%3A%20Create%20Memory%20Optimized%20File%20Group%20and%20Table" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F01%2Fsql-server-2014-create-memory-optimized-file-group-and-table%2F&amp;linkname=SQL%20Server%202014%3A%20Create%20Memory%20Optimized%20File%20Group%20and%20Table" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F01%2Fsql-server-2014-create-memory-optimized-file-group-and-table%2F&amp;linkname=SQL%20Server%202014%3A%20Create%20Memory%20Optimized%20File%20Group%20and%20Table" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F01%2Fsql-server-2014-create-memory-optimized-file-group-and-table%2F&amp;linkname=SQL%20Server%202014%3A%20Create%20Memory%20Optimized%20File%20Group%20and%20Table" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_reddit" href="https://www.addtoany.com/add_to/reddit?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F01%2Fsql-server-2014-create-memory-optimized-file-group-and-table%2F&amp;linkname=SQL%20Server%202014%3A%20Create%20Memory%20Optimized%20File%20Group%20and%20Table" title="Reddit" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F01%2Fsql-server-2014-create-memory-optimized-file-group-and-table%2F&amp;linkname=SQL%20Server%202014%3A%20Create%20Memory%20Optimized%20File%20Group%20and%20Table" title="Pocket" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F01%2Fsql-server-2014-create-memory-optimized-file-group-and-table%2F&#038;title=SQL%20Server%202014%3A%20Create%20Memory%20Optimized%20File%20Group%20and%20Table" data-a2a-url="https://www.dbrnd.com/2016/01/sql-server-2014-create-memory-optimized-file-group-and-table/" data-a2a-title="SQL Server 2014: Create Memory Optimized File Group and Table"></a></p><p>In this post, I am showing an Optimized Memory Table with allocating dedicated Memory Optimized File Group in SQL Server 2014.</p>
<p>In the Previous post, I discussed basic theory about In-Memory Engine of SQL Server 2014.</p>
<blockquote class="wp-embedded-content" data-secret="mAD6GIc1Ys"><p><a href="https://www.dbrnd.com/2016/01/sql-server-2014-what-is-hekaton/">SQL Server 2014: What is Hekaton?</a></p></blockquote>
<p><iframe loading="lazy" class="wp-embedded-content" sandbox="allow-scripts" security="restricted"  src="https://www.dbrnd.com/2016/01/sql-server-2014-what-is-hekaton/embed/#?secret=mAD6GIc1Ys" data-secret="mAD6GIc1Ys" width="600" height="338" title="&#8220;SQL Server 2014: What is Hekaton?&#8221; &#8212; Database Research &amp; Development" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe></p>
<p>That is one of the optimized ways to the create an Optimized Memory Table in a dedicated File Group of SQL Server.</p>
<p><strong>TSQL Script for creating the Memory Optimized File group and file:</strong></p><pre class="crayon-plain-tag">USE [master]
GO
ALTER DATABASE [AdventureWorks_2014] 
  ADD FILEGROUP [Memory_Optimized] CONTAINS MEMORY_OPTIMIZED_DATA 
GO
ALTER DATABASE [AdventureWorks_2014] 
  ADD FILE ( NAME = N'Hekaton', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\Hekaton' ) 
   TO FILEGROUP [Memory_Optimized]
GO</pre><p>
<p><strong>Create a sample Memory Optimized Table:</strong></p><pre class="crayon-plain-tag">USE AdventureWorks_2014
GO
CREATE TABLE dbo.tbl_Students
(
 StudentID int NOT NULL
 ,Name VARCHAR(50)
 ,Address VARCHAR
) WITH (MEMORY_OPTIMIZED = ON, DURABILITY = SCHEMA_AND_DATA)
GO</pre><p>
<p>Above table will create automatically into a Memory Optimized file group. We can access this table like any other table.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.dbrnd.com/2016/01/sql-server-2014-create-memory-optimized-file-group-and-table/feed/</wfw:commentRss>
			<slash:comments>6</slash:comments>
		
		
			</item>
	</channel>
</rss>
