<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Windows script for a DB2 backup</title>
	<atom:link href="http://www.berthou.com/us/2008/01/10/windows-script-for-a-db2-backup/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.berthou.com/us/2008/01/10/windows-script-for-a-db2-backup/</link>
	<description>A french developper blog</description>
	<lastBuildDate>Mon, 29 Jul 2019 12:19:27 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5</generator>
	<item>
		<title>By: Dave Jong A Lock</title>
		<link>http://www.berthou.com/us/2008/01/10/windows-script-for-a-db2-backup/comment-page-1/#comment-244</link>
		<dc:creator>Dave Jong A Lock</dc:creator>
		<pubDate>Mon, 19 May 2014 14:12:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.berthou.com/us/2008/01/10/windows-script-for-a-db2-backup/#comment-244</guid>
		<description><![CDATA[Wow!!! Great script ...

Thanks a million.]]></description>
		<content:encoded><![CDATA[<p>Wow!!! Great script &#8230;</p>
<p>Thanks a million.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jais</title>
		<link>http://www.berthou.com/us/2008/01/10/windows-script-for-a-db2-backup/comment-page-1/#comment-150</link>
		<dc:creator>jais</dc:creator>
		<pubDate>Fri, 20 Jan 2012 08:36:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.berthou.com/us/2008/01/10/windows-script-for-a-db2-backup/#comment-150</guid>
		<description><![CDATA[plz any one can provide restore command to restore DB2 dumps in window]]></description>
		<content:encoded><![CDATA[<p>plz any one can provide restore command to restore DB2 dumps in window</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nagappan</title>
		<link>http://www.berthou.com/us/2008/01/10/windows-script-for-a-db2-backup/comment-page-1/#comment-140</link>
		<dc:creator>Nagappan</dc:creator>
		<pubDate>Thu, 29 Sep 2011 11:30:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.berthou.com/us/2008/01/10/windows-script-for-a-db2-backup/#comment-140</guid>
		<description><![CDATA[Im trying with this.. meantime can i have script for without closing connections\ online backup.]]></description>
		<content:encoded><![CDATA[<p>Im trying with this.. meantime can i have script for without closing connections\ online backup.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mariano Corral</title>
		<link>http://www.berthou.com/us/2008/01/10/windows-script-for-a-db2-backup/comment-page-1/#comment-128</link>
		<dc:creator>Mariano Corral</dc:creator>
		<pubDate>Fri, 13 May 2011 14:25:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.berthou.com/us/2008/01/10/windows-script-for-a-db2-backup/#comment-128</guid>
		<description><![CDATA[I tried to code a script file inspired by yours, but found no set of db2cmd options able to make this work:
db2cmd /c /w /i db2 -v CONNECT TO sample
db2cmd /c /w /i db2 -v prune history %delmax% and delete
db2cmd /c /w /i db2 -v CONNECT RESET
db2cmd /c /w /i db2 -v TERMINATE

Apparently, each db2cmd command opens a new DB2 Command Window, run the db2 command in it and then closes it. This way, the second (running PRUNE HISTORY) does no longer find a connection to &quot;sample&quot; database, since CONNECT ran in a different DB2 Command Window.

Tried with just the /i option, but even this didn&#039;t work. I tested different option combinations, but none left the connection to DB2 opened for the second execution. Finally, I desisted to code this way, as there were two alternatives:

1 - Run db2cmd once, using a file. The script follows this when it executes the file sample_backup.db2

2 - Open a DB2 Command Window and run the CMD script there. This CMD should not use db2cmd, just db2.
For instance, the command below opens a DB2 Command Window and executes the myscript.cmd inside it.
db2cmd /c /w /i myscript.cmd

Inside myscript, the above CLP commands must be written this way (no db2cmd, just db2):
db2 -v CONNECT TO sample
db2 -v prune history %delmax% and delete
db2 -v CONNECT RESET
db2 -v TERMINATE

Best regards,
Mariano Corral]]></description>
		<content:encoded><![CDATA[<p>I tried to code a script file inspired by yours, but found no set of db2cmd options able to make this work:<br />
db2cmd /c /w /i db2 -v CONNECT TO sample<br />
db2cmd /c /w /i db2 -v prune history %delmax% and delete<br />
db2cmd /c /w /i db2 -v CONNECT RESET<br />
db2cmd /c /w /i db2 -v TERMINATE</p>
<p>Apparently, each db2cmd command opens a new DB2 Command Window, run the db2 command in it and then closes it. This way, the second (running PRUNE HISTORY) does no longer find a connection to &#8220;sample&#8221; database, since CONNECT ran in a different DB2 Command Window.</p>
<p>Tried with just the /i option, but even this didn&#8217;t work. I tested different option combinations, but none left the connection to DB2 opened for the second execution. Finally, I desisted to code this way, as there were two alternatives:</p>
<p>1 &#8211; Run db2cmd once, using a file. The script follows this when it executes the file sample_backup.db2</p>
<p>2 &#8211; Open a DB2 Command Window and run the CMD script there. This CMD should not use db2cmd, just db2.<br />
For instance, the command below opens a DB2 Command Window and executes the myscript.cmd inside it.<br />
db2cmd /c /w /i myscript.cmd</p>
<p>Inside myscript, the above CLP commands must be written this way (no db2cmd, just db2):<br />
db2 -v CONNECT TO sample<br />
db2 -v prune history %delmax% and delete<br />
db2 -v CONNECT RESET<br />
db2 -v TERMINATE</p>
<p>Best regards,<br />
Mariano Corral</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: The MAW</title>
		<link>http://www.berthou.com/us/2008/01/10/windows-script-for-a-db2-backup/comment-page-1/#comment-75</link>
		<dc:creator>The MAW</dc:creator>
		<pubDate>Thu, 18 Feb 2010 13:21:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.berthou.com/us/2008/01/10/windows-script-for-a-db2-backup/#comment-75</guid>
		<description><![CDATA[Finally!  A concise and working example for Windows.  

Thank you so much.]]></description>
		<content:encoded><![CDATA[<p>Finally!  A concise and working example for Windows.  </p>
<p>Thank you so much.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
