<?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>log shipping &#8211; Database Research &amp; Development</title>
	<atom:link href="https://www.dbrnd.com/tag/log-shipping/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, 25 Sep 2016 19:51:55 +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: Script to find last Restored Log backup file of the Secondary database in Log Shipping</title>
		<link>https://www.dbrnd.com/2016/10/sql-server-script-to-find-last-restored-log-backup-file-of-the-secondary-database-in-log-shipping/</link>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Sun, 23 Oct 2016 16:16:38 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server DBA Script]]></category>
		<category><![CDATA[.trn file]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[dbrnd]]></category>
		<category><![CDATA[log backup]]></category>
		<category><![CDATA[log shipping]]></category>
		<category><![CDATA[log_shipping_secondary]]></category>
		<category><![CDATA[log_shipping_secondary_databases]]></category>
		<category><![CDATA[SQL Query]]></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=3670</guid>

					<description><![CDATA[In this post, I am sharing one T-SQL Script to identify the last restored Log backup file of the Secondary database in the SQL Server Log Shipping. The one of the important points in Log Shipping is, both Primary Database and Secondary Database should be in sync. If both are out of sync, SQL Server [&#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%2F10%2Fsql-server-script-to-find-last-restored-log-backup-file-of-the-secondary-database-in-log-shipping%2F&amp;linkname=SQL%20Server%3A%20Script%20to%20find%20last%20Restored%20Log%20backup%20file%20of%20the%20Secondary%20database%20in%20Log%20Shipping" 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%2F10%2Fsql-server-script-to-find-last-restored-log-backup-file-of-the-secondary-database-in-log-shipping%2F&amp;linkname=SQL%20Server%3A%20Script%20to%20find%20last%20Restored%20Log%20backup%20file%20of%20the%20Secondary%20database%20in%20Log%20Shipping" 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%2F10%2Fsql-server-script-to-find-last-restored-log-backup-file-of-the-secondary-database-in-log-shipping%2F&amp;linkname=SQL%20Server%3A%20Script%20to%20find%20last%20Restored%20Log%20backup%20file%20of%20the%20Secondary%20database%20in%20Log%20Shipping" 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%2F10%2Fsql-server-script-to-find-last-restored-log-backup-file-of-the-secondary-database-in-log-shipping%2F&amp;linkname=SQL%20Server%3A%20Script%20to%20find%20last%20Restored%20Log%20backup%20file%20of%20the%20Secondary%20database%20in%20Log%20Shipping" 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%2F10%2Fsql-server-script-to-find-last-restored-log-backup-file-of-the-secondary-database-in-log-shipping%2F&amp;linkname=SQL%20Server%3A%20Script%20to%20find%20last%20Restored%20Log%20backup%20file%20of%20the%20Secondary%20database%20in%20Log%20Shipping" 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%2F10%2Fsql-server-script-to-find-last-restored-log-backup-file-of-the-secondary-database-in-log-shipping%2F&amp;linkname=SQL%20Server%3A%20Script%20to%20find%20last%20Restored%20Log%20backup%20file%20of%20the%20Secondary%20database%20in%20Log%20Shipping" 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%2F10%2Fsql-server-script-to-find-last-restored-log-backup-file-of-the-secondary-database-in-log-shipping%2F&#038;title=SQL%20Server%3A%20Script%20to%20find%20last%20Restored%20Log%20backup%20file%20of%20the%20Secondary%20database%20in%20Log%20Shipping" data-a2a-url="https://www.dbrnd.com/2016/10/sql-server-script-to-find-last-restored-log-backup-file-of-the-secondary-database-in-log-shipping/" data-a2a-title="SQL Server: Script to find last Restored Log backup file of the Secondary database in Log Shipping"></a></p><p>In this post, I am sharing one T-SQL Script to identify the last restored Log backup file of the Secondary database in the SQL Server Log Shipping. </p>
<blockquote><p>The one of the important points in Log Shipping is, both Primary Database and Secondary Database should be in sync. </p></blockquote>
<blockquote><p>If both are out of sync, SQL Server stops the Log Shipping and throws error related to log files. </p></blockquote>
<p>As a SQL DBA, I am facing this kind of common errors of Log Shipping like:<br />
<strong>&#8220;.trn is too recent to apply to the secondary database&#8221;<br />
&#8220;Could not find a log backup file that could be applied to secondary database&#8221;</strong></p>
<blockquote><p>Using below T-SQL script, you can find last restored log backup in the Secondary Database which help you to compare with available log backups of Primary Database. </p>
<p>You can also easily find out any pending restore of log backup. </p></blockquote>
<pre class="crayon-plain-tag">SELECT
	[lss].[primary_database]
	,[lss].[last_copied_file]
	,[lss].[last_copied_date]
	,[lssd].[secondary_database]
	,[lssd].[last_restored_file]
	,[lssd].[last_restored_date]
FROM [msdb].[dbo].[log_shipping_secondary] AS lss
INNER JOIN [msdb].[dbo].[log_shipping_secondary_databases] AS lssd
        ON [lss].[primary_database] = [lssd].[secondary_database]
WHERE [lss].[primary_database] ='Primary_Database_Name'
ORDER BY [lss].[primary_database]</pre> </p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>SQL Server: Database Log Shipping Interview Questions and Answers (Day-4)</title>
		<link>https://www.dbrnd.com/2016/07/sql-server-database-log-shipping-interview-questions-and-answers-common-problems-sp_resolve_logins-mirroring-differences-day-4/</link>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Fri, 08 Jul 2016 19:48:39 +0000</pubDate>
				<category><![CDATA[SQL Server Interview]]></category>
		<category><![CDATA[answers]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[dbrnd]]></category>
		<category><![CDATA[interview]]></category>
		<category><![CDATA[log shipping]]></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=3257</guid>

					<description><![CDATA[What are common reasons which breaks or stops the Log Shipping? Recent modifications on the shared folders. Human error like, either someone used the option of truncate only or switched the recovery model. date/time for the windows servers unmatching due to any DST activities. Datafile added on Primary on different drives then you need 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%2F2016%2F07%2Fsql-server-database-log-shipping-interview-questions-and-answers-common-problems-sp_resolve_logins-mirroring-differences-day-4%2F&amp;linkname=SQL%20Server%3A%20Database%20Log%20Shipping%20Interview%20Questions%20and%20Answers%20%28Day-4%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-log-shipping-interview-questions-and-answers-common-problems-sp_resolve_logins-mirroring-differences-day-4%2F&amp;linkname=SQL%20Server%3A%20Database%20Log%20Shipping%20Interview%20Questions%20and%20Answers%20%28Day-4%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-log-shipping-interview-questions-and-answers-common-problems-sp_resolve_logins-mirroring-differences-day-4%2F&amp;linkname=SQL%20Server%3A%20Database%20Log%20Shipping%20Interview%20Questions%20and%20Answers%20%28Day-4%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-log-shipping-interview-questions-and-answers-common-problems-sp_resolve_logins-mirroring-differences-day-4%2F&amp;linkname=SQL%20Server%3A%20Database%20Log%20Shipping%20Interview%20Questions%20and%20Answers%20%28Day-4%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-log-shipping-interview-questions-and-answers-common-problems-sp_resolve_logins-mirroring-differences-day-4%2F&amp;linkname=SQL%20Server%3A%20Database%20Log%20Shipping%20Interview%20Questions%20and%20Answers%20%28Day-4%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-log-shipping-interview-questions-and-answers-common-problems-sp_resolve_logins-mirroring-differences-day-4%2F&amp;linkname=SQL%20Server%3A%20Database%20Log%20Shipping%20Interview%20Questions%20and%20Answers%20%28Day-4%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-log-shipping-interview-questions-and-answers-common-problems-sp_resolve_logins-mirroring-differences-day-4%2F&#038;title=SQL%20Server%3A%20Database%20Log%20Shipping%20Interview%20Questions%20and%20Answers%20%28Day-4%29" data-a2a-url="https://www.dbrnd.com/2016/07/sql-server-database-log-shipping-interview-questions-and-answers-common-problems-sp_resolve_logins-mirroring-differences-day-4/" data-a2a-title="SQL Server: Database Log Shipping Interview Questions and Answers (Day-4)"></a></p><p><strong>What are common reasons which breaks or stops the Log Shipping?</strong></p>
<ul>
<li>Recent modifications on the shared folders.</li>
<li>Human error like, either someone used the option of truncate only or switched the recovery model.</li>
<li>date/time for the windows servers unmatching due to any DST activities.</li>
<li>Datafile added on Primary on different drives then you need to apply that on secondary with move until that your log shipping restore job will fail.</li>
<li>Any I/O,Memory,N/w bottleneck.</li>
<li>Your tuf file is missing.</li>
<li>You may have set the incorrect value for the Out of Sync Alert threshold.</li>
<li>Might be you have scheduled the jobs in same time.</li>
<li>Might be your MSDB database is full.</li>
</ul>
<p><strong>I&#8217;m getting the below error message in restoration job on secondary server, WHY?</strong></p>
<p><strong>&#8221; [Microsoft SQL-DMO (ODBC SQLState: 42000)]</strong></p>
<p><strong>Error 4305: [Microsoft][ODBC SQL Server Driver][SQL Server]The log in this backup set</strong></p>
<p><strong>begins at LSN 7000000026200001, which is too late to apply to the database. An earlier</strong></p>
<p><strong>log backup that includes LSN 6000000015100001 can be restored.</strong></p>
<p><strong>[Microsoft][ODBC SQL Server Driver][SQL Server]RESTORE LOG is terminating abnormally &#8220;.</strong></p>
<blockquote><p>Was your sql server or agent restarted yesterday in either source or destination ? because the error states there is a mismatch in LSN. A particular transaction log was not applied in the destination server hence the subsequent transaction logs cannot be applied as a result.</p>
<p>You can check log shipping monitor \ log shipping tables to check the which transaction log is last applied to secondary database.</p>
<p>Incase if you are not able to find the next transaction log in secondary server shared folder, you need to reconfigure log shipping.</p></blockquote>
<p><strong>What are your basic steps to reconfigure the Log Shipping?</strong></p>
<ul>
<li>Disable all the log shipping jobs in source and destination servers.</li>
<li>Take a full backup in source and restore it in secondary server using the With Standby option.</li>
<li>Enable all the jobs you disabled previously in step1.</li>
</ul>
<p><strong>Is it possible load balance in log shipping?</strong></p>
<blockquote><p>Yes: its possible in log shipping, while configuring log shipping you have the option to choose standby or no recovery mode, there you select STANDBY option to make the secondary database readonly.</p></blockquote>
<p><strong>Can I take full backup of the log shipped database in secondary server?</strong></p>
<blockquote><p>No: You cannot take the full backup.</p></blockquote>
<p><strong>What are the benefits of Log Shipping?</strong></p>
<ul>
<li>Log shipping doesn&#8217;t require expensive hardware or software. While it is great if your standby server is similar in capacity to your production server, it is not a requirement. In addition, you can use the standby server for other tasks, helping to justify the cost of the standby server.</li>
<li>Once log shipping has been implemented, it is relatively easy to maintain.</li>
<li>Assuming you have implemented log shipping correctly, it is very reliable.</li>
<li>The manual failover process is generally very short, typically 15 minutes or less.</li>
<li>Depending on how you have designed your log shipping process, very little, if any, data is lost should you have to failover. The amount of data loss, if any, is also dependent on why your production server failed.</li>
<li>Implementing log shipping is not technically difficult. Almost any DBA with several months or more of SQL Server 7 experience can successfully implement it.</li>
</ul>
<p><strong>Once the primary server comes back online, is it a difficult process to switch back to the primary database server?</strong></p>
<ul>
<li>Traditionally, depending on the size and number of database that are invloved in logshipping, it may or may not be difficult.</li>
<li>Database size and your network bandwidth matters a lot. Normally, you just have to resetup log-shipping. Meaning &#8211; point all your apps to primary and in background, do a full backup of primary, copy that to secondary server and restore it with no-recovery with subsequent log backups.</li>
<li>To minimize the downtime, you can use &#8220;Reverse logshipping&#8221; will prove to be a huge help.</li>
</ul>
<p><strong>Will changing the Recovery model to Full (from simple) have any issues?</strong></p>
<blockquote><p>Yes. Changing recovery model breaks the log chain.</p></blockquote>
<p><strong>Will my existing backups (using Symantec Backup Exec) be affected by enabling log shipping and switching to a full recovery model?</strong></p>
<blockquote><p>Once you setup logshipping, there is no need to take any additional log backups. In fact, any adhoc log backups will break the log chain. Use COPY_ONLY backups.</p></blockquote>
<p><strong>There are two servers. one is primary and the other is secondary. primary is on production server.</strong></p>
<ul>
<li>Logshipping configured and working fine. Suddenly, after some days, the sync between the servers is not there.</li>
<li>What is the immediate action?</li>
<li>First thing I&#8217;d do is check the backup log job and the copy job which copies the job from the primary to secondary and after that check the restore job which restores the log on the secondary. If there are no errors there then I&#8217;d start looking in msdb at the log shipping tables and see if I could determine the error from there.</li>
</ul>
<p><strong>Do we require any endpoints for Log Shipping?</strong></p>
<blockquote><p>We don&#8217;t need to create endpoints or assign port in log shipping, which is required for database mirroring.</p></blockquote>
<p><strong>What are the log shipping frequent issues you have faced?</strong></p>
<blockquote><p>It depends. I have seen some issues like transaction log cannot restored on the secondary database which is due to that the transaction log sequence is broken.</p></blockquote>
<p><strong>You might find that the last backed up/copied/restored files do not reflect correctly in the log shipping reports when you use a remote monitor server. What is this issue?</strong></p>
<blockquote><p>The last copied and restored file will show up as null if the monitor instance is not on the same box as the secondary instance. The last backed up file will show up as null if the monitor instance is not on the same box as the primary instance if the select @@servername value is not used as the monitor server name while configuring the log shipping monitor.</p></blockquote>
<p><strong>What do you know about the below error?</strong></p>
<blockquote><p>Error: During startup of warm standby database ‘testdb’ (database ID 7), its standby file (‘&lt;UNC path of the TUF file&gt;’) was inaccessible to the RESTORE statement. The operating system error was ‘5(Access is denied.)’.</p>
<p>If you have configured Log Shipping with STANDBY mode on SQL Server 2008 and the destination folder for the TLOGS uses a remote server on which the sqlservice/sqlagent is not a Local Admin, then the restore job will fail every time.</p></blockquote>
<p><strong>The sp_resolve_logins stored procedure runs successfully; however, it does not perform the expected modifications to the security on the secondary server. Why?</strong></p>
<blockquote><p>The sp_resolve_logins stored procedure requires an up-to-date BCP file of the primary server&#8217;s syslogins system table. These logins must already by created on the secondary server.</p></blockquote>
<p><strong>Log Shipping Backup and Out of Sync alerts are firing, even when the secondary server is updated with the transaction log backups. Is this possible?</strong></p>
<blockquote><p>Yes. It is possible that the alerts might fire even when the secondary database is being updated. If the alert threshold is set to a value less than double the time between back up and copy or restore jobs, the alerts might be raised.</p></blockquote>
<p><strong>What are the main differences between Log Shipping and Database Mirroring?</strong></p>
<p><span style="text-decoration: underline;"><strong>Log Shipping:</strong></span></p>
<ul>
<li>It automatically sends transaction log backups from one database (Known as the primary database) to a database (Known as the Secondary database) on another server. An optional third server, known as the monitor server, records the history and status of backup and restore operations. The monitor server can raise alerts if these operations fail to occur as scheduled.</li>
<li>It has a manual Failover.</li>
<li>You can use a secondary database for reporting purposes when the secondary database restore in STANDBY mode.</li>
<li>The servers involved in log shipping should have the same logical design and collation setting.</li>
<li>The databases in a log shipping configuration must use the full recovery model or bulk-logged recovery model.</li>
<li>The SQL server agent should be configured to start up automatically.</li>
<li>You must have sysadmin privileges on each computer running SQL server to configure log shipping.</li>
</ul>
<p><span style="text-decoration: underline;"><strong>Mirroring:</strong></span></p>
<ul>
<li>Database mirroring is a primarily software solution for increasing database availability.</li>
<li>It has a Automatice Failover.</li>
<li>Mirrored DB can only be accessed using snapshot DB.</li>
<li>It maintains two copies of a single database that must reside on different server instances of SQL Server Database Engine.</li>
<li>Verify that there are no differences in system collation settings between the principal and mirror servers.</li>
<li>Verify that the local windows groups and SQL Server logins definitions are the same on both servers.</li>
<li>Verify that external software components are installed on both the principal and the mirror servers.</li>
<li>Verify that the SQL Server software version is the same on both servers.</li>
<li>Verify that global assemblies are deployed on both the principal and mirror server.</li>
<li>Verify that for the certificates and keys used to access external resources, authentication and encryption match on the principal and mirror server.</li>
</ul>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>SQL Server: Database Log Shipping Interview Questions and Answers (Day-3)</title>
		<link>https://www.dbrnd.com/2016/07/sql-server-database-log-shipping-interview-questions-and-answers-restoring-standby-mode-tuf-file-sp_resolve_logins-day-3/</link>
					<comments>https://www.dbrnd.com/2016/07/sql-server-database-log-shipping-interview-questions-and-answers-restoring-standby-mode-tuf-file-sp_resolve_logins-day-3/#comments</comments>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Thu, 07 Jul 2016 18:33:52 +0000</pubDate>
				<category><![CDATA[SQL Server Interview]]></category>
		<category><![CDATA[answers]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[dbrnd]]></category>
		<category><![CDATA[Interviews]]></category>
		<category><![CDATA[log shipping]]></category>
		<category><![CDATA[questions]]></category>
		<category><![CDATA[restoring mode]]></category>
		<category><![CDATA[sp_resolve_logins]]></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[standby mode]]></category>
		<category><![CDATA[TSQL]]></category>
		<category><![CDATA[tuf file]]></category>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=3251</guid>

					<description><![CDATA[Does the secondary instance need to be licensed? I am not the licensing police, and I am not Microsoft – check with your licensing representative to clarify your exact situation. Generally, you can have one warm standby server. However, the second someone starts using it for reporting, testing, or anything else, you need to license [&#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-log-shipping-interview-questions-and-answers-restoring-standby-mode-tuf-file-sp_resolve_logins-day-3%2F&amp;linkname=SQL%20Server%3A%20Database%20Log%20Shipping%20Interview%20Questions%20and%20Answers%20%28Day-3%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-log-shipping-interview-questions-and-answers-restoring-standby-mode-tuf-file-sp_resolve_logins-day-3%2F&amp;linkname=SQL%20Server%3A%20Database%20Log%20Shipping%20Interview%20Questions%20and%20Answers%20%28Day-3%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-log-shipping-interview-questions-and-answers-restoring-standby-mode-tuf-file-sp_resolve_logins-day-3%2F&amp;linkname=SQL%20Server%3A%20Database%20Log%20Shipping%20Interview%20Questions%20and%20Answers%20%28Day-3%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-log-shipping-interview-questions-and-answers-restoring-standby-mode-tuf-file-sp_resolve_logins-day-3%2F&amp;linkname=SQL%20Server%3A%20Database%20Log%20Shipping%20Interview%20Questions%20and%20Answers%20%28Day-3%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-log-shipping-interview-questions-and-answers-restoring-standby-mode-tuf-file-sp_resolve_logins-day-3%2F&amp;linkname=SQL%20Server%3A%20Database%20Log%20Shipping%20Interview%20Questions%20and%20Answers%20%28Day-3%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-log-shipping-interview-questions-and-answers-restoring-standby-mode-tuf-file-sp_resolve_logins-day-3%2F&amp;linkname=SQL%20Server%3A%20Database%20Log%20Shipping%20Interview%20Questions%20and%20Answers%20%28Day-3%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-log-shipping-interview-questions-and-answers-restoring-standby-mode-tuf-file-sp_resolve_logins-day-3%2F&#038;title=SQL%20Server%3A%20Database%20Log%20Shipping%20Interview%20Questions%20and%20Answers%20%28Day-3%29" data-a2a-url="https://www.dbrnd.com/2016/07/sql-server-database-log-shipping-interview-questions-and-answers-restoring-standby-mode-tuf-file-sp_resolve_logins-day-3/" data-a2a-title="SQL Server: Database Log Shipping Interview Questions and Answers (Day-3)"></a></p><p><strong>Does the secondary instance need to be licensed?</strong></p>
<blockquote><p>I am not the licensing police, and I am not Microsoft – check with your licensing representative to clarify your exact situation. Generally, you can have one warm standby server. However, the second someone starts using it for reporting, testing, or anything else, you need to license it like any other server.</p></blockquote>
<p><strong>When log shipping is set up, Agent jobs are created to alert me if a backup, copy, or restore fails. How do I get notified?</strong></p>
<blockquote><p>You need to go into the Agent job, pull up Notifications, and choose your method – email an operator, or write to the event log, for example.</p></blockquote>
<p><strong>Are my logins shipped from the primary to the secondary?</strong></p>
<blockquote><p>No, they are not. You’ll need to set up a separate method to sync the logins.</p></blockquote>
<p><strong>What is the difference between the secondary being in Restoring vs. Standby?</strong></p>
<blockquote><p>Restoring means the database is not accessible. Standby means it is read-only. You make this decision when you set up the log shipping.</p>
<p>If the database is in Standby mode, users can query it – except when a log backup is being restored. You need to decide if a restore job will disconnect users, or if the restore is delayed until after the users are disconnected.</p></blockquote>
<p><strong>Can we configure log shipping if the SQL server service account is running under local system account?</strong></p>
<blockquote><p>Yes:If the SQL Server service account is running under the local system account on the primary server, you must create the backup folder on the primary server and specify the local path to that folder here. The SQL Server service account of the primary server instance must have Read and Write permissions on this folder.</p></blockquote>
<p><strong>What happens to the log shipping in case if you have added the data file on the primary server ?</strong></p>
<blockquote><p>If both primary &amp; secondary servers as same Disk configuration settings then you can ignore &amp; secondary will takes up, how ever if you changed anything at the Primary side for ex-&gt;you have created the folder &amp; added the folder or you have added to any other drive then you have to restore the Next trn backup (i,e after adding the data file) with MOVE option.</p></blockquote>
<p><strong>Does index operation logging in log shipping?</strong></p>
<blockquote><p>Yes: It is fully logged operation so it will replicate on secondary as well.</p></blockquote>
<p><strong>May I shrink the log files of Primary Database?</strong></p>
<blockquote><p>Yes, you can shrink the log files but make sure that before it copied into Secondary Database.</p></blockquote>
<p><strong>What do you know about the TUF file?</strong></p>
<blockquote><p>TUF stands for -&gt;T -&gt;Transaction  U-&gt;Undo  F-&gt;File  so it is Transaction Undo file.</p>
<p>It contains the Modification that were not committed on the Primary database when the Transaction log backup was in progress and when the log was restored to another database…so at some point of time when the next trn restored on the secondary side then SQL server uses the data from the Undo file and it starts restoring the Incomplete transactions.</p></blockquote>
<p><strong>My Tuf file deleted unfortunate when the server was shutdown or during the server down time then what will happens to the logshipping?</strong></p>
<blockquote><p>The log shipping will not work, Incase if you have OS level Backup then you can restore the file then you can be cool.</p></blockquote>
<p><strong>Can we configure Log Shipping between the different domains?</strong></p>
<blockquote><p>Yes, we can configure Log Shipping on the server residing in different domains.</p></blockquote>
<p><strong>After some disk issues at the production server the logshipping continually failed. So I tried a full back up the primary database and restored the secondary database with this full  backup and started the log shipping again. And the logshipping backup of the primary database failed with the error message below:</strong></p>
<p><strong>*** Error: BACKUP detected corruption in the database log. Check the errorlog for more information.</strong></p>
<p><strong>BACKUP LOG is terminating abnormally.</strong></p>
<ul>
<li>Stop all user activity in the primary database.</li>
<li>Switch to the SIMPLE recovery model (breaking the log backup chain and removing the requirement that the damaged portion of log must be backed up).</li>
<li>Switch to the FULL recovery model.</li>
<li>Take a full database backup (thus starting a new log backup chain).</li>
<li>Start the logshipping job.</li>
</ul>
<p><strong>Does the file name first_file_000000000000.trn indicate that the copy or restore job was unsuccessful?</strong></p>
<blockquote><p>Each run of the copy and restore job is associated with at least one file. By default, if no files are copied or restored in a certain run of any of these two jobs, SQL Server places first_file_000000000000.trn in the file name field. This may or may not indicate a problem.</p></blockquote>
<p><strong>Does the sp_resolve_logins stored procedure work for remote logins in SQL Server?</strong></p>
<blockquote><p>No: The sp_resolve_logins stored procedure only works for typical logins. Any remote logins must be created manually on the secondary server.</p></blockquote>
<p><strong>Why is the log shipping check box sometimes dimmed in the Maintenance Plan dialog box?</strong></p>
<ul>
<li>Multiple databases might be selected for the Maintenance Plan.</li>
<li>The database that is selected is not in the Full or Bulk Logged Recovery model.</li>
<li>SQL Server Enterprise Edition is not installed on the server.</li>
</ul>
<p><strong>Can I configure primary and secondary servers to use SQL authentication to connect to the monitor server?</strong></p>
<blockquote><p>Yes. It is possible to use either Windows or SQL authentication for primary and secondary servers to connect to the monitor server.</p></blockquote>
<p><strong>Why backup job failed on Primary server and thrown below error messages?</strong></p>
<p><strong>*** Error: Backup failed for Server ‘&lt;Server Name&gt;’. (Microsoft.SqlServer.SmoExtended) ***</strong></p>
<p><strong>*** Error: An exception occurred while executing a Transact-SQL statement or batch.(Microsoft.SqlServer.ConnectionInfo) ***</strong></p>
<p><strong> *** Error: BACKUP LOG cannot be performed because there is no current database backup.</strong></p>
<blockquote><p>This message is thrown because the database is never backed up fully before. Do a full backup of the primary database to solve this issue.</p></blockquote>
<p><strong>What does sp_resolve_logins do?</strong></p>
<blockquote><p>At the time of the log shipping role change, the sp_resolve_logins stored procedure requires a BCP file of the syslogins system table from the primary server. This stored procedure loads the BCP file into the temporary table and loops through each login to verify if a login with the same name exists in the secondary server&#8217;s syslogins system table.</p>
<p>Execution of this stored procedure is required only if there are new logins created on the primary server after log shipping has been initialized and those same logins are not created on the secondary servers with the same SID.</p></blockquote>
]]></content:encoded>
					
					<wfw:commentRss>https://www.dbrnd.com/2016/07/sql-server-database-log-shipping-interview-questions-and-answers-restoring-standby-mode-tuf-file-sp_resolve_logins-day-3/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>SQL Server: Database Log Shipping Interview Questions and Answers (Day-2)</title>
		<link>https://www.dbrnd.com/2016/07/sql-server-database-log-shipping-interview-questions-and-answers-swap-role-primary-secondary-server-manage-fail-over-day-2/</link>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Wed, 06 Jul 2016 19:54:37 +0000</pubDate>
				<category><![CDATA[SQL Server Interview]]></category>
		<category><![CDATA[answers]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[dbrnd]]></category>
		<category><![CDATA[Interviews]]></category>
		<category><![CDATA[log shipping]]></category>
		<category><![CDATA[primary server]]></category>
		<category><![CDATA[questions]]></category>
		<category><![CDATA[secondary server]]></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[swap role]]></category>
		<category><![CDATA[TSQL]]></category>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=3247</guid>

					<description><![CDATA[What are your basic prerequisites for configuring Log Shipping? Check SQL Server edition which supports Log Shipping. The servers involved in log shipping should have the same case-sensitivity settings. The databases in a log shipping configuration must use the full recovery model or bulk-logged recovery model. How to monitor the Log Shipping configurations and operations? [&#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-log-shipping-interview-questions-and-answers-swap-role-primary-secondary-server-manage-fail-over-day-2%2F&amp;linkname=SQL%20Server%3A%20Database%20Log%20Shipping%20Interview%20Questions%20and%20Answers%20%28Day-2%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-log-shipping-interview-questions-and-answers-swap-role-primary-secondary-server-manage-fail-over-day-2%2F&amp;linkname=SQL%20Server%3A%20Database%20Log%20Shipping%20Interview%20Questions%20and%20Answers%20%28Day-2%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-log-shipping-interview-questions-and-answers-swap-role-primary-secondary-server-manage-fail-over-day-2%2F&amp;linkname=SQL%20Server%3A%20Database%20Log%20Shipping%20Interview%20Questions%20and%20Answers%20%28Day-2%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-log-shipping-interview-questions-and-answers-swap-role-primary-secondary-server-manage-fail-over-day-2%2F&amp;linkname=SQL%20Server%3A%20Database%20Log%20Shipping%20Interview%20Questions%20and%20Answers%20%28Day-2%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-log-shipping-interview-questions-and-answers-swap-role-primary-secondary-server-manage-fail-over-day-2%2F&amp;linkname=SQL%20Server%3A%20Database%20Log%20Shipping%20Interview%20Questions%20and%20Answers%20%28Day-2%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-log-shipping-interview-questions-and-answers-swap-role-primary-secondary-server-manage-fail-over-day-2%2F&amp;linkname=SQL%20Server%3A%20Database%20Log%20Shipping%20Interview%20Questions%20and%20Answers%20%28Day-2%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-log-shipping-interview-questions-and-answers-swap-role-primary-secondary-server-manage-fail-over-day-2%2F&#038;title=SQL%20Server%3A%20Database%20Log%20Shipping%20Interview%20Questions%20and%20Answers%20%28Day-2%29" data-a2a-url="https://www.dbrnd.com/2016/07/sql-server-database-log-shipping-interview-questions-and-answers-swap-role-primary-secondary-server-manage-fail-over-day-2/" data-a2a-title="SQL Server: Database Log Shipping Interview Questions and Answers (Day-2)"></a></p><p><strong>What are your basic prerequisites for configuring Log Shipping?</strong></p>
<ul>
<li>Check SQL Server edition which supports Log Shipping.</li>
<li>The servers involved in log shipping should have the same case-sensitivity settings.</li>
<li>The databases in a log shipping configuration must use the full recovery model or bulk-logged recovery model.</li>
</ul>
<p><strong>How to monitor the Log Shipping configurations and operations?</strong></p>
<blockquote><p>We can use sp_help_log_shipping_monitor system stored procedure to monitor basic thing about the Log Shipping.</p></blockquote>
<p><strong>How to display the Transaction Log Shipping Status report on a server instance?</strong></p>
<blockquote><p>Connect to a monitor server, primary server, or secondary server.</p>
<p>Right-click the server instance in Object Explorer, point to Reports, and point to Standard Reports.</p>
<p>Click Transaction Log Shipping Status.</p></blockquote>
<p><strong>Which are the basic system tables to track the information about the Log Shipping?</strong></p>
<ul>
<li>log_shipping_monitor_alert</li>
<li>log_shipping_monitor_error_detail</li>
<li>log_shipping_monitor_history_detail</li>
<li>log_shipping_monitor_primary</li>
<li>log_shipping_monitor_secondary</li>
</ul>
<p><strong>Which permission is requireD to enable a Log Shipping?</strong></p>
<blockquote><p>You must be a sysadmin on each server instance to enable log shipping.</p></blockquote>
<p><strong>When Primary instance failed, we require fail-over management so during this exercise what is our big problem to enable a Secondary Instance for further operation?</strong></p>
<blockquote><p>Typically, the primary and secondary databases are unsynchronized, because the primary database continues to be updated after its latest backup job. Also, in some cases, recent transaction log backups have not been copied to the secondary server instances, or some copied log backups might still not have been applied to the secondary database.</p></blockquote>
<p><strong>What are your basic steps to perform Fail-over Secondary server in Log Shipping, when Primary Server fails?</strong></p>
<ul>
<li>Take the Tail of Log from Primary server if possible.</li>
<li>Restore Tail of log into all Secondary Database.</li>
<li>Remove Log-shipping configuration from Primary Server.</li>
<li>Select any one of Secondary server and bring into online with Alter Database DBName set Online.</li>
<li>Right click on Primary Database and Generate script for Users and Logins.</li>
<li>Then move the script to Secondary server to create Users and Logins.</li>
<li>Re-configure log shipping from New Server (Secondary server).</li>
</ul>
<p><strong>How we can swap the role between Primary Server and Secondary Server?</strong></p>
<ul>
<li>Bring the secondary database online, backing up the transaction log on the primary server with NORECOVERY.</li>
<li>Disable the log shipping backup job on the original primary server, and the copy and restore jobs on the original secondary server.</li>
<li>Enable the log shipping backup job on the secondary server (the new primary server), and the copy and restore jobs on the primary server (the new secondary server).</li>
</ul>
<p><strong>I want to know drop a database which is a part of Log Shipping, How it is possible?</strong></p>
<blockquote><p>If you are planning to delete a database that is part of a log shipping configuration, remove log shipping first.</p>
<p>You can remove log shipping from a primary database by disabling it in SQL Server Management Studio or by using the log shipping Transact-SQL stored procedures. When you remove log shipping from a database, all log shipping related jobs and schedules will be removed, along with log shipping history and error information. The databases themselves on both the primary and secondary servers will not be changed.</p></blockquote>
<p><strong>Which stored procedures used to remove a secondary database in Log Shipping?</strong></p>
<blockquote><p>On the primary server, execute sp_delete_log_shipping_primary_secondary to delete the information about the secondary database from the primary server.</p>
<p>On the secondary server, execute sp_delete_log_shipping_secondary_database to delete the secondary database.</p></blockquote>
<p><strong>Which stored procedures used to remove a Log Shipping?</strong></p>
<blockquote><p>On the primary server, execute sp_delete_log_shipping_primary_secondary to delete the information about the secondary database from the primary server.</p>
<p>On the secondary server, execute sp_delete_log_shipping_secondary_database to delete the secondary database.</p>
<p>On the primary server, execute sp_delete_log_shipping_primary_database to delete information about the log shipping configuration from the primary server. This also deletes the backup job.</p>
<p>Delete the secondary database from the secondary server if desired.</p></blockquote>
<p><strong>I want to perform migration of high availability Log Shipping to Always On Availability Group. </strong><strong>What are the prerequisites for Log Shipping?</strong></p>
<ul>
<li>The log shipping primary database must reside on the instance of SQL Server that hosts the initial/current primary replica of the availability group.</li>
<li>For a given log shipping secondary database to be converted to an Always On secondary database, it must:</li>
<li>Use the same name as the primary database.</li>
<li>Reside on a server instance that hosts a secondary replica for the availability group.</li>
<li>Once the backup job has run on the primary database, disable the backup job, and once the restore job has run on a given secondary database, disable the restore job.</li>
<li>After you have created all the secondary databases for the availability group, if you want to perform backups on secondary replicas, you need to re-configure the automated backup preference of the availability group.</li>
</ul>
<p><strong>How can I continue to log ship to the former primary server without restoring a database backup?</strong></p>
<blockquote><p>It is possible to log ship between two servers repeatedly without having to restore the complete database backup. The requirement is that both the primary and secondary servers are available when you perform the role change procedure.</p></blockquote>
<p><strong>What do you know about the Error Message 14421?</strong></p>
<blockquote><p>Message 14421 does not necessarily indicate a problem with Log Shipping. This message indicates that the difference between the last backed up file and last restored file is greater than the time selected for the Out of Sync Alert threshold.</p></blockquote>
<p><strong>What do you know about the Error Message 14420?</strong></p>
<blockquote><p>Message 14420 does not necessarily indicate a problem with log shipping. The message indicates that the difference between the last backed up file and current time on the monitor server is greater than the time that is set for the Backup Alert threshold.</p></blockquote>
<p><strong>Logshipping primary database backup job failed with the following error:</strong></p>
<p><strong> *** Error: Cannot open backup device ‘\\..\BACKUP LOG is terminating abnormally.</strong></p>
<blockquote><p>SQL Server agent does not have appropriate permission to access the shared folder. Granting access solves this problem.</p></blockquote>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>SQL Server: Database Log Shipping Interview Questions and Answers (Day-1)</title>
		<link>https://www.dbrnd.com/2016/07/sql-server-database-log-shipping-interview-questions-and-answers-backup-copy-restore-agent-job-monitor-server-day-1/</link>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Tue, 05 Jul 2016 19:42:36 +0000</pubDate>
				<category><![CDATA[SQL Server Interview]]></category>
		<category><![CDATA[agent job]]></category>
		<category><![CDATA[answers]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[backup job]]></category>
		<category><![CDATA[copy job]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[dbrnd]]></category>
		<category><![CDATA[high availability]]></category>
		<category><![CDATA[interview]]></category>
		<category><![CDATA[load balancing]]></category>
		<category><![CDATA[log shipping]]></category>
		<category><![CDATA[monitor server]]></category>
		<category><![CDATA[primary server]]></category>
		<category><![CDATA[questions]]></category>
		<category><![CDATA[restore job]]></category>
		<category><![CDATA[secondary server]]></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=3244</guid>

					<description><![CDATA[What is a Log Shipping? It is a shipping of SQL Server transaction log from one server to another server. It is a one kind of high availability feature of SQL Server. You can use log shipping to send transaction logs from one database (the primary database) to another (the secondary database) on a constant [&#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-log-shipping-interview-questions-and-answers-backup-copy-restore-agent-job-monitor-server-day-1%2F&amp;linkname=SQL%20Server%3A%20Database%20Log%20Shipping%20Interview%20Questions%20and%20Answers%20%28Day-1%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-log-shipping-interview-questions-and-answers-backup-copy-restore-agent-job-monitor-server-day-1%2F&amp;linkname=SQL%20Server%3A%20Database%20Log%20Shipping%20Interview%20Questions%20and%20Answers%20%28Day-1%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-log-shipping-interview-questions-and-answers-backup-copy-restore-agent-job-monitor-server-day-1%2F&amp;linkname=SQL%20Server%3A%20Database%20Log%20Shipping%20Interview%20Questions%20and%20Answers%20%28Day-1%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-log-shipping-interview-questions-and-answers-backup-copy-restore-agent-job-monitor-server-day-1%2F&amp;linkname=SQL%20Server%3A%20Database%20Log%20Shipping%20Interview%20Questions%20and%20Answers%20%28Day-1%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-log-shipping-interview-questions-and-answers-backup-copy-restore-agent-job-monitor-server-day-1%2F&amp;linkname=SQL%20Server%3A%20Database%20Log%20Shipping%20Interview%20Questions%20and%20Answers%20%28Day-1%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-log-shipping-interview-questions-and-answers-backup-copy-restore-agent-job-monitor-server-day-1%2F&amp;linkname=SQL%20Server%3A%20Database%20Log%20Shipping%20Interview%20Questions%20and%20Answers%20%28Day-1%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-log-shipping-interview-questions-and-answers-backup-copy-restore-agent-job-monitor-server-day-1%2F&#038;title=SQL%20Server%3A%20Database%20Log%20Shipping%20Interview%20Questions%20and%20Answers%20%28Day-1%29" data-a2a-url="https://www.dbrnd.com/2016/07/sql-server-database-log-shipping-interview-questions-and-answers-backup-copy-restore-agent-job-monitor-server-day-1/" data-a2a-title="SQL Server: Database Log Shipping Interview Questions and Answers (Day-1)"></a></p><p><strong>What is a Log Shipping?</strong></p>
<blockquote><p>It is a shipping of SQL Server transaction log from one server to another server. It is a one kind of high availability feature of SQL Server.</p>
<p>You can use log shipping to send transaction logs from one database (the primary database) to another (the secondary database) on a constant basis. Continually backing up the transaction logs from a primary database and then copying and restoring them to a secondary database keeps the secondary database nearly synchronized with the primary database.</p></blockquote>
<p><strong>Would you please explain the basic work of Log Shipping?</strong></p>
<blockquote><p>Log shipping allows you to automatically send transaction log backups from a primary database on a primary server instance to one or more secondary databases on separate secondary server instances. The transaction log backups are applied to each of the secondary databases individually. An optional third server instance, known as the monitor server, records the history and status of backup and restore operations and, optionally, raises alerts if these operations fail to occur as scheduled.</p></blockquote>
<p><strong>What are the main operations involved in Log Shipping?</strong></p>
<ul>
<li>Log shipping consists of three operations:</li>
<li>Back up the transaction log at the primary server instance.</li>
<li>Copy the transaction log file to the secondary server instance.</li>
<li>Restore the log backup on the secondary server instance.</li>
</ul>
<p><strong>Does Log Shipping support automatic failover?</strong></p>
<blockquote><p>A log shipping configuration does not automatically fail over from the primary server to the secondary server. If the primary database becomes unavailable, any of the secondary databases can be brought online manually.</p></blockquote>
<p><strong>Can we use a secondary database as Reporting purpose?</strong></p>
<blockquote><p>Yes: we can use a secondary database for reporting purpose.</p></blockquote>
<p><strong>What is a Primary server or database in Log Shipping?</strong></p>
<blockquote><p>The primary server in a log shipping configuration is the instance of the SQL Server Database Engine that is your production server. The primary database is the database on the primary server that you want to back up to another server. All administration of the log shipping configuration through SQL Server Management Studio is performed from the primary database.</p></blockquote>
<p><strong>Can I apply Simple Recovery Model to Parimary database of Log Shipping?</strong></p>
<blockquote><p>No:The primary database must use the full or bulk-logged recovery model; switching the database to simple recovery will cause log shipping to stop functioning.</p></blockquote>
<p><strong>What is a Secondary server or database in Log Shipping?</strong></p>
<blockquote><p>The secondary server in a log shipping configuration is the server where you want to keep a warm standby copy of your primary database. A secondary server can contain backup copies of databases from several different primary servers.</p>
<p>One single Secondary server could be used for multiple primary server.</p>
<p>The secondary database must be initialized by restoring a full backup of the primary database. The restore can be completed using either the NORECOVERY or STANDBY option.</p></blockquote>
<p><strong>What do you know about the Monitor Server of Log Shipping?</strong></p>
<blockquote><p>This is an optional server which tracks all of the details of log shipping.</p>
<p>Details like:</p>
<ul>
<li>When the transaction log on the primary database was last backed up.</li>
<li>When the secondary servers last copied and restored the backup files.</li>
<li>Information about any backup failure alerts.</li>
<li>Another important thing is,</li>
<li>Once the monitor server has been configured, it cannot be changed without removing log shipping first.</li>
</ul>
</blockquote>
<p><strong>What kind of different SQL Jobs involved in Log Shipping Operations?</strong></p>
<blockquote><p>Log shipping involves four jobs, which are handled by dedicated SQL Server Agent jobs. These jobs include the backup job, copy job, restore job, and alert job.</p>
<p>The basic work of these jobs is, How frequently log backups are taken, how frequently they are copied to each secondary server, and how frequently they are applied to the secondary database.</p></blockquote>
<p><strong>What is the main use of Backup Job?</strong></p>
<blockquote><p>When log shipping is enabled, the SQL Server Agent job category &#8220;Log Shipping Backup&#8221; is created on the primary server instance.</p>
<p>A backup job is created on the primary server instance for each primary database. It performs the backup operation, logs history to the local server and the monitor server, and deletes old backup files and history information. By default, this job will run every 15 minutes, but the interval is customizable.</p></blockquote>
<p><strong>What is the main use of Copy Job?</strong></p>
<blockquote><p>When log shipping is enabled, the SQL Server Agent job category &#8220;Log Shipping Copy&#8221; is created on the secondary server instance.</p>
<p>A copy job is created on each secondary server instance in a log shipping configuration. This job copies the backup files from the primary server to a configurable destination on the secondary server and logs history on the secondary server and the monitor server. The copy job schedule, which is customizable, should approximate the backup schedule.</p></blockquote>
<p><strong>What is the main task of Restore Job?</strong></p>
<ul>
<li>The SQL Server job category &#8220;Log Shipping Restore&#8221; is created on the secondary server instance when log shipping is enabled.</li>
<li>A restore job is created on the secondary server instance for each log shipping configuration. This job restores the copied backup files to the secondary databases. It logs history on the local server and the monitor server, and deletes old files and old history information.</li>
<li>Scheduling these jobs with the same frequency keeps the secondary database as closely aligned with the primary database as possible to create a warm standby database.</li>
</ul>
<p><strong>What is the main use of Agent Job?</strong></p>
<blockquote><p>If a monitor server is used, an alert job is created on the monitor server instance. This alert job is shared by the primary and secondary databases of all log shipping configurations using this monitor server instance.</p>
<p>This job raises alerts (for which you must specify alert numbers) for primary and secondary databases when backup and restore operations have not completed successfully within specified thresholds.</p></blockquote>
<p><strong>Do you know what is the default time interval in Log Shipping?</strong></p>
<blockquote><p>It is 15 minutes.</p></blockquote>
<p><strong>What is the solution of the below error?</strong></p>
<p><strong>&#8220;Error: The restore operation cannot proceed because the secondary database ‘&lt;Database Name&gt;’ is not in NORECOVERY/STANDBY mode.(Microsoft.SqlServer.Management.LogShipping)&#8221;</strong></p>
<blockquote><p>Restore the secondary database with the full backup of the primary database with NORECOVERY and REPLACE option.</p></blockquote>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
