<?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>Sanoop Kuniel&#039;s Blog &#187; AIX</title>
	<atom:link href="http://www.kuniel.net/tags/aix/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.kuniel.net</link>
	<description>Skill is successfully walking a tightrope over Niagara Falls. Intelligence is not trying.</description>
	<lastBuildDate>Sun, 25 Sep 2011 13:47:03 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>DB2 restore with rollforward</title>
		<link>http://www.kuniel.net/2009/09/29/db2-restore-with-rollforward/</link>
		<comments>http://www.kuniel.net/2009/09/29/db2-restore-with-rollforward/#comments</comments>
		<pubDate>Tue, 29 Sep 2009 09:50:47 +0000</pubDate>
		<dc:creator>Sanoop Kuniel</dc:creator>
				<category><![CDATA[AIX]]></category>
		<category><![CDATA[Articles]]></category>
		<category><![CDATA[DB2]]></category>

		<guid isPermaLink="false">http://www.kuniel.net/2009/09/29/db2-restore-with-rollforward/</guid>
		<description><![CDATA[I recently had a few problem trying to restore a DB2 online compressed backup from one AIX machine to another.&#160;
I thought it would have been a simple process as saying

db2 restore db MYDB from /home/user/backup

which worked fine, Untill i tried to connect to the database. That is when i got the error

db2 => connect to [...]]]></description>
			<content:encoded><![CDATA[<p>I recently had a few problem trying to restore a DB2 online compressed backup from one AIX machine to another.&nbsp;</p>
<p>I thought it would have been a simple process as saying</p>
<p>
<div class="codesnip-container" >db2 restore db MYDB from /home/user/backup</div>
</p>
<p>which worked fine, Untill i tried to connect to the database. That is when i got the error</p>
<p>
<div class="codesnip-container" >db2 => connect to MYDB<br />
 SQL1117N  A connection to or activation of database &#8220;AM2&#8243; cannot be made<br />
 because of ROLL-FORWARD PENDING.  SQLSTATE=57019</div>
</p>
<p>So i tried searching for a solution and tried everything i could.</p>
<p>
<div class="codesnip-container" >db2 => rollforward db MYDB to end of logs and stop<br />
 SQL4970N  Roll-forward recovery on database &#8220;MYDB&#8221; cannot reach the specifiedstop point (end-of-log or point-in-time) because of missing or corrupted log<br />
 file(s) on database partition(s) &#8220;0&#8243;. Roll-forward recovery processing has<br />
 halted on log file &#8220;S0001797.LOG&#8221;.<br />
 db2 => rollforward db MYDB complete<br />
 SQL1276N  Database &#8220;MYDB&#8221; cannot be brought out of rollforward pending state<br />
 until roll-forward has passed a point in time greater than or equal to<br />
 &#8220;2009-09-25-06.39.04.000000 UTC&#8221;, because node &#8220;0&#8243; contains information later<br />
 than the specified time.<br />
  db2 => rollforward db MYDB to 2009-09-25-06.39.04.000000 and stop<br />
 SQL1274N  The database &#8220;MYDB&#8221; requires roll-forward recovery and the<br />
 point-in-time must be to the end of logs.<br />
  db2 => rollforward db MYDB query status</p>
<p>                                  Rollforward Status</p>
<p>  Input database alias                   = MYDB<br />
  Number of nodes have returned status   = 1</p>
<p>  Node number                            = 0<br />
  Rollforward status                     = DB  working<br />
  Next log file to be read               = S0001797.LOG<br />
  Log files processed                    = S0001795.LOG &#8211; S0001796.LOG<br />
  Last committed transaction             = 2009-09-25-06.39.04.000000 UTC</p></div>
<p> </p>
<p>To cut it short this is what i did to fix it. </p>
<p>
<div class="codesnip-container" >db2 => restore db MYDB from /home/db2inst1/OSOL logtarget /tmp<br />
 DB20000I  The RESTORE DATABASE command completed successfully.</p>
<p> db2 => rollforward db MYDB to end of logs and stop overflow log path (/tmp) noretrieve</p>
<p>                                  Rollforward Status</p>
<p>  Input database alias                   = MYDB<br />
  Number of nodes have returned status   = 1</p>
<p>  Node number                            = 0<br />
  Rollforward status                     = not pending<br />
  Next log file to be read               =<br />
  Log files processed                    = S0001795.LOG &#8211; S0001799.LOG<br />
  Last committed transaction             = 2009-09-25-06.39.04.000000 UTC</p>
<p> DB20000I  The ROLLFORWARD command completed successfully.<br />
 db2 => connect to MYDB</p>
<p>    Database Connection Information</p>
<p>  Database server        = DB2/AIX64 9.1.4<br />
  SQL authorization ID   = DB2INST1<br />
  Local database alias   = MYDB</p></div>
<p> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.kuniel.net/2009/09/29/db2-restore-with-rollforward/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

