<?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>archive table &#8211; Database Research &amp; Development</title>
	<atom:link href="https://www.dbrnd.com/tag/archive-table/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>Sun, 17 Jul 2016 07:32:52 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0.6</generator>
	<item>
		<title>SQL Server Database Administrator Interview Questions and Answers (Day-7)</title>
		<link>https://www.dbrnd.com/2016/07/sql-server-database-administrator-interview-questions-and-answers-instance-aware-archive-option-dbcc-checkprimaryfile-dedicated-connection-day-7/</link>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Fri, 15 Jul 2016 07:31:03 +0000</pubDate>
				<category><![CDATA[SQL Server Interview]]></category>
		<category><![CDATA[answers]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[archive table]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database administrator]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[DBCC CHECKPRIMARYFILE]]></category>
		<category><![CDATA[dbrnd]]></category>
		<category><![CDATA[Dedicated Connection]]></category>
		<category><![CDATA[Instance Aware]]></category>
		<category><![CDATA[Interviews]]></category>
		<category><![CDATA[Multiple file groups]]></category>
		<category><![CDATA[questions]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server]]></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=3345</guid>

					<description><![CDATA[What is the Instance-aware and Instance-unaware services in SQL Server? Instance-aware services are associated with a specific instance of SQL Server. SQL Server SQL Server Agent Analysis Services Reporting Services Full-text search Instance-unaware services are shared among all installed SQL Server instances. Integration Services SQL Server Browser SQL Server Active Directory Helper SQL Writer What [&#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-instance-aware-archive-option-dbcc-checkprimaryfile-dedicated-connection-day-7%2F&amp;linkname=SQL%20Server%20Database%20Administrator%20Interview%20Questions%20and%20Answers%20%28Day-7%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-instance-aware-archive-option-dbcc-checkprimaryfile-dedicated-connection-day-7%2F&amp;linkname=SQL%20Server%20Database%20Administrator%20Interview%20Questions%20and%20Answers%20%28Day-7%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-instance-aware-archive-option-dbcc-checkprimaryfile-dedicated-connection-day-7%2F&amp;linkname=SQL%20Server%20Database%20Administrator%20Interview%20Questions%20and%20Answers%20%28Day-7%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-instance-aware-archive-option-dbcc-checkprimaryfile-dedicated-connection-day-7%2F&amp;linkname=SQL%20Server%20Database%20Administrator%20Interview%20Questions%20and%20Answers%20%28Day-7%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-instance-aware-archive-option-dbcc-checkprimaryfile-dedicated-connection-day-7%2F&amp;linkname=SQL%20Server%20Database%20Administrator%20Interview%20Questions%20and%20Answers%20%28Day-7%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-instance-aware-archive-option-dbcc-checkprimaryfile-dedicated-connection-day-7%2F&amp;linkname=SQL%20Server%20Database%20Administrator%20Interview%20Questions%20and%20Answers%20%28Day-7%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-instance-aware-archive-option-dbcc-checkprimaryfile-dedicated-connection-day-7%2F&#038;title=SQL%20Server%20Database%20Administrator%20Interview%20Questions%20and%20Answers%20%28Day-7%29" data-a2a-url="https://www.dbrnd.com/2016/07/sql-server-database-administrator-interview-questions-and-answers-instance-aware-archive-option-dbcc-checkprimaryfile-dedicated-connection-day-7/" data-a2a-title="SQL Server Database Administrator Interview Questions and Answers (Day-7)"></a></p><p><strong>What is the Instance-aware and Instance-unaware services in SQL Server?</strong></p>
<p>Instance-aware services are associated with a specific instance of SQL Server.</p>
<ul>
<li>SQL Server</li>
<li>SQL Server Agent</li>
<li>Analysis Services</li>
<li>Reporting Services</li>
<li>Full-text search</li>
</ul>
<p>Instance-unaware services are shared among all installed SQL Server instances.</p>
<ul>
<li>Integration Services</li>
<li>SQL Server Browser</li>
<li>SQL Server Active Directory Helper</li>
<li>SQL Writer</li>
</ul>
<p><strong>What should be your priliminary questions for Data Archive in SQL Server?</strong></p>
<ul>
<li>What types of data are we storing?</li>
<li>Most effective storage approach for our users &#8211; how often are they accessing/needing these data?</li>
<li>Most effective storage approach for our environment &#8211; what is our environments bottlenecks, limitations and weaknesses and strengths in structure?</li>
<li>Most effective storage approach when considering legal restrictions and requirements.</li>
<li>Most effective storage approach when we consider costs; for an example, do we need an Enterprise license for our data archived server?</li>
</ul>
<p><strong>What are your different suggestions for archiving data?</strong></p>
<blockquote><p><strong>If the data needs to reside in the same database:</strong></p>
<p>Move the archive data to separate table(s) with a prefix to denote the tables are archive related such as &#8216;arc_&#8217;.</p>
<p>Create the table(s) in separate filegroups on separate disks to improve IO performance.</p>
<p>Use a view to join the old and new data if the users continue to need to access the data.</p>
<p>Modify the front end code to use the view rather than the base table.</p>
<p><strong>If the data does not need to reside in the same database:</strong></p>
<p>Move (insert and delete) the archive data to separate table(s) in another database on the server or to a separate database on another server.</p>
<p>Have users request access to the data for specific queries or change the application to use a linked server to access the archived data.</p>
<p><strong>If the data is just not needed:</strong></p>
<p>Back up the data, verify the backup is restorable, note the date of the last backup with the archived data and just delete the data.</p>
<p><strong>Automation options:</strong></p>
<p>Based on the application find out if the vendor has already implemented an archiving feature that just needed to be enabled.</p>
<p>If an automated option is not available, build a process with DTS or SSIS to move the data from the source system to the archive system.</p></blockquote>
<p><strong>What is the use of DBCC CHECKPRIMARYFILE?</strong></p>
<blockquote><p>DBCC CHECKPRIMARYFILE is one of the many undocumented SQL Server commands that we can use to do our job as DBAs.</p>
<p>This command is used only for reading meta data from the primary database data file on disk and to return information that is very useful, such as the database name, logical names, physical file names and more without having to attach it to an instance of SQL Server.</p></blockquote>
<p><strong>When you attach a database in SQL Server 2008R2 which was detached by a user with a different login you may get this error:</strong></p>
<p><strong>CREATE FILE encountered operating system error 5(Access is denied.) while attempting to open or create the physical file&#8230;</strong></p>
<p><strong>The question is, why this is occured and what is the solution of this?</strong></p>
<blockquote><p>You get this error because two different logins did the detach and attach operations. So the files, when detached, were owned by the first login, but the attach failed because the login that was used was not the owner of the mdf and ldf files.</p>
<p>When we detach database files, the owner becomes the person who did the detach command, so to resolve the issue we need to change or add the other login as the owner of the mdf and ldf files.</p></blockquote>
<p><strong>Can we make dedicated connection for Database Administrator?</strong></p>
<blockquote><p>Yes: using Dedicated Administrator Connection (DAC).</p>
<p>SQL Server Database Administrator can connect to a SQL Server Instance when the database engine is not responding to regular connections. During such a scenario a DBA can connect to the SQL Server Instance to troubleshoot and to kill any of the SQL Server Processes which are causing the issues.</p></blockquote>
<p><strong>Can we move data files between filegroups?</strong></p>
<blockquote><p>we cannot move data files between filegroups, it is a common practice to move data for a table between filegroups in a database.</p>
<p>This is a straight forward method of moving data from a table from one filegroup to another. We can recreate\create the clustered index on the new filegroup thereby moving the data from one filegroup to another.</p></blockquote>
<p><strong>When should I start thinking about using multiple file groups?</strong></p>
<ul>
<li>When disk queuing is causing application and user experience issues.</li>
<li>When particular tables are 10% or more of the database.</li>
<li>When non clustered index and data space are equal on large tables.</li>
<li>When an almost equal percentage of read-only and read-write data exist in the database.</li>
<li>When insufficient time is available to perform database maintenance.</li>
<li>When the business or application will be changing significantly and the data is going to grow at a much higher rate.</li>
<li>When archived data resides in the same database as the production data.</li>
</ul>
<p><strong>How to determine the service pack currently installed on SQL Server?</strong></p>
<blockquote><p>The global variable @@Version stores the build number of the sqlservr.exe, which is used to determine the service pack installed.</p></blockquote>
<p><strong>Why can’t I track data changes even though I already enabled the database audit on my database?</strong></p>
<blockquote><p>Database Audit does not track data changes. To track the data changes, you need to use another feature named &#8220;Change Data Capture&#8221; (CDC).</p></blockquote>
<p><strong>How do you troubleshoot errors in a SQL Server Agent Job?</strong></p>
<blockquote><p>Inside SSMS, in Object explorer under SQL Server Agent look for Job Activity Monitor. The job activity monitor displays the current status of all the jobs on the instance. Choose the particular job which failed, right click and choose view history from the drop down menu.</p></blockquote>
<p><strong>What is RAID and what are different types of RAID configurations?</strong></p>
<blockquote><p>RAID stands for Redundant Array of Inexpensive Disks, used to provide fault tolerance to database servers. There are six RAID levels 0 through 5 offering different levels of performance, fault tolerance.</p></blockquote>
<p><strong>Why can&#8217;t I log on to SQL Server using Windows Authentication in SQL Server Management Studio?</strong></p>
<blockquote><p>If you want to log on to the server using Windows Authentication, ensure that the current Windows account has been added to server logins.</p>
<p>You can check using below T-SQL.</p><pre class="crayon-plain-tag">SELECT loginname FROM sys.syslogins;</pre><p>
</p></blockquote>
<p><strong>What are the different ways of moving data/databases between servers and databases in SQL Server?</strong></p>
<blockquote><p>There are lots of options available, you have to choose your option depending upon your requirements. Some of the options you have are: BACKUP/RESTORE, dettaching and attaching databases, replication, DTS, BCP, logshipping, INSERT…SELECT, SELECT…INTO, creating INSERT scripts to generate data.</p></blockquote>
<p><strong>How To Find When SQL Server Instance was Started Last Time?</strong><br />
<pre class="crayon-plain-tag">SELECT sqlserver_start_time FROM sys.dm_os_sys_info</pre>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Database Design: The Truth about Archive Table and Soft Delete of Historical Data</title>
		<link>https://www.dbrnd.com/2015/10/database-design-the-truth-about-archive-table-and-soft-delete-of-historical-data/</link>
					<comments>https://www.dbrnd.com/2015/10/database-design-the-truth-about-archive-table-and-soft-delete-of-historical-data/#comments</comments>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Mon, 12 Oct 2015 20:23:35 +0000</pubDate>
				<category><![CDATA[Database Designing]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[archive table]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database concept]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[database standards]]></category>
		<category><![CDATA[Database Theory]]></category>
		<category><![CDATA[database topic]]></category>
		<category><![CDATA[dbrnd]]></category>
		<category><![CDATA[RDBMS]]></category>
		<category><![CDATA[soft delete]]></category>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=821</guid>

					<description><![CDATA[I have found lots of discussion and questions-answers, which one is a better from Archive Table and Soft Delete. Today in our company, This same discussion also happened during one of our requirement analysis. I have marked that this is a very basic topic, but still database professional has lots of discussion on this. We [&#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%2F2015%2F10%2Fdatabase-design-the-truth-about-archive-table-and-soft-delete-of-historical-data%2F&amp;linkname=Database%20Design%3A%20The%20Truth%20about%20Archive%20Table%20and%20Soft%20Delete%20of%20Historical%20Data" 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%2F2015%2F10%2Fdatabase-design-the-truth-about-archive-table-and-soft-delete-of-historical-data%2F&amp;linkname=Database%20Design%3A%20The%20Truth%20about%20Archive%20Table%20and%20Soft%20Delete%20of%20Historical%20Data" 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%2F2015%2F10%2Fdatabase-design-the-truth-about-archive-table-and-soft-delete-of-historical-data%2F&amp;linkname=Database%20Design%3A%20The%20Truth%20about%20Archive%20Table%20and%20Soft%20Delete%20of%20Historical%20Data" 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%2F2015%2F10%2Fdatabase-design-the-truth-about-archive-table-and-soft-delete-of-historical-data%2F&amp;linkname=Database%20Design%3A%20The%20Truth%20about%20Archive%20Table%20and%20Soft%20Delete%20of%20Historical%20Data" 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%2F2015%2F10%2Fdatabase-design-the-truth-about-archive-table-and-soft-delete-of-historical-data%2F&amp;linkname=Database%20Design%3A%20The%20Truth%20about%20Archive%20Table%20and%20Soft%20Delete%20of%20Historical%20Data" 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%2F2015%2F10%2Fdatabase-design-the-truth-about-archive-table-and-soft-delete-of-historical-data%2F&amp;linkname=Database%20Design%3A%20The%20Truth%20about%20Archive%20Table%20and%20Soft%20Delete%20of%20Historical%20Data" 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%2F2015%2F10%2Fdatabase-design-the-truth-about-archive-table-and-soft-delete-of-historical-data%2F&#038;title=Database%20Design%3A%20The%20Truth%20about%20Archive%20Table%20and%20Soft%20Delete%20of%20Historical%20Data" data-a2a-url="https://www.dbrnd.com/2015/10/database-design-the-truth-about-archive-table-and-soft-delete-of-historical-data/" data-a2a-title="Database Design: The Truth about Archive Table and Soft Delete of Historical Data"></a></p><p>I have found lots of discussion and questions-answers, which one is a better from Archive Table and Soft Delete.<br />
Today in our company, This same discussion also happened during one of our requirement analysis.<br />
I have marked that this is a very basic topic, but still database professional has lots of discussion on this.</p>
<blockquote><p>We all know the importance of data and most of the company and the client always prefer to store old or deleted historical data.<br />
But out immediate next question would be: whether to store in Archive Table or marked as Soft Deleted.</p></blockquote>
<p><a href="https://www.dbrnd.com/wp-content/uploads/2015/10/ArchiveVsDelete.png" rel="attachment wp-att-2830"><img fetchpriority="high" decoding="async" class="aligncenter wp-image-2830 size-full" title="Archive vs Delete" src="https://www.dbrnd.com/wp-content/uploads/2015/10/ArchiveVsDelete.png" alt="Archive vs Delete" width="680" height="300" srcset="https://www.dbrnd.com/wp-content/uploads/2015/10/ArchiveVsDelete.png 680w, https://www.dbrnd.com/wp-content/uploads/2015/10/ArchiveVsDelete-300x132.png 300w, https://www.dbrnd.com/wp-content/uploads/2015/10/ArchiveVsDelete-150x66.png 150w" sizes="(max-width: 680px) 100vw, 680px" /></a><br />
In this post, I am going to show all truth about: whether to go with Archive Table or Soft Deletion.</p>
<p style="text-align: center;"><span style="text-decoration: underline;"><strong>&#8221; The truth about, Marked as Soft Deleted &#8220;</strong></span></p>
<blockquote><p>Most of the time, This would be a first choice by Database Architecture to mark data as Soft Deleted.<br />
This is not a bad idea to avoid important data loss and even not need to go with prior approval to hard deletion.<br />
If any invalid deletion is happening, then it&#8217;s absolutely good because it&#8217;s very easy to recover.</p></blockquote>
<p>Generally, Soft Deletion is achieved by adding one extra IsDeleted bit flag or Deleted_Date field column. You can add this extra column on those tables in which you need to perform soft deletion.</p>
<p>Once you decide to go with Soft Deletion then you should revoke all DELETE privileges from all the database account.</p>
<p>You don&#8217;t have to worry about cascading a delete through various other tables in the database that reference the row you are deleting.</p>
<blockquote><p>The Soft Deletions comes with a cost, though, because you need to update your queries and indexes to be able to exclude the deleted rows. Each and every query, You have to write one filter condition to check IsSoftDeleted flag. This is also hard to manage in a big system because once you forget to put this filter, then some unwanted data also select by query which is not actually require.</p></blockquote>
<p>Just Imagine that your table has only 10 active row and 100000 soft deleted rows and still you should manage this deleted data because of soft deletion and will create performance issues. This soft deleted data also create, extra load on your file groups and rebuilding of the indexes also take a long time to complete.</p>
<blockquote><p>One more problem of Soft Deletion: Take an example of unique key constraint, once you marked some unique data as soft deleted and same data need to insert in the new format then soft deletion will fail because the data is already exist in a table.</p></blockquote>
<p style="text-align: center;"><span style="text-decoration: underline;"><strong>&#8221; The truth about, Stored into Archive Table &#8220;</strong></span></p>
<p>We understand the importance of data so we have another very good approach to move all deleted data into a different Archive Table.</p>
<blockquote><p>You can create same different replica table and all deleted data should be moved into this table from the original table.If you choose this approach then you do not require to write extra condition in WHERE caluse to filter deleted data. You can easily move all archive data into another filegroup which will reduce the load of primary filegroup. The size of the index will be smaller and performance of the table will improve with a smaller table size.</p></blockquote>
<p>The disadvantage of Archive Table is management of different Archive Tables, Just Imagine that you have total 400 tables in your system and the data of all this table require to achieve then you should create 400*2=800 tables to manage just archive data.</p>
<blockquote><p>Once you moved archive data from the original table to archive table and later you need some data recovery from the archive table to the original table, then you will face problem of physical order of data.</p></blockquote>
<p>You also require to write a different index management and table management script for this all archive tables because as a database professional we should also take care data size and its performance.</p>
<hr />
<p style="text-align: center;"><span style="text-decoration: underline;"><strong>&#8221; The Conclusion &#8220;</strong></span><br />
<em>As per this theory, both concepts have some advantage and disadvantage, but I suggest to go with Archive Table for historical data because Soft Deletion will create a performance issue for running Application. The Soft deletion also we can easily manage by creating different views, but again views has some it&#8217;s own limitations.</em></p>
<p style="text-align: center;"><em>Again this is my view and perspective, you can go with any approch base on your system requirements.</em></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.dbrnd.com/2015/10/database-design-the-truth-about-archive-table-and-soft-delete-of-historical-data/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
	</channel>
</rss>
