<?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>Kiss Note &#187; db2</title>
	<atom:link href="http://kissnote.com/tags/db2/feed/" rel="self" type="application/rss+xml" />
	<link>http://kissnote.com</link>
	<description>Keep IT Simple and Stupid</description>
	<lastBuildDate>Mon, 17 May 2010 17:19:06 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>db2 geeks &#8211; we do everything by typing commands</title>
		<link>http://kissnote.com/2009/06/15/db2-geeks-we-do-everything-by-typing-commands/#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed</link>
		<comments>http://kissnote.com/2009/06/15/db2-geeks-we-do-everything-by-typing-commands/#comments</comments>
		<pubDate>Mon, 15 Jun 2009 21:50:45 +0000</pubDate>
		<dc:creator>shengjie</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[db2]]></category>

		<guid isPermaLink="false">http://kissnote.com/?p=140</guid>
		<description><![CDATA[Catalog remote node catalog tcpip node db2node remote hostname server service_name uncatalog node db2node Catalog remote DB2 databases catalog database db_name as alias_name at node db2node uncatalog database dbname List all odbc data sources list system/user odbc data sources catalog/uncatalog system/user odbc data source &#60;data source name&#62; connect to database user name using password Run [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Catalog remote node</strong></p>
<p>catalog tcpip node db2node remote hostname server service_name</p>
<p>uncatalog node db2node<br />
<strong><br />
Catalog remote DB2 databases</strong></p>
<p>catalog database db_name as alias_name at node db2node</p>
<p>uncatalog database dbname</p>
<p><strong>List all odbc data sources</strong></p>
<p>list system/user odbc data sources</p>
<p>catalog/uncatalog system/user odbc data source &lt;data source name&gt;</p>
<p>connect to database user name using password</p>
<p><strong>Run sql scripts</strong></p>
<p>To run a script, enter the following command:</p>
<p>db2 -f script_name -o -t -z log_name</p>
<p>db2 –tvf script_name</p>
<p><strong>Describe Table Schema</strong></p>
<p>Describe table &lt;table_name&gt;</p>
<p><strong>Describe Table Indexes</strong></p>
<p>Describe indexes for table &lt;table_name&gt;</p>
<p><strong>Create Index</strong></p>
<p>Create index &lt;index_name&gt; on &lt;table_name&gt;(field1, field2….)</p>
<p>Create unique index &lt;index_name&gt; on &lt;table_name&gt;(field1, field2….) include (field3, field4….) ALLOW REVERSE SCANS COLLECT SAMPLED DETAILED STATISTICS</p>
<p><strong>Drop Index</strong></p>
<p>Drop index &lt;index_name&gt;</p>
<p><strong>Instance-level commands(CREATE DATABASE and FORCE APPLICATION)</strong></p>
<p>Eg.Reslove the table lock</p>
<p>attach to nodename user user name using password</p>
<p>list applications</p>
<p>force application (appid1, appid2)</p>
<p>OR</p>
<p>db2 attach to $DB2INSTANCE</p>
<p>db2 force application all</p>
<p>db2 detach</p>
]]></content:encoded>
			<wfw:commentRss>http://kissnote.com/2009/06/15/db2-geeks-we-do-everything-by-typing-commands/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
