<?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>Edwin M Sarmientolog shipping &#8211; Edwin M Sarmiento</title>
	<atom:link href="https://www.edwinmsarmiento.com/category/log-shipping/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.edwinmsarmiento.com</link>
	<description>Intentional Excellence</description>
	<lastBuildDate>Mon, 13 Apr 2026 21:00:49 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
<site xmlns="com-wordpress:feed-additions:1">84283043</site>		<item>
		<title>Why People and Processes Matter More Than Technology</title>
		<link>https://www.edwinmsarmiento.com/why-people-and-processes-matter/</link>
		<comments>https://www.edwinmsarmiento.com/why-people-and-processes-matter/#respond</comments>
		<pubDate>Thu, 06 Aug 2015 00:20:53 +0000</pubDate>
		<dc:creator>Edwin M Sarmiento</dc:creator>
				<category><![CDATA[log shipping]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[PPT manifesto]]></category>
		<category><![CDATA[SQL Server log shipping]]></category>
		<guid isPermaLink="false">http://bassplayerdoc.wordpress.com/?p=636</guid>

				<description><![CDATA[Almost 8 years ago, I wrote a blog post about what I call the poor man&#8217;s SQL Server log shipping. In it, I outlined the process of how log shipping works. This became the basis of the chapter I wrote for the SQL Server MVP Deep Dives Volume 1 book. What&#8217;s interesting is that while I wrote [&#8230;]]]></description>
					<content:encoded><![CDATA[<p>Almost 8 years ago, I wrote a blog post about what I call the <a href="https://www.edwinmsarmiento.com/your-poor-mans-sql-server-log-shipping/" target="_blank">poor man&#8217;s SQL Server log shipping</a>. In it, I outlined the process of how log shipping works. This became the basis of the chapter I wrote for the <a href="http://www.manning.com/nielsen/" target="_blank">SQL Server MVP Deep Dives</a> Volume 1 book. What&#8217;s interesting is that while I wrote the content with SQL Server 2000 in mind, the concepts and the principles behind the process still apply up to SQL Server 2014. I recently had a customer who wanted to move their existing database server from SQL Server 2000 to SQL Server 2008 R2 with minimal downtime. The only option was to implement log shipping because of the size of the database. However, there are a few restrictions.</p>
<ul>
<li>We can&#8217;t change the SQL Server service account on the current production environment because it will require a service restart</li>
<li>Log shipping between SQL Server 2000 and SQL Server 2008 R2 is not supported out-of-the-box. We do not have the appropriate wizards and stored procedures  that we can use to configure log shipping between these two versions</li>
</ul>
<p>Given the restrictions, it&#8217;s easy to just give up on the option to use log shipping. But isn&#8217;t log shipping just an automated backup-copy-restore process? As long as the source can run log backups and the destination can copy and restore those generated backups without breaking the log sequence, I don&#8217;t see any reason why it can&#8217;t be done. But every once in a while, I get asked about my approach and how it could possibly work.</p>
<ul>
<li><strong>This can&#8217;t be a disaster recovery solution</strong>. I didn&#8217;t say it is. In fact, it&#8217;s a one-way traffic because the database schema between the two versions are different. Once you failover to the higher version, there is no turning back. This approach is ideal for doing version upgrades on different hardware while minimizing downtime. If you are dealing with the same version of SQL Server, I don&#8217;t see any reason why you would use this approach because the wizards and the stored procedures are available for you to use.</li>
<li><strong>I don&#8217;t have a domain account</strong>. I used to think that I needed a domain account to implement log shipping. It is recommended as a best practice but not necessary. This means that two SQL Server instances can be on a workgroup and still be configured for log shipping. How?
<ul>
<li>Configure the SQL Server service account (database engine and agent) to use a local Windows account.</li>
<li>Create the same local Windows account (with the same password and permissions) on the machines participating as standby servers for a log shipping configuration.</li>
<li>Use the same account for the SQL Server service account on all machines.</li>
</ul>
</li>
<li><strong>We don&#8217;t have a DBA</strong>. That&#8217;s where I come in. <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></li>
</ul>
<p>My point is that the reason why I was able to recommend this solution to customers is because I understand the principles and concepts involved in the process. It&#8217;s easy to focus our attention on technology solutions instead of the processes and people involved to get the job done. And this is the reason I coined the <strong>PPT</strong> methodology &#8211; people, process and technology. I&#8217;ve used this methodology a lot in high availability and disaster recovery projects but it pretty much applies to just about any aspect in life &#8211; finding a job, planning a vacation, etc. Technology is just there to complement what we &#8211; the people &#8211; can accomplish by defining the processes that we need to follow to accomplish a goal. Besides, we need to stop looking at constraints as a limitation but rather as an opportunity for creativity.</p>
]]></content:encoded>
			

		<wfw:commentRss>https://www.edwinmsarmiento.com/why-people-and-processes-matter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
				<post-id xmlns="com-wordpress:feed-additions:1">636</post-id>	</item>
		<item>
		<title>Your poor man&#8217;s SQL Server log shipping-PowerShell version</title>
		<link>https://www.edwinmsarmiento.com/your-poor-mans-sql-server-log-shipping-powershell-version/</link>
		<comments>https://www.edwinmsarmiento.com/your-poor-mans-sql-server-log-shipping-powershell-version/#comments</comments>
		<pubDate>Sat, 01 May 2010 14:18:00 +0000</pubDate>
		<dc:creator>Edwin M Sarmiento</dc:creator>
				<category><![CDATA[log shipping]]></category>
		<category><![CDATA[modify SQL Server logins]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[SQL Server]]></category>
		<guid isPermaLink="false">http://bassplayerdoc.wordpress.com/2010/05/01/your-poor-mans-sql-server-log-shipping-powershell-version</guid>

				<description><![CDATA[In 2008, I was privileged to be a part of a project to write a chapter for a book that was for a good cause. SQL Server MVP Deep Dives became an avenue for a lot of the SQL Server MVPs to share their expertise for the benefit of not just the technical community but [&#8230;]]]></description>
					<content:encoded><![CDATA[<p><span style="font-family: arial;">In 2008, I was privileged to be a part of a project to write a chapter for a book that was for a good cause. </span><a href="http://www.manning.com/nielsen/"><span style="font-family: arial;">SQL Server MVP Deep Dives</span></a><span style="font-family: arial;"> became an avenue for a lot of the SQL Server MVPs to share their expertise for the benefit of not just the technical community but of the beneficiary.</span></p>
<p><span style="font-family: Arial;">I wrote a chapter for the book based on this <a href="https://www.edwinmsarmiento.com/your-poor-mans-sql-server-log-shipping/" target="_blank">blog post</a> some three years ago and one of the recommendations I did was to convert the VBScript scripts to Windows PowerShell. So, here it is.</span></p>
<p><span style="font-family: Arial;">I&#8217;ve converted the VBScript that does the checking of the folders containing my latest LOG backups and restoring them in NORECOVERY mode to Windows PowerShell. What is fascinating is the fact that if the process I&#8217;ve outlined in the blog post is followed thru, adding another database to be configured for log shipping was as easy as creating regular LOG backups via TSQL scripts or database maintenance plans &#8211; no need to add an entry for every database that will be configured. How cool was that?</span></p>
<p><span style="font-family: Arial;">So, here&#8217;s the Windows PowerShell version of the custom restore LOG backup command</span></p>
<p><code style="font-size: 12px;"><span style="color: black;">$logBackupFolder</span><span style="color: blue;">=</span><span style="color: darkred;">"your LOG backup location here or a parameter variable"</p>
<p></span><span style="color: black;">##Variable </span><span style="color: blue;">for </span><span style="color: black;">time duration </span><span style="color: gray;">- </span><span style="color: black;">the amount of time you need to generate and restore LOG backups<br />
$1HourOld </span><span style="color: blue;">= </span><span style="color: black;">[DateTime]</span><span style="color: gray;">::</span><span style="color: black;">Now.AddHours</span><span style="color: gray;">(-</span><span style="color: black;">1</span><span style="color: gray;">)</p>
<p></span><span style="color: black;">##Retrieve folders and files </span><span style="color: blue;">in </span><span style="color: black;">the specified directory<br />
</span><span style="color: blue;">foreach </span><span style="color: gray;">(</span><span style="color: black;">$databaseName </span><span style="color: blue;">in </span><span style="color: gray;">(</span><span style="color: black;">Get</span><span style="color: gray;">-</span><span style="color: black;">ChildItem $logBackupFolder </span><span style="color: gray;">| </span><span style="color: black;">Where { $_.PsIsContainer }</span><span style="color: gray;">) )<br />
</span><span style="color: black;">{<br />
</span><span style="color: blue;">foreach </span><span style="color: gray;">(</span><span style="color: black;">$logName </span><span style="color: blue;">in </span><span style="color: gray;">(</span><span style="color: black;">Get</span><span style="color: gray;">-</span><span style="color: black;">ChildItem $logBackupFolder$databasename </span><span style="color: gray;">| </span><span style="color: black;">where {</span><span style="color: gray;">(</span><span style="color: black;">$_.CreationTime </span><span style="color: gray;">-</span><span style="color: black;">ge $1HourOld</span><span style="color: gray;">) -</span><span style="color: black;">and </span><span style="color: gray;">(</span><span style="color: black;">$_.Extension </span><span style="color: gray;">-</span><span style="color: black;">eq </span><span style="color: darkred;">".trn"</span><span style="color: gray;">)</span><span style="color: black;">} SELECT name</span><span style="color: gray;">))<br />
</span><span style="color: black;">{</p>
<p>$logBackupPath </span><span style="color: blue;">= </span><span style="color: black;">[System.String]</span><span style="color: gray;">::</span><span style="color: black;">Concat</span><span style="color: gray;">(</span><span style="color: darkred;">"'$logBackupFolder"</span><span style="color: gray;">,</span><span style="color: black;">$databasename</span><span style="color: gray;">,</span><span style="color: darkred;">""</span><span style="color: gray;">,</span><span style="color: black;">$logName.Name</span><span style="color: gray;">,</span><span style="color: darkred;">"'"</span><span style="color: gray;">)<br />
</span><span style="color: black;">$restoreSQL </span><span style="color: blue;">= </span><span style="color: darkred;">"RESTORE LOG $databaseName FROM DISK=$logBackupPath WITH NORECOVERY" </span><span style="color: gray;">| </span><span style="color: black;">Out</span><span style="color: gray;">-</span><span style="color: black;">File D:$databaseName.sql</p>
<p>Invoke</span><span style="color: gray;">-</span><span style="color: black;">Expression </span><span style="color: darkred;">"osql.exe -SYourSQLServerInstanceHere -E -iD:$databaseName.sql"</p>
<p></span><span style="color: black;">}<br />
}<br />
</span></code></p>
<p><span style="font-family: Arial;">You might be wondering why I am using osql.exe instead of sqlcmd.exe. Well, it&#8217;s still there even if you have SQL Server 2008. Which means this script will work even for SQL Server 2000 instances as long as you install Windows PowerShell on the machine running SQL Server.</span></p>
<p><span style="font-family: Arial;">And all of that for a mere 17-liner script. I could write it even less than that but I&#8217;m a big fan of script readability. Now, that&#8217;s a good enough reason to dig deeper on what Windows PowerShell has to offer</span></p>
<div class="blogger-post-footer"><img alt="" width="1" height="1" /></div>
]]></content:encoded>
			

		<wfw:commentRss>https://www.edwinmsarmiento.com/your-poor-mans-sql-server-log-shipping-powershell-version/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
				<post-id xmlns="com-wordpress:feed-additions:1">213</post-id>	</item>
	</channel>
</rss>