<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>I am vistababa!</title>
	<atom:link href="http://vistababa.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://vistababa.wordpress.com</link>
	<description></description>
	<lastBuildDate>Fri, 28 Oct 2011 18:08:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='vistababa.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>I am vistababa!</title>
		<link>http://vistababa.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://vistababa.wordpress.com/osd.xml" title="I am vistababa!" />
	<atom:link rel='hub' href='http://vistababa.wordpress.com/?pushpress=hub'/>
		<item>
		<title>How to Change the Timezone in Linux?</title>
		<link>http://vistababa.wordpress.com/2010/07/19/how-to-change-the-timezone-in-linux/</link>
		<comments>http://vistababa.wordpress.com/2010/07/19/how-to-change-the-timezone-in-linux/#comments</comments>
		<pubDate>Mon, 19 Jul 2010 11:06:33 +0000</pubDate>
		<dc:creator>Vistababa</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[date]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[timezone]]></category>

		<guid isPermaLink="false">http://vistababa.wordpress.com/?p=528</guid>
		<description><![CDATA[Most modern Linux distributions have user-friendly programs to set the timezone, often accessible through the program menus or right-clicking the clock in a desktop environment such as KDE or GNOME. Failing that it&#8217;s possible to manually change the system timezone in Linux in a few short steps. 1. Logged in as root. Check which timezone [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vistababa.wordpress.com&amp;blog=4978554&amp;post=528&amp;subd=vistababa&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Most modern Linux distributions have user-friendly programs to set the timezone, often accessible through the program menus or right-clicking the clock in a desktop environment such as KDE or GNOME. Failing that it&#8217;s possible to manually change the system timezone in Linux in a few short steps.</p>
<p>1. Logged in as root. Check which timezone your machine is currently using by executing `date`:</p>
<pre>Mon 17 Jan 2005 12:15:08 PM PST</pre>
</p>
<p>PST in this case is the current timezone.</p>
<p>2. Change to the directory /usr/share/zoneinfo. Here you will find a list of time zone regions. Choose the most appropriate region. For example if you live in Canada or the US this directory is the &#8220;America&#8221; directory.</p>
<p>3. If you wish, backup the previous timezone configuration by renaming it:</p>
<pre># mv /etc/localtime /etc/localtime.old</pre>
</p>
<p>4. Create a symbolic link to the appropriate timezone from /etc/localtime. Example:</p>
<pre># ln -sf /usr/share/zoneinfo/Asia/Tehran /etc/localtime</pre>
</p>
<p>5. Set the TIMEZONE, HWCLOCK entries in the file /etc/sysconfig/clock file to the appropriate values:</p>
<pre>TIMEZONE="Asia/Tehran"
HWCLOCK="--localtime"</pre>
</p>
<p>6. Set the hardware clock:</p>
<pre># hwclock --localtime</pre>
</p>
<p><span style="color:#ff0000;">Reference:</span> <a title="How to Change the Timezone in Linux?" href="http://www.wikihow.com/Change-the-Timezone-in-Linux" target="_blank">How to Change the Timezone in Linux</a></p>
<br />Filed under: <a href='http://vistababa.wordpress.com/category/uncategorized/'>Uncategorized</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/vistababa.wordpress.com/528/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/vistababa.wordpress.com/528/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/vistababa.wordpress.com/528/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/vistababa.wordpress.com/528/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/vistababa.wordpress.com/528/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/vistababa.wordpress.com/528/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/vistababa.wordpress.com/528/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/vistababa.wordpress.com/528/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/vistababa.wordpress.com/528/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/vistababa.wordpress.com/528/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/vistababa.wordpress.com/528/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/vistababa.wordpress.com/528/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/vistababa.wordpress.com/528/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/vistababa.wordpress.com/528/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vistababa.wordpress.com&amp;blog=4978554&amp;post=528&amp;subd=vistababa&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://vistababa.wordpress.com/2010/07/19/how-to-change-the-timezone-in-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ab73c548f6f278523ea1d6417bb6883e?s=96&#38;d=http%3A%2F%2Fs0.wp.com%2Fi%2Fmu.gif" medium="image">
			<media:title type="html">vistababa</media:title>
		</media:content>
	</item>
		<item>
		<title>LVMRECNMTCH problem during varyonvg on AIX</title>
		<link>http://vistababa.wordpress.com/2010/07/08/lvmrecnmtch-problem-during-varyonvg-on-aix/</link>
		<comments>http://vistababa.wordpress.com/2010/07/08/lvmrecnmtch-problem-during-varyonvg-on-aix/#comments</comments>
		<pubDate>Thu, 08 Jul 2010 08:28:29 +0000</pubDate>
		<dc:creator>Vistababa</dc:creator>
				<category><![CDATA[AIX Errors]]></category>
		<category><![CDATA[AIX LVM]]></category>
		<category><![CDATA[aix]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[LVMRECNMTCH]]></category>
		<category><![CDATA[varyonvg]]></category>

		<guid isPermaLink="false">http://vistababa.wordpress.com/?p=516</guid>
		<description><![CDATA[Have you ever encountered the following error on AIX? # varyonvg testvg PV Status: hdisk1 000af0ffc5f038cb PVACTIVE            hdisk2 000af0ffc254e591 LVMRECNMTCH 0516-056 varyonvg: The volume group is not varied on because a physical volume is marked missing. Run diagnostics. In my case, the testvg had two disks and all the filesystems were mirrored. So, a copy of [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vistababa.wordpress.com&amp;blog=4978554&amp;post=516&amp;subd=vistababa&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Have you ever encountered the following error on AIX?</p>
<pre># varyonvg testvg
PV Status: hdisk1 000af0ffc5f038cb PVACTIVE
           hdisk2 000af0ffc254e591 LVMRECNMTCH
0516-056 varyonvg: The volume group is not varied on because
a physical volume is marked missing. Run diagnostics.</pre>
</p>
<p>In my case, the testvg had two disks and all the filesystems were mirrored. So, a copy of mirrors on hdisk1 were corrupted. How can we solve this problem? How can we varyonvg and mount the filesystems again?</p>
<p>To varyon the testvg again we just need to force the varyonvg using the following command:</p>
<pre># varyonvg -f testvg</pre>
</p>
<p>Using the -f flag in varyonvg command allows a volume group to be made active that does not currently have a quorum of available disks. All disks that cannot be brought to an active state will be put in a removed state. At least one disk must be available for use in the volume group.</p>
<p>Now that the testvg is varied on we can mount all the filesystems:</p>
<pre># mount -a</pre>
</p>
<p>For mirroring the testvg again, we can use the following scenario:</p>
<pre># unmirrorvg testvg hdisk1 
# reducevg testvg hdisk1
# rmdev -dl hdisk1</pre>
</p>
<p>Now replace the disk drive hdisk1, if it is corrupted,  then let the newly added drive be renamed hdisk1. Then do the following:</p>
<pre># extendvg testvg hdisk1
# mirrorvg testvg</pre></p>
<br />Filed under: <a href='http://vistababa.wordpress.com/category/ibm-aix/aix-errors/'>AIX Errors</a>, <a href='http://vistababa.wordpress.com/category/ibm-aix/aix-lvm/'>AIX LVM</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/vistababa.wordpress.com/516/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/vistababa.wordpress.com/516/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/vistababa.wordpress.com/516/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/vistababa.wordpress.com/516/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/vistababa.wordpress.com/516/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/vistababa.wordpress.com/516/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/vistababa.wordpress.com/516/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/vistababa.wordpress.com/516/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/vistababa.wordpress.com/516/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/vistababa.wordpress.com/516/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/vistababa.wordpress.com/516/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/vistababa.wordpress.com/516/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/vistababa.wordpress.com/516/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/vistababa.wordpress.com/516/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vistababa.wordpress.com&amp;blog=4978554&amp;post=516&amp;subd=vistababa&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://vistababa.wordpress.com/2010/07/08/lvmrecnmtch-problem-during-varyonvg-on-aix/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ab73c548f6f278523ea1d6417bb6883e?s=96&#38;d=http%3A%2F%2Fs0.wp.com%2Fi%2Fmu.gif" medium="image">
			<media:title type="html">vistababa</media:title>
		</media:content>
	</item>
		<item>
		<title>How to get unrestricted root access to HMC?</title>
		<link>http://vistababa.wordpress.com/2010/05/10/how-to-get-root-access-to-hmc/</link>
		<comments>http://vistababa.wordpress.com/2010/05/10/how-to-get-root-access-to-hmc/#comments</comments>
		<pubDate>Mon, 10 May 2010 13:07:40 +0000</pubDate>
		<dc:creator>Vistababa</dc:creator>
				<category><![CDATA[IBM HMC]]></category>
		<category><![CDATA[hmc]]></category>
		<category><![CDATA[hmc root access]]></category>

		<guid isPermaLink="false">http://vistababa.wordpress.com/?p=500</guid>
		<description><![CDATA[Using GUI interface of HMC, you can&#8217;t do everything you like! You just can use predefined features of GUI. For example, you can&#8217;t schedule every commands you want, or you can&#8217;t run a command remotely on clients from HMC, and so on.   In contrast, if you get root access to HMC command line interface, you can do all of these [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vistababa.wordpress.com&amp;blog=4978554&amp;post=500&amp;subd=vistababa&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div>Using GUI interface of HMC, you can&#8217;t do everything you like! You just can use predefined features of GUI. For example, you can&#8217;t schedule every commands you want, or you can&#8217;t run a command remotely on clients from HMC, and so on.</div>
<div> </div>
<div>In contrast, if you get root access to HMC command line interface, you can do all of these and even more. But HMC shell is a restricted shell and you can&#8217;t do these things using this shell!</div>
<div> </div>
<div>But, what can we do? Can we get unrestricted root access to HMC or not? Yes, Off course. We have two option to get this access: the first one is calling IBM support and ask for PE password, the second one is using security holes of HMC!</div>
<div> </div>
<div>In this post I will speak about the second one, getting unrestricted root access to HMC using HMC&#8217;s security holes. It works on 4.x and 5.x, but seems to not work on 6.x and 7.x versions:</div>
</p>
<div>At first you should enable &#8220;Remote command Execution&#8221; feature on HMC. This feature is used to access to the HMC using the rexec or ssh facilities. You can enable this feature from &#8220;System Configuration&#8221; applications of HMC.</div>
<div> </div>
<div>Then, after enabling &#8220;Remote Command Execution&#8221; feature, connect to the HMC using <strong>ssh</strong> command and <strong>hscroot</strong> user.</div>
<div> </div>
<div>Finally, to get the unrestricted root access, run the following command:</div>
<div> </div>
<div>1. Run <strong>man</strong> command and get <strong>more</strong> as module instead of restricted <strong>less:</strong></div>
<div><strong> </strong></div>
<div>hscroot@HMC1:~&gt; man -P /bin/more chsysstate</div>
</p>
<div>2. Run shell from man:</div>
<div> </div>
<div>!/bin/bash  (for HMC v4)<br />
!ksh (for HMC v5)</div>
<div> </div>
<div>3. Set PATH:</div>
<div> </div>
<div>hscroot@HMC1:/usr/share/man&gt; export PATH=$PATH:/bin:/usr/bin</div>
<div> </div>
<div>4. Run su command and get unrestricted root access:</div>
<div> </div>
<div>hscroot@HMC1:/usr/share/man&gt; su -</div>
<div><!-- google_ad_section_end -->Password:</div>
<div>HMC1:~ #</div>
</p>
<div>Now, you have the unrestricted root access to HMC and can do everything!</div>
</p>
<div>Note: If you need unrestricted hscroot shell, su to the hscroot from root shell. </div>
</p>
<div>Reference: <a href="http://www.pseriestech.org/forum/tutorials/hmc-unrestricted-root-access-6.html">http://www.pseriestech.org/forum/tutorials/hmc-unrestricted-root-access-6.html</a></div>
<br />Filed under: <a href='http://vistababa.wordpress.com/category/ibm-hmc/'>IBM HMC</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/vistababa.wordpress.com/500/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/vistababa.wordpress.com/500/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/vistababa.wordpress.com/500/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/vistababa.wordpress.com/500/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/vistababa.wordpress.com/500/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/vistababa.wordpress.com/500/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/vistababa.wordpress.com/500/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/vistababa.wordpress.com/500/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/vistababa.wordpress.com/500/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/vistababa.wordpress.com/500/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/vistababa.wordpress.com/500/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/vistababa.wordpress.com/500/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/vistababa.wordpress.com/500/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/vistababa.wordpress.com/500/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vistababa.wordpress.com&amp;blog=4978554&amp;post=500&amp;subd=vistababa&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://vistababa.wordpress.com/2010/05/10/how-to-get-root-access-to-hmc/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ab73c548f6f278523ea1d6417bb6883e?s=96&#38;d=http%3A%2F%2Fs0.wp.com%2Fi%2Fmu.gif" medium="image">
			<media:title type="html">vistababa</media:title>
		</media:content>
	</item>
		<item>
		<title>Using NFS in AIX</title>
		<link>http://vistababa.wordpress.com/2010/01/19/using-nfs-in-aix/</link>
		<comments>http://vistababa.wordpress.com/2010/01/19/using-nfs-in-aix/#comments</comments>
		<pubDate>Tue, 19 Jan 2010 14:38:12 +0000</pubDate>
		<dc:creator>Vistababa</dc:creator>
				<category><![CDATA[AIX Commands]]></category>
		<category><![CDATA[AIX Networking]]></category>
		<category><![CDATA[IBM AIX]]></category>
		<category><![CDATA[mount]]></category>
		<category><![CDATA[nfs]]></category>

		<guid isPermaLink="false">http://vistababa.wordpress.com/?p=480</guid>
		<description><![CDATA[Overview The Networked File System (NFS) is one of a category of filesystems known as distributed filesystems. It allows users to access files resident on remote systems without even knowing that a network is involved and thus allows filesystems to be shared among computers. These remote systems could be located in the same room or [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vistababa.wordpress.com&amp;blog=4978554&amp;post=480&amp;subd=vistababa&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>Overview</strong></p>
<p>The Networked File System (NFS) is one of a category of filesystems known as distributed filesystems. It allows users to access files resident on remote systems without even knowing that a network is involved and thus allows filesystems to be shared among computers. These remote systems could be located in the same room or could be miles away.</p>
<p>In order to access such files, two things must happen. First, the remote system must make the files available to other systems on the network. Second, these files must be mounted on the local system to be able to access them. The mounting process makes the remote files appear as if they are resident on the local system. The system that makes its files available to others on the network is called a server, and the system that uses a remote file is called a client.</p>
<p><strong>NFS Server</strong></p>
<p>NFS consists of a number of components including a mounting protocol, a file locking protocol, an export file and daemons (<em>mountd, nfsd, biod, rpc.lockd, rpc.stad</em>) that coordinate basic file services.</p>
<p>Systems using NFS make the files available to other systems on the network by &#8220;exporting&#8221; their directories to the network. An NFS server exports its directories by putting the names of these directories in the <code>/etc/exports</code> file and executing the <code>exportfs</code> command. In its simplest form, <code>/etc/exports</code> consists of lines of the form:</p>
<p><code>pathname -option, option ...</code></p>
<p>where <em>pathname</em> is the name of the file or directory to which network access is to be allowed; if <em>pathname</em> is a directory, then all of the files and directories below it within the same filesystem are also exported, but not any filesystems mounted within it. The next fields in the entry consist of various options that specify the type of access to be given and to whom. For example, a typical <code>/etc/exports</code> file may look like this:</p>
<pre>/cyclop/users    -access=homer:bart, root=homer
/usr/share/man   -access=marge:maggie:lisa
/usr/mail</pre>
</p>
<p>This export file permits the filesystem <code>/cyclops/users</code> to be mounted by homer and bart, and allows root access to it from <code>homer</code>. In addition, it lets <code>/usr/share/man</code> be mounted by <code>marge</code>, <code>maggie</code> and <code>lisa</code>. The filesystem <code>/usr/mail</code> can be mounted by any system on the network. Filesystems listed in the export file without a specific set of hosts are mountable by all machines. This can be a sizable security hole.</p>
<p>When used with the <code>-a</code> option, the <code>exportfs</code> command reads the <code>/etc/exports</code> file and exports all the directories listed to the network. This is usually done at system startup time.</p>
<p><code># exportfs -a</code></p>
<p>If the contents of <code>/etc/exports</code> change, you must tell <code>mountd</code> to reread it. This can be done by re-executing the <code>exportfs</code> command after the export file is changed.</p>
<p>The exact attributes that can be specified in the <code>/etc/exports</code> file vary from system to system. The most common attributes are:</p>
<p><code>-access=<em>list :</em></code> Colon-separated list of hostnames and netgroups that can mount the filesystem</p>
<p><code>-ro : </code>Export read-only; no clients may write on the filesystem</p>
<p><code>-rw=<em>list : </em></code>List enumerates the hosts allowed to mount for writing; all others must mount read-only.</p>
<p><code>-root=<em>list : </em></code>Lists hosts permitted to access the filesystem as root. Without this option, root access from a client is equivalent to access by the user nobody (usually UID=-2).</p>
<p><code>-anon : </code>Specifies UID that should be used for requests coming from an unknown user. Defaults to nobody.</p>
<p><code>-hostname : </code>Allow hostname to mount the filesystem.</p>
<p>For example:</p>
<pre>/cyclop/users	-rw=moe,anon=-1
/usr/inorganic	-ro</pre>
</p>
<p>This allows <code>moe</code> to mount <code>/cyclop/users</code> for reading and writing, and maps anonymous users (users from other hosts that do not exist on the local system and the root user from any remote system) to the UID=-1. This corresponds to the nobody account, and it tells NFS not to allow such users access to anything. On some systems, the UID=-2 may be used to allow anonymous users access only to world-readable files. The read-only access is referred to as read-mostly.</p>
<p><strong>NFS Clients</strong></p>
<p>After the files, directories and/or filesystems have been exported, an NFS client must explicitly mount them before it can use them. It is handled by the mountd daemon (sometimes called rpc.mountd). The server examines the mount request to be sure the client has proper authorization.</p>
<p>The following syntax is used for the mount command. Note that the server&#8217;s name is followed by a colon and the directory to be mounted:</p>
<pre># mount  server1:/usr/src  /src</pre>
</p>
<p>Here, the directory structure <code>/usr/src</code> resident on the remote system <code>server1</code> is mounted on the <code>/src</code> directory on the local system.</p>
<p>When the remote filesystem is no longer needed, it is unmounted with the <code>umount:</code></p>
<p><code># umount  server1:/usr/src</code></p>
<p>The <code>mount</code> command can be used to establish temporary network mounts, but mounts that are part of a system&#8217;s permanent configuration should be either listed in <code>/etc/filesystems</code> (for AIX) or handled by an automatic mounting service such as <code>automount</code> or <code>amd</code>.</p>
<p><strong>NFS Commands</strong></p>
<p><code><strong>lsnfsexp</strong> : </code>Displays the characteristics of directories that are exported with the NFS</p>
<pre># lsnfsexp
software -ro</pre>
</p>
<p><code><strong>mknfsexp -d path -t ro : </strong></code>Exports a read-only directory to NFS clients and add it to /etc/exports</p>
<pre># mknfsexp -d /software -t ro
/software ro
Exported /software
# lsnfsexp
/software -ro</pre>
</p>
<p><code><strong>rmnfsexp -d path : </strong></code>Unexports a directory from NFS clients and remove it from /etc/exports</p>
<pre># rmnfsexp -d /software
<code><strong> </strong></code></pre>
<p><code><strong>lsnfsmnt</strong></code> : Displays the characteristics of NFS mountable file systems</p>
<p><code><strong>showmount -e</strong> : </code>List exported filesystems </p>
<pre># showmount -e
export list for server:
/software (everyone)
<code><strong> </strong></code></pre>
<p><code><strong>showmount -a</strong> : </code>List hosts that have remotely mounted local systems</p>
<pre># showmount  -a
server2:/sourcefiles
server3:/datafiles 
<strong> </strong></pre>
<p><strong>Start/Stop/Status NFS daemons</strong></p>
<p>In the following discussion, reference to daemon implies any one of the SRC-controlled daemons (such as <code>nfsd</code> or <code>biod</code>).</p>
<p>The NFS daemons can be automatically started at system (re)start by including the <code>/etc/rc.nfs</code> script in the <code>/etc/inittab</code> file.</p>
<p>They can also be started manually by executing the following command:</p>
<p><code># startsrc -s Daemon or startsrc -g nfs</code></p>
<p>where <code>-s</code> option will start the individual daemons and <code>-g</code> will start all of them.</p>
<p>These daemons can be stopped one at a time or all at once by executing the following command:</p>
<p><code># stopsrc -s Daemon or stopsrc -g nfs</code></p>
<p>You can get the current status of these daemons by executing the following commands:</p>
<p><code># lssrc -s Daemon or lssrc -a</code></p>
<p>If the <code>/etc/exports</code> file does not exist, the <code>nfsd</code> and the <code>rpc.mountd</code> daemons will not start. You can get around this by creating an empty<code>/etc/exports</code> file. This will allow the <code>nfsd</code> and the <code>rpc.mountd</code> daemons to start, although no filesystems will be exported.</p>
<p><span style="color:#993300;">References</span>:</p>
<ul>
<li><a href="http://www.ibm.com/developerworks/aix/library/au-net_file.html">Using Network File System in AIX &#8211; a primer</a></li>
<li>man pages of NFS commands</li>
</ul>
<br />Posted in AIX Commands, AIX Networking  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/vistababa.wordpress.com/480/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/vistababa.wordpress.com/480/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/vistababa.wordpress.com/480/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/vistababa.wordpress.com/480/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/vistababa.wordpress.com/480/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/vistababa.wordpress.com/480/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/vistababa.wordpress.com/480/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/vistababa.wordpress.com/480/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/vistababa.wordpress.com/480/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/vistababa.wordpress.com/480/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/vistababa.wordpress.com/480/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/vistababa.wordpress.com/480/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/vistababa.wordpress.com/480/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/vistababa.wordpress.com/480/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vistababa.wordpress.com&amp;blog=4978554&amp;post=480&amp;subd=vistababa&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://vistababa.wordpress.com/2010/01/19/using-nfs-in-aix/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ab73c548f6f278523ea1d6417bb6883e?s=96&#38;d=http%3A%2F%2Fs0.wp.com%2Fi%2Fmu.gif" medium="image">
			<media:title type="html">vistababa</media:title>
		</media:content>
	</item>
		<item>
		<title>How to Change IP, Hostname, Domain and Ports of a single node Oracle E-Business Suite</title>
		<link>http://vistababa.wordpress.com/2009/12/14/how-to-change-ip-hostname-domain-and-ports-of-single-node-oracle-e-business-suite/</link>
		<comments>http://vistababa.wordpress.com/2009/12/14/how-to-change-ip-hostname-domain-and-ports-of-single-node-oracle-e-business-suite/#comments</comments>
		<pubDate>Mon, 14 Dec 2009 11:08:02 +0000</pubDate>
		<dc:creator>Vistababa</dc:creator>
				<category><![CDATA[Oracle E-Business Suite]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[cloning]]></category>
		<category><![CDATA[domain]]></category>
		<category><![CDATA[E-business suite]]></category>
		<category><![CDATA[hostname]]></category>
		<category><![CDATA[ip]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[port]]></category>

		<guid isPermaLink="false">http://vistababa.wordpress.com/?p=462</guid>
		<description><![CDATA[Oracle E-Business Suite is not dependent to IP address, so one can easily change the IP address of nodes without any effect on E-Business Suite. What about Hostname, Domain and Ports? Oracle E-Business Suite is dependent to these. So, we couldn’t change theme without coordination of E-Business Suite itself. There are two methods for changing Hostname, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vistababa.wordpress.com&amp;blog=4978554&amp;post=462&amp;subd=vistababa&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Oracle E-Business Suite is not dependent to IP address, so one can easily change the IP address of nodes without any effect on E-Business Suite.</p>
<p>What about Hostname, Domain and Ports? Oracle E-Business Suite is dependent to these. So, we couldn’t change theme without coordination of E-Business Suite itself.</p>
<p>There are two methods for changing Hostname, Domain and Ports of Oracle E-Business Suite. The first method, that will be discussed here, is using autoconfig and another method is by cloning. It is easier to use autoconfig method to change hostname, domain and ports and use cloning method for changing other configurations of Oracle E-Business Suite.</p>
<p>In this document we assume that our E-Business Suite has just one node so that all Tiers and Servers reside on this node. For changing hostname, domain and ports of a multinode Oracle E-Business Suite, refer to the documents listed in the refrences section of this post.</p>
<p><strong>1.   </strong><strong>DB Tier: Deregister the current database server</strong></p>
<p style="padding-left:30px;">As the database hostname and domain will be changed, the current database server node needs to be de-registered.</p>
<pre style="padding-left:30px;">SQL&gt; select NAME, SERVER_TYPE from FND_APP_SERVERS, FND_NODES</pre>
<pre style="padding-left:30px;">where FND_APP_SERVERS.NODE_ID = FND_NODES.NODE_ID and</pre>
<pre style="padding-left:30px;">SERVER_TYPE='DB' and FND_NODES.NODE_NAME=UPPER('oldhost');</pre>
</p>
<pre style="padding-left:30px;">NAME            SERVER_TYPE</pre>
<pre style="padding-left:30px;">--------------- -----------</pre>
<pre style="padding-left:30px;">oldhost_PROD_DB  DB</pre>
</p>
<pre style="padding-left:30px;"># cd $ORACLE_HOME/appsutil</pre>
<pre style="padding-left:30px;"># perl ./bin/adgentns.pl appspass=&lt;APPSpwd&gt; contextfile=./PROD_oldhost.xml -removeserver</pre>
</p>
<pre style="padding-left:30px;">SQL&gt; select NAME, SERVER_TYPE from FND_APP_SERVERS, FND_NODES</pre>
<pre style="padding-left:30px;">where FND_APP_SERVERS.NODE_ID = FND_NODES.NODE_ID and</pre>
<pre style="padding-left:30px;">SERVER_TYPE='DB' and FND_NODES.NODE_NAME=UPPER('oldhost');</pre>
</p>
<pre style="padding-left:30px;">no rows selected</pre>
</p>
<p><strong>2.   </strong><strong>DB Tier: Create a new Context file</strong></p>
<p style="padding-left:30px;">You can create the new context file using whichever of the following methods:</p>
<p style="padding-left:30px;">a. Manuall Method:</p>
<pre style="padding-left:30px;"># cd $ORACLE_HOME/appsutil</pre>
<pre style="padding-left:30px;"># cp PROD_oldhost.xml PROD_newhost.xml</pre>
</p>
<p style="padding-left:30px;">Edit PROD_newhost.xml manually:</p>
<p style="padding-left:30px;">Replace all oldhost with newhost</p>
<p style="padding-left:30px;">Replace all olddomain with newdomain</p>
<p style="padding-left:30px;">b. Script Method:</p>
<pre style="padding-left:30px;"># cd $ORACLE_HOME/appsutil</pre>
<pre style="padding-left:30px;"># perl ./bin/adclonectx.pl contextfile=./PROD_oldhost.xml</pre>
</p>
<pre style="padding-left:30px;">Provide the values required for creation of the new Database Context file.</pre>
<pre style="padding-left:30px;">Do you want to use a virtual hostname for the target node (y/n) [n] ?:</pre>
<pre style="padding-left:30px;">Target hostname [oldhost]:newhost</pre>
<pre style="padding-left:30px;">Target System database name [PROD]:</pre>
<pre style="padding-left:30px;">Target instance is a Real Application Cluster (RAC) instance (y/n) [n]:</pre>
<pre style="padding-left:30px;">Target system domain name [olddomain]:newdomain</pre>
<pre style="padding-left:30px;">Oracle OS User [oraprod]:</pre>
<pre style="padding-left:30px;">Oracle OS Group [dba]:</pre>
<pre style="padding-left:30px;">Target system RDBMS ORACLE_HOME directory [/gldb/apps/d02/oracle/proddb/9.2.0]:</pre>
<pre style="padding-left:30px;">Target system utl_file accessible directories list [/usr/tmp]:</pre>
<pre style="padding-left:30px;">Number of DATA_TOP's on the target system [4]:1</pre>
<pre style="padding-left:30px;">Target system DATA_TOP 1:/gldb/apps/d03/oracle/proddata</pre>
<pre style="padding-left:30px;">Do you want to preserve the Display set to oldhost:0.0 (y/n) [y] ?:n</pre>
<pre style="padding-left:30px;">Target system Display [newhost:0.0]:</pre>
<pre style="padding-left:30px;">Target system JAVA_TOP location [null]:/gldb/apps/d01/oracle/prodcomn/java</pre>
<pre style="padding-left:30px;">Do you want to preserve the port values from the source system on the target system (y/n) [y] ?:</pre>
<pre style="padding-left:30px;">Database port is 1521</pre>
<pre style="padding-left:30px;">New context path and file name [PROD_newhost.xml]:</pre>
<pre style="padding-left:30px;">Creating the new Database Context file from :</pre>
<pre style="padding-left:30px;">/gldb/apps/d02/oracle/proddb/9.2.0/appsutil/template/adxdbctx.tmp</pre>
<pre style="padding-left:30px;">The new database context file has been created :</pre>
<pre style="padding-left:30px;">/gldb/apps/d02/oracle/proddb/9.2.0/appsutil/PROD_newhost.xml</pre>
</p>
<p style="padding-left:30px;">Note: The command above will create a new Context file of the format PROD_newhost.xml in the current working directory.</p>
<p><strong>3.   </strong><strong>APPS Tier: Deregister the current Applications server </strong></p>
<p style="padding-left:30px;">As the Applications hostname and domain will be changed, the current Applications server node needs to be de-registered.</p>
<pre style="padding-left:30px;">SQL&gt; select NAME, SERVER_TYPE from FND_APP_SERVERS, FND_NODES</pre>
<pre style="padding-left:30px;">where FND_APP_SERVERS.NODE_ID = FND_NODES.NODE_ID and</pre>
<pre style="padding-left:30px;">SERVER_TYPE='APPS' and FND_NODES.NODE_NAME=UPPER('oldhost');</pre>
</p>
<pre style="padding-left:30px;">NAME              SERVER_TYP</pre>
<pre style="padding-left:30px;">----------------- ----------</pre>
<pre style="padding-left:30px;">oldhost_PROD_APPS  APPS</pre>
</p>
<pre style="padding-left:30px;"># cd $APPL_TOP/admin</pre>
<pre style="padding-left:30px;"># perl $AD_TOP/bin/adgentns.pl appspass=&lt;APPSpwd&gt; contextfile=./PROD_oldhost.xml -removeserver</pre>
</p>
<pre style="padding-left:30px;">SQL&gt; select NAME, SERVER_TYPE from FND_APP_SERVERS, FND_NODES</pre>
<pre style="padding-left:30px;">where FND_APP_SERVERS.NODE_ID = FND_NODES.NODE_ID and</pre>
<pre style="padding-left:30px;">SERVER_TYPE='APPS' and FND_NODES.NODE_NAME=UPPER('oldhost');</pre>
</p>
<pre style="padding-left:30px;">no rows selected</pre>
</p>
<p><strong>4.   </strong><strong>APPS Tier: Create a new Context file</strong></p>
<p style="padding-left:30px;">You can create the new context file using whichever of the following methods:</p>
<p style="padding-left:30px;">a. Manuall Method:</p>
<pre style="padding-left:30px;"># cd $APPL_TOP/admin</pre>
<pre style="padding-left:30px;"># cp PROD_oldhost.xml PROD_newhost.xml</pre>
</p>
<p style="padding-left:30px;">Edit PROD_newhost.xml manually:</p>
<p style="padding-left:30px;">Replace all oldhost with newhost</p>
<p style="padding-left:30px;">Replace all olddomain with newdomain</p>
<p style="padding-left:30px;">b. Script Method:</p>
<pre style="padding-left:30px;"># cd $APPL_TOP/admin</pre>
<pre style="padding-left:30px;"># perl $AD_TOP/bin/adclonectx.pl contextfile=./PROD_oldhost.xml</pre>
</p>
<pre style="padding-left:30px;">Provide the values required for creation of the new APPL_TOP Context file.</pre>
<pre style="padding-left:30px;">Do you want to use a virtual hostname for the target node (y/n) [n] ?:</pre>
<pre style="padding-left:30px;">Target hostname [oldhost]:newhost</pre>
<pre style="padding-left:30px;">Target system database SID [PROD]:</pre>
<pre style="padding-left:30px;">Target system domain name [olddomain]:newdomain</pre>
<pre style="padding-left:30px;">Username for the applications file system owner [applprod]:</pre>
<pre style="padding-left:30px;">Group for the applications file system owner [dba]:</pre>
<pre style="padding-left:30px;">Target system database server node [oldhost]:newhost</pre>
<pre style="padding-left:30px;">Does the target system have more than one application tier server node (y/n) [n] ?:</pre>
<pre style="padding-left:30px;">Is the target system APPL_TOP divided into multiple mount points(y/n)[n]?:</pre>
<pre style="padding-left:30px;">Target system APPL_TOP mount point [/gldb/apps/d01/oracle/prodappl]:</pre>
<pre style="padding-left:30px;">Target system COMMON_TOP directory [/gldb/apps/d01/oracle/prodcomn]:</pre>
<pre style="padding-left:30px;">Target system 8.0.6 ORACLE_HOME directory [/gldb/apps/d01/oracle/prodora/8.0.6]:</pre>
<pre style="padding-left:30px;">Target system iAS ORACLE_HOME directory [/gldb/apps/d01/oracle/prodora/iAS]:</pre>
<pre style="padding-left:30px;">Do you want to preserve the Display set to oldhost:0.0 (y/n) [y] ?:n</pre>
<pre style="padding-left:30px;">Target system Display [newhost:0.0]:</pre>
<pre style="padding-left:30px;">Location of JDK 1.3.1 on the target system [/usr/java14]:</pre>
<pre style="padding-left:30px;">Do you want to preserve the port values from the source system on the target system (y/n) [y] ?:</pre>
<pre style="padding-left:30px;">Web Listener port is 8000</pre>
<pre style="padding-left:30px;">Complete port information available at /gldb/apps/d01/oracle/prodappl/admin/out/PROD_newhost/portpool.lst</pre>
<pre style="padding-left:30px;">New context path and file name [PROD_newhost.xml]:</pre>
<pre style="padding-left:30px;">Creating the new APPL_TOP Context file from :</pre>
<pre style="padding-left:30px;">/gldb/apps/d01/oracle/prodappl/ad/11.5.0/admin/template/adxmlctx.tmp</pre>
<pre style="padding-left:30px;">The new APPL_TOP context file has been created :</pre>
<pre style="padding-left:30px;">/gldb/apps/d01/oracle/prodappl/admin/PROD_newhost.xml</pre>
</p>
<p style="padding-left:30px;">Note: The command above will create a new Context file of the format PROD_newhost.xml in the current working directory.</p>
<p><strong>5.   </strong><strong>APPS Tier: Shutdown the Application Tier Services </strong></p>
<pre style="padding-left:30px;"># $COMMON_TOP/admin/scripts/PROD_oldhost/adstpall.sh apps/&lt;appspasswd&gt;</pre>
</p>
<p><strong>6.   </strong><strong>Change the hostname and domain</strong></p>
<p style="padding-left:30px;">Change the hostname and domain at OS level.</p>
<pre style="padding-left:30px;"># hostname -s newhost</pre>
<pre style="padding-left:30px;"># edit /etc/hosts as follow:</pre>
</p>
<pre style="padding-left:30px;">OLD: IP-Address     oldhost.olddomain     oldhost</pre>
<pre style="padding-left:30px;">NEW: IP-Address     newhost.newdomain     newhost</pre>
</p>
<p><strong>7.   </strong><strong>DB Tier: Reseed the Net Services Topology Model</strong></p>
<pre style="padding-left:30px;"># cd $ORACLE_HOME/appsutil</pre>
<pre style="padding-left:30px;"># ./bin/adconfig.sh contextfile=./PROD_newhost.xml</pre>
</p>
<p><strong>8.   </strong><strong>APPS Tier: Reseed the Net Services Topology Model</strong></p>
<p style="padding-left:30px;">The Net Services Topology Model is automatically updated by running AutoConfig.</p>
<pre style="padding-left:30px;"># $AD_TOP/bin/adconfig.sh contextfile=$APPL_TOP/admin/PROD_newhost.xml appspass=&lt;appspasswd&gt;</pre>
</p>
<p><strong>9.   </strong><strong>DB Tier: Shutdown the database and listener</strong></p>
<pre style="padding-left:30px;"># $ORACLE_HOME/appsutil/scripts/PROD_oldhost/addbctl.sh stop</pre>
<pre style="padding-left:30px;"># $ORACLE_HOME/appsutil/scripts/PROD_oldhost/addlnctl.sh stop PROD</pre>
</p>
<p><strong>10.  </strong><strong>DB Tier: Start the listener and database</strong></p>
<pre style="padding-left:30px;"># $ORACLE_HOME/appsutil/scripts/PROD_newhost/addlnctl.sh start PROD</pre>
<pre style="padding-left:30px;"># $ORACLE_HOME/appsutil/scripts/PROD_newhost/addbctl.sh start</pre>
</p>
<p><strong>11.  </strong><strong>APPS Tier: Start the Application Tier Services</strong></p>
<pre style="padding-left:30px;"># $COMMON_TOP/admin/scripts/PROD_newhost/adstrtal.sh apps/&lt;appspasswd&gt;</pre>
</p>
<p><strong>Notes:</strong></p>
<ol>
<li>Q: Do you encounter the following errors when you start the listener?</li>
</ol>
<pre style="padding-left:60px;">Error listening on: (ADDRESS=(PROTOCOL=TCP)(Host=newhost)(Port=1521))</pre>
<pre style="padding-left:60px;">TNS-12532: TNS:invalid argument</pre>
<pre style="padding-left:60px;">TNS-12560: TNS:protocol adapter error</pre>
<pre style="padding-left:60px;">TNS-00502: Invalid argument</pre>
<pre style="padding-left:60px;">IBM/AIX RISC System/6000 Error: 515: Error 515 occurred.</pre>
</p>
<p style="padding-left:30px;">  A: Check $ORACLE_HOME/network/admin/PROD_newhost/sqlnet.ora to insure it is using new values:</p>
<pre style="padding-left:60px;">OLD: tcp.invited_nodes=(oldhost.olddomain, newhost.newdomain)</pre>
<pre style="padding-left:60px;">NEW: tcp.invited_nodes=(newhost.newdomain)</pre>
</p>
<p>     2.  Q: Do you encounter the following errors in Jinitiator console when you try to start form applications?</p>
<pre style="padding-left:60px;">java.lang.NoClassDefFoundError: org/apache/regexp/RESyntaxException</pre>
<pre style="padding-left:60px;">at oracle.ewt.lwAWT.lwText.LWTextField.getText(LWTextField.java:196)</pre>
<pre style="padding-left:60px;">at oracle.ewt.lwAWT.lwText.LWTextField._getDisplayString(LWTextField.java:787)</pre>
</p>
<p style="padding-left:30px;">A: Check $OA_HTML/bin/appsweb_PROD_newhost.cfg for the value of &#8216;archive2&#8242;. It should be as follow:</p>
<pre style="padding-left:60px;">archive2=,/OA_JAVA/regexp.jar</pre>
</p>
<p>     3.  Q: Do you encounter the following errors in Jinitiator console when you try to start form applications?</p>
<pre style="padding-left:60px;">java.lang.Error: RE internal error: Corrupt program</pre>
<pre style="padding-left:60px;">at org.apache.regexp.RE.internalError(RE.java:820)</pre>
<pre style="padding-left:60px;">at org.apache.regexp.RE.matchNodes(RE.java:1414)</pre>
</p>
<p style="padding-left:30px;">A: Made the following change:</p>
<pre style="padding-left:60px;"># cd $JAVA_TOP</pre>
<pre style="padding-left:60px;"># mv org org.back</pre>
</p>
<p> <strong>References:</strong></p>
<p style="padding-left:30px;">1. How to change the hostname of an Applications Tier using AutoConfig [Metalink 341322.1]</p>
<p style="padding-left:30px;">2. How to change the hostname and/or port of the Database Tier using AutoConfig [Metalink 338003.1]</p>
<br />Posted in Oracle E-Business Suite, Uncategorized  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/vistababa.wordpress.com/462/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/vistababa.wordpress.com/462/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/vistababa.wordpress.com/462/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/vistababa.wordpress.com/462/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/vistababa.wordpress.com/462/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/vistababa.wordpress.com/462/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/vistababa.wordpress.com/462/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/vistababa.wordpress.com/462/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/vistababa.wordpress.com/462/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/vistababa.wordpress.com/462/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/vistababa.wordpress.com/462/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/vistababa.wordpress.com/462/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/vistababa.wordpress.com/462/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/vistababa.wordpress.com/462/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vistababa.wordpress.com&amp;blog=4978554&amp;post=462&amp;subd=vistababa&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://vistababa.wordpress.com/2009/12/14/how-to-change-ip-hostname-domain-and-ports-of-single-node-oracle-e-business-suite/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ab73c548f6f278523ea1d6417bb6883e?s=96&#38;d=http%3A%2F%2Fs0.wp.com%2Fi%2Fmu.gif" medium="image">
			<media:title type="html">vistababa</media:title>
		</media:content>
	</item>
		<item>
		<title>Shared server vs. Dedicated in Oracle</title>
		<link>http://vistababa.wordpress.com/2009/11/09/shared-server-vs-dedicated-in-oracle/</link>
		<comments>http://vistababa.wordpress.com/2009/11/09/shared-server-vs-dedicated-in-oracle/#comments</comments>
		<pubDate>Mon, 09 Nov 2009 14:25:32 +0000</pubDate>
		<dc:creator>Vistababa</dc:creator>
				<category><![CDATA[Oracle Network]]></category>
		<category><![CDATA[Oracle Performance Tuning]]></category>
		<category><![CDATA[dedicated server]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[shared server]]></category>

		<guid isPermaLink="false">http://vistababa.wordpress.com/?p=458</guid>
		<description><![CDATA[If you are running in 9i or above, there are two parameters (not one) which govern whether or not you are capable of running in shared server mode. DISPATCHERS governs whether a job dispatcher runs. You have to have at least one of them configured before shared server is possible. However, the mere fact that [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vistababa.wordpress.com&amp;blog=4978554&amp;post=458&amp;subd=vistababa&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>If you are running in 9i or above, there are two parameters (not one) which govern whether or not you are capable of running in shared server mode.</p>
<p>DISPATCHERS governs whether a job dispatcher runs. You have to have at least one of them configured before shared server is possible. However, the mere fact that a dispatcher runs does NOT mean your database is running in shared server mode. There also have to be shared server processes capable of handling the work dispatched by the dispatcher(s), and those are configured with the SHARED_SERVERS parameter. If that&#8217;s set to any number greater than 1, you have shared server processes running on your instance. But that STILL doesn&#8217;t mean you&#8217;re running in shared server mode! If you have SHARED_SERVERS=57 and no dispatcher, you simply have 57 processes sitting around doing nothing whatsoever (and incapable of doing useful work!)</p>
<p>In short, you have to have DISPATCHERS and SHARED_SERVERS set.</p>
<p>Note, for example, that 10g configures a single dispatcher for all databases by default (if they&#8217;re created with DBCA and you don&#8217;t get in there to stop it happeneing), but it does NOT configure SHARED_SERVERS, so by default a 10g database does not run in shared server mode.</p>
<p>The other thing I&#8217;d clarify is that a database doesn&#8217;t really run in shared server mode anyway! The fact that your instance has a dispatcher and shared server processes running doesn&#8217;t necessarily mean your users will end up connected to the dispatcher and having shared server processes handling their job requests. They will by default, but if the tnsnames.ora they use to connect (or its centralised equivalent) contains the line SERVER=DEDICATED, then they will get to use dedicated server processes, no matter what the dispatcher or shared server processes might think about it!</p>
<p>With dispatchers and shared server processes configured, in other words, an instance can &#8220;support shared server connection requests&#8221;. That&#8217;s rather different than &#8220;running in shared server mode&#8221;. The distinction is important because privileged actions (startup, shutdown, backup and recover commands) cannot be processed by a shared server process, so it&#8217;s important for an instance that is configured for normal users to use shared server processes to still support the connection to dedicated server processes by suitably credentialled users.</p>
<p>If a user does end up connected to a shared server process, there is usually a performance penalty to pay compared to using a dedicated server process. A user submits a query and instead of it being immediately processed by a server process, it gets submitted to a dispatcher &#8230;which promptly sticks it on a job queue! You then have to wait for a shared server process to become free and decide to pick your job off the queue. That&#8217;s inevitably slower than doing it the dedicated way.</p>
<p>People use shared server as the first line of scaling up their databases&#8230; and you&#8217;re right that it primarily depends on the number of users connected to the server concurrently. In dedicated server mode, a new connection means a new process gets spawned (or a new thread on Windows) and a new connection socket is opened. Servers can only handle so many connection sockets, processes or threads before they start to keel over under the strain. Shared server, as the name suggest, means that new connections do not cause new server processes to be spawned. So 300 users can be processed with, maybe, 30 or 40 processes in total. If your box would normally keel over handling 300 dedicated connections, then clearly with that sort of sharing ratio, you&#8217;d be able to scale to nearer 3000 users before it starts wilting by using shared processes.</p>
<p>But it&#8217;s also a bit subtler than that: a data warehouse would be daft to implement shared server, even if it did have 300+ concurrent users. That&#8217;s because the users of such systems typically run queries that run for hours&#8230; and a shared process that is nabbed to perform one job for hours on end isn&#8217;t really a shared process any more, is it?! So the rule of thumb as to when to implement shared server is yes, (a) when your concurrent user count starts reaching levels that your server just doesn&#8217;t seem able to sustain any more AND (b) when you can be sure that the users tend to issue short, sharp queries -say, about 3 seconds or so to process, max.</p>
<p>Again, there are mixed states to get through, too. You might have lots of OLTP-type sub-3-second transactions on the same database on which one or two users regularly run big reports. In that case, you make sure the reporters have a tnsnames.ora that says SERVER=DEDICATED and the OLTP-type people use one that has SERVER=SHARED in it; configure the DISPATCHERS and SHARED_SERVER parameters for the instance and then those that can benefit from shared servers can do so and those that wouldn&#8217;t won&#8217;t be stealing shared processes from those that can!</p>
<p>The alternative approach for those with more cash is to go and buy better server hardware that can cope with the user community numbers! Shared Server configuration, however, comes free. You pays your money and you takes your choices!</p>
<p><span style="color:#ff0000;">Reference</span>: http://forums.oracle.com/forums/thread.jspa?messageID=2114775#2114775</p>
<br />Posted in Oracle Network, Oracle Performance Tuning  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/vistababa.wordpress.com/458/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/vistababa.wordpress.com/458/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/vistababa.wordpress.com/458/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/vistababa.wordpress.com/458/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/vistababa.wordpress.com/458/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/vistababa.wordpress.com/458/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/vistababa.wordpress.com/458/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/vistababa.wordpress.com/458/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/vistababa.wordpress.com/458/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/vistababa.wordpress.com/458/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/vistababa.wordpress.com/458/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/vistababa.wordpress.com/458/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/vistababa.wordpress.com/458/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/vistababa.wordpress.com/458/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vistababa.wordpress.com&amp;blog=4978554&amp;post=458&amp;subd=vistababa&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://vistababa.wordpress.com/2009/11/09/shared-server-vs-dedicated-in-oracle/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ab73c548f6f278523ea1d6417bb6883e?s=96&#38;d=http%3A%2F%2Fs0.wp.com%2Fi%2Fmu.gif" medium="image">
			<media:title type="html">vistababa</media:title>
		</media:content>
	</item>
		<item>
		<title>Using parallel execution in Oracle</title>
		<link>http://vistababa.wordpress.com/2009/10/28/using-parallel-execution-in-oracle/</link>
		<comments>http://vistababa.wordpress.com/2009/10/28/using-parallel-execution-in-oracle/#comments</comments>
		<pubDate>Wed, 28 Oct 2009 16:27:23 +0000</pubDate>
		<dc:creator>Vistababa</dc:creator>
				<category><![CDATA[Architecture]]></category>
		<category><![CDATA[Oracle Performance Tuning]]></category>
		<category><![CDATA[Oracle SQL & PL/SQL]]></category>
		<category><![CDATA[Oracle Utilities & Commands]]></category>
		<category><![CDATA[cpu]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[parallel]]></category>
		<category><![CDATA[tuning]]></category>

		<guid isPermaLink="false">http://vistababa.wordpress.com/?p=443</guid>
		<description><![CDATA[Using Parallel execution, Oracle can divide the work of processing an SQL statement among multiple parallel processes. The execution of many SQL statements can be parallelized. The degree of parallelism is the number of parallel execution servers that can be associated with a single operation. The ALTER SESSION statement can be used to control parallel [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vistababa.wordpress.com&amp;blog=4978554&amp;post=443&amp;subd=vistababa&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Using Parallel execution, Oracle can divide the work of processing an SQL statement among multiple parallel processes. The execution of many SQL statements can be parallelized. The degree of parallelism is the number of parallel execution servers that can be associated with a single operation.</p>
<p>The ALTER SESSION statement can be used to control parallel execution for a session. You can force parallel execution of all subsequent DML, DDL or query statements for which parallelization is possible.</p>
<p>The syntax of ALTER SESSION statement for parallel execution is as follow:</p>
<pre>ALTER SESSION {ENABLE|DISABLE|FORCE} PARALLEL {DML|DDL|QUERY} [PARALLEL int]</pre>
</p>
<p>Example:</p>
<pre>SQL&gt; set time on
18:31:10 SQL&gt; Select count(*) from GL_JE_LINES
18:31:12   2  Where trunc(last_update_date) &lt;=  to_date('091017','YYMMDD');

 COUNT(*)
----------
 132161754

18:49:20 SQL&gt; alter session force parallel query parallel <span style="color:#ff0000;">4</span>;

Session altered.

18:49:25 SQL&gt; Select count(*) from GL_JE_LINES
18:49:27   2  Where trunc(last_update_date) &lt;=  to_date('091017','YYMMDD');

 COUNT(*)
----------
 132161754

18:53:11 SQL&gt;</pre>
</p>
<p>As we can see, using parallel feature, the query has finished more then 4 times faster. The first query run as a single process and just use of 1 CPU, whereas oracle creates 4 separate OS processes to service the second query and so the second query have been served by 4 CPU.</p>
<p>What about running a SQL statement in parallel from a stored procedure? For this SQL statement we can use parallelizm as the following example:</p>
<pre>CREATE OR REPLACE PROCEDURE ...
BEGIN
<strong>EXECUTE IMMEDIATE 'alter session force parallel DML parallel 4';</strong>
Copy SQL Statement body here ...
<strong>EXECUTE IMMEDIATE 'alter session disable parallel DML';</strong>
END ...
/</pre>
</p>
<p><span style="color:#ff0000;">Reference</span>: Oracle9i Database Administrator&#8217;s Guide</p>
<br />Posted in Architecture, Oracle Performance Tuning, Oracle SQL &amp; PL/SQL, Oracle Utilities &amp; Commands  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/vistababa.wordpress.com/443/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/vistababa.wordpress.com/443/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/vistababa.wordpress.com/443/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/vistababa.wordpress.com/443/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/vistababa.wordpress.com/443/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/vistababa.wordpress.com/443/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/vistababa.wordpress.com/443/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/vistababa.wordpress.com/443/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/vistababa.wordpress.com/443/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/vistababa.wordpress.com/443/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/vistababa.wordpress.com/443/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/vistababa.wordpress.com/443/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/vistababa.wordpress.com/443/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/vistababa.wordpress.com/443/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vistababa.wordpress.com&amp;blog=4978554&amp;post=443&amp;subd=vistababa&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://vistababa.wordpress.com/2009/10/28/using-parallel-execution-in-oracle/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ab73c548f6f278523ea1d6417bb6883e?s=96&#38;d=http%3A%2F%2Fs0.wp.com%2Fi%2Fmu.gif" medium="image">
			<media:title type="html">vistababa</media:title>
		</media:content>
	</item>
		<item>
		<title>aio errors after installing AIX using mksysb</title>
		<link>http://vistababa.wordpress.com/2009/10/28/aio-errors-after-installing-aix-using-mksysb/</link>
		<comments>http://vistababa.wordpress.com/2009/10/28/aio-errors-after-installing-aix-using-mksysb/#comments</comments>
		<pubDate>Wed, 28 Oct 2009 08:32:51 +0000</pubDate>
		<dc:creator>Vistababa</dc:creator>
				<category><![CDATA[AIX Backup & Recovery]]></category>
		<category><![CDATA[AIX Errors]]></category>
		<category><![CDATA[AIX Install & Upgrade]]></category>
		<category><![CDATA[aio]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[IBM AIX]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[lsnrctl]]></category>
		<category><![CDATA[mksysb]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[sqlplus]]></category>

		<guid isPermaLink="false">http://vistababa.wordpress.com/?p=438</guid>
		<description><![CDATA[We have installed a new AIX using a mksysb backup, and then restored user volume groups and filesystems. But, after finishing the installation, while we run the programs (sqlplus, lsnrctl, &#8230;) that need aio servers, we encounter the following error? exec(): 0509-036 Cannot load program sqlplus because of the following errors: 0509-130 Symbol resolution failed [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vistababa.wordpress.com&amp;blog=4978554&amp;post=438&amp;subd=vistababa&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>We have installed a new AIX using a mksysb backup, and then restored user volume groups and filesystems. But, after finishing the installation, while we run the programs (sqlplus, lsnrctl, &#8230;) that need aio servers, we encounter the following error?</p>
<pre>exec(): 0509-036 Cannot load program sqlplus because of the following errors:
        0509-130 Symbol resolution failed for /usr/lib/libc_r.a(aio.o) because:
        0509-136   Symbol kaio_rdwr (number 0) is not exported from
                   dependent module /unix.
        0509-136   Symbol listio (number 1) is not exported from
                   dependent module /unix.
        0509-136   Symbol acancel (number 2) is not exported from
                   dependent module /unix.
        0509-136   Symbol iosuspend (number 3) is not exported from
                   dependent module /unix.
        0509-136   Symbol aio_nwait (number 4) is not exported from
                   dependent module /unix.
        0509-150   Dependent module libc_r.a(aio.o) could not be loaded.
        0509-026 System error: Cannot run a file that does not have a valid format.
        0509-192 Examine .loader section symbols with the
                 'dump -Tv' command.</pre>
<p>What is the problem?</p>
<p>The problem is related to <span style="color:#ff0000;">aio0</span> device! After installing AIX using mksysb backup, aio0 device becomes Defined, and the problem is just because of this! So, we should just make it available. To make aio0 available without need to restart the system do the following:</p>
<pre># lsdev -l aio0
aio0 <span style="color:#ff0000;">Defined  </span>Asynchronous I/O (Legacy)
# mkdev -l aio0
aio0 Available
# lsdev -l aio0
aio0 <span style="color:#ff0000;">Available  </span>Asynchronous I/O (Legacy)</pre>
</p>
<p>And now we can run the programs (sqlplus, lsnrctl, &#8230;) without any error.</p>
<p>The changes above will made aio0 available, but just temporarily and not permanently. After rebooting the system, the state of aio0 will be changed to defined again. To make it available permanently, we must do the following:</p>
<pre># lsattr -El aio0
autoconfig <span style="color:#ff0000;">defined</span> STATE to be configured at system restart True
fastpath   enable  State of fast path                       True
kprocprio  39      Server PRIORITY                          True
maxreqs    4096    Maximum number of REQUESTS               True
maxservers 10      MAXIMUM number of servers per cpu        True
minservers 1       MINIMUM number of servers                True
# chdev -l aio0 -a autoconfig='available' -P
aio0 changed
# lsattr -El aio0
autoconfig <span style="color:#ff0000;">available </span>STATE to be configured at system restart True
fastpath   enable    State of fast path                       True
kprocprio  39        Server PRIORITY                          True
maxreqs    4096      Maximum number of REQUESTS               True
maxservers 10        MAXIMUM number of servers per cpu        True
minservers 1         MINIMUM number of servers                True
</pre></p>
<br />Posted in AIX Backup &amp; Recovery, AIX Errors, AIX Install &amp; Upgrade  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/vistababa.wordpress.com/438/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/vistababa.wordpress.com/438/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/vistababa.wordpress.com/438/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/vistababa.wordpress.com/438/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/vistababa.wordpress.com/438/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/vistababa.wordpress.com/438/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/vistababa.wordpress.com/438/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/vistababa.wordpress.com/438/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/vistababa.wordpress.com/438/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/vistababa.wordpress.com/438/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/vistababa.wordpress.com/438/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/vistababa.wordpress.com/438/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/vistababa.wordpress.com/438/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/vistababa.wordpress.com/438/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vistababa.wordpress.com&amp;blog=4978554&amp;post=438&amp;subd=vistababa&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://vistababa.wordpress.com/2009/10/28/aio-errors-after-installing-aix-using-mksysb/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ab73c548f6f278523ea1d6417bb6883e?s=96&#38;d=http%3A%2F%2Fs0.wp.com%2Fi%2Fmu.gif" medium="image">
			<media:title type="html">vistababa</media:title>
		</media:content>
	</item>
		<item>
		<title>How to get table and index DDL in Oracle?</title>
		<link>http://vistababa.wordpress.com/2009/09/29/how-to-get-table-and-index-ddl-in-oracle/</link>
		<comments>http://vistababa.wordpress.com/2009/09/29/how-to-get-table-and-index-ddl-in-oracle/#comments</comments>
		<pubDate>Tue, 29 Sep 2009 15:06:40 +0000</pubDate>
		<dc:creator>Vistababa</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://vistababa.wordpress.com/?p=421</guid>
		<description><![CDATA[To punch off all table and indexes for the EMP table, we execute dbms_metadata. get_ddl, select from DUAL, and providing all required parameters. set heading off; set echo off; Set pages 999; set long 90000; spool dept_ddl.sql select dbms_metadata.get_ddl('TABLE','DEPT','SCOTT') from dual; select dbms_metadata.get_ddl('INDEX','DEPT_IDX','SCOTT') from dual; spool off; Now we can modify the syntax to punch [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vistababa.wordpress.com&amp;blog=4978554&amp;post=421&amp;subd=vistababa&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>To punch off all table and indexes for the EMP table, we execute dbms_metadata. get_ddl, select from DUAL, and providing all required parameters.</p>
<pre>set heading off;
set echo off;
Set pages 999;
set long 90000;
spool dept_ddl.sql
select dbms_metadata.get_ddl('TABLE','DEPT','SCOTT') from dual;
select dbms_metadata.get_ddl('INDEX','DEPT_IDX','SCOTT') from dual;
spool off;</pre>
<pre> </pre>
<p>Now we can modify the syntax to punch a whole schema.  It us easily done by selecting dbms_metadata. get_ddl and specifying USER_TABLES and USER_INDEXES. :</p>
<pre>set pagesize 0
set long 90000
set feedback off
set echo off
spool scott_schema.sql
SELECT DBMS_METADATA.GET_DDL('TABLE',u.table_name)
FROM USER_TABLES u;
SELECT DBMS_METADATA.GET_DDL('INDEX',u.index_name)
FROM USER_INDEXES u;
spool off;</pre>
<pre> </pre>
<p><span style="color:#993300;">Reference</span>:<span style="font-size:x-small;"> <a href="http://www.dba-oracle.com/oracle_tips_dbms_metadata.htm" target="_blank">Get table and index DDL the easy way</a> (Don Burleson)<br />
</span></p>
<br />Posted in Uncategorized  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/vistababa.wordpress.com/421/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/vistababa.wordpress.com/421/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/vistababa.wordpress.com/421/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/vistababa.wordpress.com/421/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/vistababa.wordpress.com/421/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/vistababa.wordpress.com/421/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/vistababa.wordpress.com/421/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/vistababa.wordpress.com/421/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/vistababa.wordpress.com/421/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/vistababa.wordpress.com/421/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/vistababa.wordpress.com/421/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/vistababa.wordpress.com/421/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/vistababa.wordpress.com/421/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/vistababa.wordpress.com/421/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vistababa.wordpress.com&amp;blog=4978554&amp;post=421&amp;subd=vistababa&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://vistababa.wordpress.com/2009/09/29/how-to-get-table-and-index-ddl-in-oracle/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ab73c548f6f278523ea1d6417bb6883e?s=96&#38;d=http%3A%2F%2Fs0.wp.com%2Fi%2Fmu.gif" medium="image">
			<media:title type="html">vistababa</media:title>
		</media:content>
	</item>
		<item>
		<title>Oracle&#8217;s db_file_multiblock_read_count</title>
		<link>http://vistababa.wordpress.com/2009/09/28/oracle-db_file_multiblock_read_count-parameter/</link>
		<comments>http://vistababa.wordpress.com/2009/09/28/oracle-db_file_multiblock_read_count-parameter/#comments</comments>
		<pubDate>Mon, 28 Sep 2009 11:01:40 +0000</pubDate>
		<dc:creator>Vistababa</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://vistababa.wordpress.com/?p=401</guid>
		<description><![CDATA[How can we use of oracle&#8217;s db_file_multiblock_read_count parameter? For me, it has being a big question for a while and now I think I know a little about the answer! We should know that the parameter db_file_multiblock_read_count is only applicable for tables/indexes that are full scanned. This parameter controls how much data Oracle thinks it [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vistababa.wordpress.com&amp;blog=4978554&amp;post=401&amp;subd=vistababa&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>How can we use of oracle&#8217;s db_file_multiblock_read_count parameter? For me, it has being a big question for a while and now I think I know a little about the answer!</p>
<p>We should know that the parameter <em>db_file_multiblock_read_count</em> is only applicable for tables/indexes that are full scanned. This parameter controls how much data Oracle thinks it can retrieve from the disks in a single trip (during a table/index scan). The important part of this statement is the &#8220;how much <em>Oracle</em> thinks&#8221;. It is relatively easy to manufacture a circumstance where Oracle thinks it can achieve a much higher read size than can actually be serviced by the operating system. Unfortunately, this discrepancy can have an negative impact on performance, since the cost optimizer evaluates costs based on what Oracle thinks, not what is actually achievable.</p>
<p>According to Oracle, the following is the formula for setting db_file_multiblock_read_count:</p>
<p style="text-align:center;"><img class="aligncenter size-full wp-image-433" style="border:0 none;" title="db_file_multi_block_read_count_formula" src="http://vistababa.files.wordpress.com/2009/09/db_file_multi_block_read_count_formula3.jpg?w=432&#038;h=86" alt="db_file_multi_block_read_count_formula" width="432" height="86" /></p>
<p>According to the formula above, because for a database the parameter <strong>db_block_size</strong> is fixed, the maximum amount for parameter <em>db_file_multiblock_read_count </em>is directly proportional to the maximum of I/O chunk size.</p>
<p>But how do we know the value of the max I/O chunk size? Each version of Oracle is shipped with a preset maximum of how much data can be transferred in a single read. For 8i and 9i this is 1Mb and is referred to as <a href="http://kishoresurve.blogspot.com/2007/12/what-is-sstiomax.html" target="_blank">SSTIOMAX</a>. To determine it for your Oracle version, simply set db_file_multiblock_read_count to a very big value and you will see that Oracle will size it down for you! The following is an example:</p>
<pre>$ sqlplus "/as sysdba"</pre>
<pre>SQL*Plus: Release 9.2.0.5.0 - Production on Tue Sep 29 14:06:52 2009</pre>
<pre>Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.</pre>
<pre>Connected to:</pre>
<pre>Oracle9i Enterprise Edition Release 9.2.0.5.0 - 64bit Production</pre>
<pre>With the Partitioning, OLAP and Oracle Data Mining options</pre>
<pre>JServer Release 9.2.0.5.0 - Production</pre>
<pre>SQL&gt; col NAME format a30</pre>
<pre>SQL&gt; col VALUE format a10</pre>
<pre>SQL&gt; select NAME, VALUE from v$parameter
     where NAME in ('db_file_multiblock_read_count','db_block_size');</pre>
<pre>NAME                           VALUE</pre>
<pre>------------------------------ ----------</pre>
<pre>db_block_size                  8192</pre>
<pre>db_file_multiblock_read_count  16</pre>
<pre>SQL&gt; alter session set db_file_multiblock_read_count = 32000;</pre>
<pre>Session altered.</pre>
<pre>SQL&gt; select NAME, VALUE from v$parameter
     where name in ('db_file_multiblock_read_count','db_block_size');</pre>
<pre>NAME                           VALUE</pre>
<pre>------------------------------ ----------</pre>
<pre>db_block_size                  8192</pre>
<pre>db_file_multiblock_read_count  128</pre>
<pre> </pre>
<p>As you can see from the example above, for Oracle9i when db_block_size is 8KB, the maximum value of parameter db_file_multiblock_read_count is 128, and it means that Max I/O Chunk size is 1MB.</p>
<p>OK. Now for our example the parameter db_file_multiblock_read_count has set to its maximum value and Oracle thinks it can retrieve 1MB data in a single read from disk in case of table/index scan. However we set maximum value of db_file_multiblock_read_count, it still isn’t an effective maximum value because the maximum size of an I/O passed from an application to underlying disk, is OS and disk dependent!</p>
<p>My Oracle is installed on AIX 5.2, so I will continue with this OS. To set LTG and max_transfer sizes on AIX please refer to my previouse post:&#8221;<a href="http://vistababa.wordpress.com/2009/09/27/ltg-and-max_transfer-sizes-on-aix/" target="_blank">LTG and max_transfer on AIX</a>&#8220;. For other platforms please refer to their documents.</p>
<p>Now it seems everything is ready. The database is set to use 1MB I/O chunks and OS and disks are also configured to support this I/O size. But can this configuration deliver 1MB I/O that Oracle think? In the following we will try to find the maximum effective db_file_multiblock_read_count.</p>
<p>We will create a table and will insert so many records into it, and then while event 10046 is enabled at level 8, will scan it. Finally, we will examine the trace file to find the largest multiblock_read_count that actually performed for this full table scan. Bear in mind that the table should not have any blocks in Oracle&#8217;s buffer cache, so we will restart the database after inserting data into table.</p>
<pre>SQL&gt; CREATE TABLE T1 ("N1" NUMBER, "N2" NUMBER, "V1" VARCHAR2(215))</pre>
<pre>STORAGE(INITIAL 1024k next 1024);</pre>
<pre>Table created.</pre>
<pre>SQL&gt; insert into T1</pre>
<pre>select trunc((rownum-1)/15) n1,</pre>
<pre>trunc((rownum-1)/15) n2,</pre>
<pre>rpad('x', 215)       v1</pre>
<pre>from all_objects</pre>
<pre>where rownum &lt;= 3000;</pre>
<pre>3000 rows created.</pre>
<pre>SQL&gt; insert into T1 select * from T1;</pre>
<pre>3000 rows created.</pre>
<pre>...</pre>
<pre>SQL&gt; insert into T1 select * from T1;</pre>
<pre>192000 rows created.</pre>
<pre>SQL&gt; insert into T1 select * from T1;</pre>
<pre>384000 rows created.</pre>
<pre>SQL&gt; commit;</pre>
<pre>SQL&gt; startup force</pre>
<pre>ORACLE instance started.</pre>
<pre>Total System Global Area 2.7511E+10 bytes</pre>
<pre>Fixed Size                   782008 bytes</pre>
<pre>Variable Size            4647288832 bytes</pre>
<pre>Database Buffers         2.2549E+10 bytes</pre>
<pre>Redo Buffers              314847232 bytes</pre>
<pre>Database mounted.</pre>
<pre>Database opened.</pre>
<pre>SQL&gt; alter session set events '10046 trace name context off';</pre>
<pre>Session altered.</pre>
<pre>SQL&gt; alter session set events '10046 trace name context forever, level 8';</pre>
<pre>Session altered.</pre>
<pre>SQL&gt; select /*+ FULL(t) */ count(*) from T1;</pre>
<pre>COUNT(*)</pre>
<pre>----------</pre>
<pre>768000</pre>
<pre>SQL&gt; alter session set events '10046 trace name context off';</pre>
<pre>Session altered.</pre>
<pre>SQL&gt;</pre>
<pre>$cd $ORACLE_HOME/admin/udump/</pre>
<pre>$sed -n '/scattered/s/.*p3=//p' prod_ora_3760204.trc|sort -n|tail -1</pre>
<pre>16</pre>
<pre> </pre>
<p>And thus, we couldn’t achieve more than 16 for db_file_multi_block_read_count! It means we could just retrieve 128KB I/O chunks (8KB * 16 = 128KB). But why?!</p>
<p>After investigating and googling the internet, I realized that it’s because of the table’s extent size! Because oracle read maximally by EXTENT size (a read never spans extents)!</p>
<p>The tablespace that was contains the table was locally managed and its extent allocation type was “UNIFORM SIZE 128K”. UNIFORM allocation type for a tablespace means that all extents are of fixed size in the tablespace. By the following query we can see the extents size of the table:</p>
<pre>SQL&gt; select bytes/1024, count(*) from USER_EXTENTS</pre>
<pre>where segment_name='T1'</pre>
<pre>group by bytes/1024</pre>
<pre>order by 1;</pre>
<pre>BYTES/1024   COUNT(*)</pre>
<pre>---------- ----------</pre>
<pre>128       1525</pre>
<pre> </pre>
<p>And we see that all the extents are fixed 128kB.</p>
<p>To be continued&#8230;</p>
<p><strong>10gR2 Note: </strong>Oracle Database 10g Release 2 automatically selects the appropriate value for this parameter depending on the operating system optimal I/O size and the size of the buffer cache. For more details, see <a href="http://www.dba-oracle.com/t_automatically_tuned_multiblock_reads.htm" target="_blank">Automatically tuned multi-block reads in 10gR2</a> by Don Burleson.</p>
<p><span style="color:#993300;">References</span>:</p>
<ul>
<li><a href="http://www.dba-oracle.com/t_db_file_multiblock_read_count.htm" target="_blank">Oracle db_file_multi_block_read_count</a> (Don Burleso)</li>
<li><a href="http://www.ixora.com.au/scripts/sql/multiblock_read_test.sql" target="_blank">Multiblock_read_test.sql</a> (Steve Adams)</li>
<li><a href="http://www.oracledba.co.uk/tips/mbrc.htm" target="_blank">Multiblock read count</a></li>
<li><a href="http://www.dbasupport.com/oracle/ora9i/managed_tablespace.shtml" target="_blank">Understanding Oracle&#8217;s Locally Managed Tablespaces</a></li>
<li><a href="http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:10015427038722" target="_blank">db_file_multiblock_read_count and different read rates</a> (Tom Kyte)</li>
</ul>
<br />Posted in Uncategorized  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/vistababa.wordpress.com/401/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/vistababa.wordpress.com/401/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/vistababa.wordpress.com/401/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/vistababa.wordpress.com/401/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/vistababa.wordpress.com/401/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/vistababa.wordpress.com/401/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/vistababa.wordpress.com/401/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/vistababa.wordpress.com/401/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/vistababa.wordpress.com/401/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/vistababa.wordpress.com/401/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/vistababa.wordpress.com/401/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/vistababa.wordpress.com/401/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/vistababa.wordpress.com/401/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/vistababa.wordpress.com/401/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vistababa.wordpress.com&amp;blog=4978554&amp;post=401&amp;subd=vistababa&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://vistababa.wordpress.com/2009/09/28/oracle-db_file_multiblock_read_count-parameter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ab73c548f6f278523ea1d6417bb6883e?s=96&#38;d=http%3A%2F%2Fs0.wp.com%2Fi%2Fmu.gif" medium="image">
			<media:title type="html">vistababa</media:title>
		</media:content>

		<media:content url="http://vistababa.files.wordpress.com/2009/09/db_file_multi_block_read_count_formula3.jpg" medium="image">
			<media:title type="html">db_file_multi_block_read_count_formula</media:title>
		</media:content>
	</item>
	</channel>
</rss>
