<?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"
	>

<channel>
	<title>SA-DBA</title>
	<atom:link href="http://itknowledgeexchange.techtarget.com/oracle-dba/feed/" rel="self" type="application/rss+xml" />
	<link>http://itknowledgeexchange.techtarget.com/oracle-dba</link>
	<description>Oracle Database Administrator in San Antonio</description>
	<pubDate>Tue, 14 Jul 2009 13:55:54 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.2</generator>
	<language>en</language>
			<item>
		<title>TWO_TASK&#8230; an oldie but a goodie&#8230;</title>
		<link>http://itknowledgeexchange.techtarget.com/oracle-dba/two_task-an-oldie-but-a-goodie/</link>
		<comments>http://itknowledgeexchange.techtarget.com/oracle-dba/two_task-an-oldie-but-a-goodie/#comments</comments>
		<pubDate>Tue, 14 Jul 2009 13:52:27 +0000</pubDate>
		<dc:creator>Richard Evans</dc:creator>
		
		<category><![CDATA[environment variable]]></category>

		<category><![CDATA[TWO_TASK]]></category>

		<category><![CDATA[connection string]]></category>

		<category><![CDATA[client server]]></category>

		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/oracle-dba/?p=138</guid>
		<description><![CDATA[TWO_TASK is a very useful but often forgotten environment variable. We actually just used it again the other day and we&#8217;re always scratching our head saying &#8220;ok, I remember there is this variable we can set to do that&#8230; umm&#8230; it&#8217;s&#8230; hmm, let me google and I&#8217;ll get right back to you.&#8221;
Because it&#8217;s an obscure [...]]]></description>
			<content:encoded><![CDATA[<p>TWO_TASK is a very useful but often forgotten environment variable. We actually just used it again the other day and we&#8217;re always scratching our head saying &#8220;ok, I remember there is this variable we can set to do that&#8230; umm&#8230; it&#8217;s&#8230; hmm, let me google and I&#8217;ll get right back to you.&#8221;</p>
<p>Because it&#8217;s an obscure name &#8212; maybe someone could explain to me why it&#8217;s named TWO_TASK? &#8212; it&#8217;s often hard to locate.</p>
<p>From the same document I referenced in my last post, the <a href="http://download.oracle.com/docs/cd/B19306_01/server.102/b14357/ch2.htm#i1052303">SQL*Plus User’s Guide and Reference</a>, TWO_TASK is:</p>
<p><em>UNIX environment variable to specify a connection string. Connections that do not specify a database will connect to the database specified in TWO_TASK.</p>
<p>Example</p>
<p>TWO_TASK=MYDB<br />
export TWO_TASK<br />
sqlplus hr<br />
is the same as:</p>
<p>sqlplus hr@MYDB</em></p>
<p>We use this a lot when we separate an application from the DB. We try to keep applications on their own servers (in their own zones) and our DBs on their own servers (in their own zones as well). Often times, by default, vendor software doesn&#8217;t want to play nice when it isn&#8217;t on the same machine as the DB.  TWO_TASK is often a clever way to get around that!</p>
<p>In this scenario, I&#8217;m logged on to a Solaris Zone with Oracle 10g Client software installed.<br />
<code><br />
[oracle: /oracle] echo $TWO_TASK</p>
<p>[oracle: /oracle] sqlplus system</p>
<p>SQL*Plus: Release 10.2.0.4.0 - Production on Tue Jul 14 08:48:16 2009</p>
<p>Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.</p>
<p>Enter password:<br />
ERROR:<br />
ORA-12545: Connect failed because target host or object does not exist</p>
<p>Enter user-name: ^C<br />
[oracle: /oracle] export TWO_TASK=DDSC1<br />
[oracle: /oracle] sqlplus system</p>
<p>SQL*Plus: Release 10.2.0.4.0 - Production on Tue Jul 14 08:48:27 2009</p>
<p>Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.</p>
<p>Enter password:</p>
<p>Connected to:<br />
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production<br />
With the Partitioning, OLAP, Data Mining and Real Application Testing options</p>
<p>SQL&gt;<br />
</code></p>
<p>Now my application can be tricked into thinking the database is local. You don&#8217;t need to try to muck with any &#8220;@DBNAME&#8221; connection string. </p>
]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/oracle-dba/two_task-an-oldie-but-a-goodie/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Environmental consistency .. is that even a real phrase?</title>
		<link>http://itknowledgeexchange.techtarget.com/oracle-dba/environmental-consistency-is-that-even-a-real-phrase/</link>
		<comments>http://itknowledgeexchange.techtarget.com/oracle-dba/environmental-consistency-is-that-even-a-real-phrase/#comments</comments>
		<pubDate>Tue, 14 Jul 2009 13:40:36 +0000</pubDate>
		<dc:creator>Richard Evans</dc:creator>
		
		<category><![CDATA[kshrc]]></category>

		<category><![CDATA[profil]]></category>

		<category><![CDATA[alias]]></category>

		<category><![CDATA[export]]></category>

		<category><![CDATA[shortcut]]></category>

		<category><![CDATA[SQLPATH]]></category>

		<category><![CDATA[SQLPLUS]]></category>

		<category><![CDATA[SQL]]></category>

		<category><![CDATA[SQL Script]]></category>

		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/oracle-dba/?p=127</guid>
		<description><![CDATA[Whether it is or isn&#8217;t doesn&#8217;t really matter&#8230; what I mean by environmental consistency is basically just making your life easier by installing, configuring, testing, developing, etc, the same way. This is one of the reasons why I love Response Files in Oracle. Another thing we do pretty well around here is configuring our environment [...]]]></description>
			<content:encoded><![CDATA[<p>Whether it is or isn&#8217;t doesn&#8217;t really matter&#8230; what I mean by environmental consistency is basically just making your life easier by installing, configuring, testing, developing, etc, the same way. This is one of the reasons why I love Response Files in Oracle. Another thing we do pretty well around here is configuring our environment variables the same. </p>
<p>I have a .kshrc and a .profile that I copy to every Oracle DB Zone and the only parameter I edit is the ORACLE_SID.  I&#8217;m sure there is still room for improvement here &#8212; off the topic of my head, I guess I could grep the /var/opt/oracle/oratab to find the SID and put that in for ORACLE_SID &#8212; but here is the way we set things up.<br />
<code><br />
[oracle: /oracle] cat .profile<br />
stty istrip<br />
stty erase</p>
<p># Oracle Variables&#8230;<br />
ORACLE_BASE=/oracle<br />
ORACLE_SID=CTM1<br />
ORACLE_HOME=/oracle/${ORACLE_SID}/102_64<br />
NLS_DATE_FORMAT=&#8217;DD-Mon-YYYY HH24:MI:SS&#8217;<br />
NLS_LANG=american_america.US7ASCII<br />
SQLPATH=/group/oracle/sql<br />
PATH=/group/oracle/sh:$ORACLE_HOME/bin:/usr/bin:/usr/sbin:/etc:/usr/ccs/bin:/usr/ucb:/etc:$ORACLE_BASE/$ORACLE_SID/admin/scripts/sh:/usr/openwin/bin:$ORACLE_HOME/OPatch:/usr/local/bin:.</p>
<p>export ORACLE_BASE ORACLE_SID ORACLE_HOME SQLPATH NLS_LANG NLS_DATE_FORMAT PATH</p>
<p># tell us what zone we&#8217;re in when we login.<br />
ZN=`uname -n`<br />
echo &#8220;Zone name is ${ZN}&#8221;</p>
<p># Display user, SID, and current working directory as the command prompt.<br />
export PS1=&#8217;[$LOGNAME: $PWD] &#8216;<br />
. ./.kshrc<br />
</code><br />
And we do the same thing with our .kshrc. We try to references environment variables whenever possible. The less we hardcode, the less we have to change when we setup a new machine!<br />
<code><br />
[oracle: /oracle] cat .kshrc<br />
export EDITOR=vi<br />
alias l=&#8217;ls -ltr&#8217;<br />
alias bdump=&#8217;cd /oracle/$ORACLE_SID/oratrace/bdump&#8217;<br />
alias arch=&#8217;cd /oracle/$ORACLE_SID/oraarch&#8217;<br />
alias udump=&#8217;cd /oracle/$ORACLE_SID/oratrace/udump&#8217;<br />
alias scrp=&#8217;cd /group/oracle/sh&#8217;<br />
alias sql=&#8217;cd /group/oracle/sql&#8217;<br />
alias par=&#8217;cd $HOME/scripts/parms&#8217;<br />
alias out=&#8217;cd /RMAN/scripts/logs/$ORACLE_SID&#8217;<br />
alias dbs=&#8217;cd $ORACLE_HOME/dbs&#8217;<br />
alias net=&#8217;cd $ORACLE_HOME/network/admin&#8217;<br />
alias alert=&#8217;vi /oracle/$ORACLE_SID/oratrace/bdump/alert_$ORACLE_SID.log&#8217;<br />
alias oraenv=&#8217;. $ORACLE_HOME/bin/oraenv&#8217;<br />
alias ohome=&#8217;cd $ORACLE_HOME&#8217;<br />
alias tail_alert=&#8217;tail -f /oracle/$ORACLE_SID/oratrace/bdump/alert_${ORACLE_SID}.log&#8217;<br />
alias alert500=&#8217;tail -500 /oracle/$ORACLE_SID/oratrace/bdump/alert_${ORACLE_SID}.log | more&#8217;<br />
alias rdbms=&#8217;cd $ORACLE_HOME/rdbms/admin&#8217;<br />
alias sw=&#8217;cd /group/software/oracle/stage/102_64&#8242;<br />
</code></p>
<p>My favorite part out of this whole mess is the SQLPATH variable. This is a great variable that lets you execute SQL scripts from a different location by simply using &#8220;@&#8221; as if it were in your current working directory.</p>
<p>According to the <a href="http://download.oracle.com/docs/cd/B19306_01/server.102/b14357/ch2.htm#sthref347">SQL*Plus User&#8217;s Guide and Reference</a>, SQLPATH is:</p>
<p><em>Environment variable or Windows registry entry to specify the location of SQL scripts. SQL*Plus searches for SQL scripts, including login.sql, in the current directory and then in the directories specified by SQLPATH, and in the subdirectories of SQLPATH directories. SQLPATH is a colon separated list of directories. There is no default value set in UNIX installations.</p>
<p>In Windows, SQLPATH is defined in a registry entry during installation. For more information about the SQLPATH registry entry, see SQLPATH Registry Entry.</em></p>
<p>What I do is put my most-commonly used scripts into the directory defined in SQLPATH and then I can call it from anywhere. Obviously this has to be a directory that is accessible across zones (servers) <img src='http://itknowledgeexchange.techtarget.com/oracle-dba/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Keep in mind Oracle will FIRST look at your current working directory and then query the SQLPATH. So if you have a script by the same name in each directory you&#8217;ll drive yourself nuts when it isn&#8217;t working as you&#8217;d expect! I speak from experience. <img src='http://itknowledgeexchange.techtarget.com/oracle-dba/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>So here is an example of how I check current sessions:<br />
<code><br />
[oracle: /oracle] ls -al get_session.sql<br />
get_session.sql: No such file or directory<br />
[oracle: /oracle] sqlplus / as sysdba</p>
<p>SQL*Plus: Release 10.2.0.4.0 - Production on Tue Jul 14 08:18:15 2009</p>
<p>Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.</p>
<p>Connected to:<br />
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production<br />
With the Partitioning, Data Mining and Real Application Testing options</p>
<p>SQL&gt; @get_session<br />
Sessions on database AD1<br />
PID      SID      SER#     BOX           USERNAME        OS_USER      PROGRAM                             SQL_ADDRESS      SQL_HASH_VALUE<br />
&#8212;&#8212;&#8211; &#8212;&#8212;&#8211; &#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;&#8212;&#8212; &#8212;&#8212;&#8212;&#8212; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;&#8212;&#8211;<br />
12140    196      5604     oraad1        SYSMAN          oracle       emagent@oraad1 (TNS V1-V3)          00                            0<br />
12261    182      12004    omsapp        DBSNMP                       OMS                                 00                            0<br />
12726    424      9074     oraad1        DBSNMP          oracle       emagent@oraad1 (TNS V1-V3)          00                            0<br />
13101    431      54       oraad1        DBSNMP          oracle       emagent@oraad1 (TNS V1-V3)          00                            0<br />
16456    396      29816    oraad1        SYS             oracle       rman@oraad1 (TNS V1-V3)             00                            0<br />
</code></p>
<p>I&#8217;m sorry, the output isn&#8217;t quite as pretty as I&#8217;d like but I think it conveys my point.  Using a couple quick variables and commands I can maintain a consistent environment.</p>
<p>The get_session.sql script is something I&#8217;ve &#8220;acquired&#8221; from years of DBA&#8217;ing via Google <img src='http://itknowledgeexchange.techtarget.com/oracle-dba/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>Here it is:<br />
<code><br />
SQL&gt; l<br />
  1  select substr(a.spid,1,9) pid<br />
  2       , substr(b.sid,1,5) sid<br />
  3       , substr(b.serial#,1,5) ser#<br />
  4       , substr(b.machine,1,9) box<br />
  5       , substr&nbsp;<a href="http://b.us" title="http://b.(" target="_blank">b.us</a>ername,1,10) username<br />
  6       , substr(b.osuser,1,9) os_user<br />
  7       , substr(b.program,1,30) program<br />
  8       , b.sql_address sql_address<br />
  9       , b.sql_hash_value sql_hash_value<br />
 10    from v$session b, v$process a &#8211;, v$sqlarea c<br />
 11   where b.paddr = a.addr<br />
 12     and type=&#8217;USER&#8217;<br />
 13*  order by spid<br />
</code></p>
<p>I do the same thing with a user.sql script:<br />
<code><br />
[oracle: /oracle] ls -al user.sql<br />
user.sql: No such file or directory<br />
[oracle: /oracle] sqlplus / as sysdba<br />
SQL&gt; @user.sql<br />
Enter value for 1:<br />
old   3:  where username like upper(&#8217;%&amp;1%&#8217;)<br />
new   3:  where username like upper(&#8217;%%&#8217;)</p>
<p>USERNAME     PROFILE        ACCOUNT_STATUS     CREATED<br />
&#8212;&#8212;&#8212;&#8212; &#8212;&#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
DBSNMP       DEFAULT        OPEN               23-Oct-2005 08:47:09<br />
PERFSTAT     DEFAULT        OPEN               26-Sep-2008 16:32:34<br />
RMAN         DEFAULT        OPEN               23-Oct-2005 08:47:10<br />
SYS          DEFAULT        OPEN               15-Dec-2003 09:43:18<br />
SYSMAN       DEFAULT        OPEN               11-Feb-2009 10:37:41<br />
SYSTEM       DEFAULT        OPEN               15-Dec-2003 09:43:18<br />
ORACLE_OCM   DEFAULT        EXPIRED &amp; LOCKED   01-Jul-2009 14:06:09<br />
OUTLN        DEFAULT        EXPIRED &amp; LOCKED   23-Oct-2005 08:47:09<br />
TSMSYS       DEFAULT        EXPIRED &amp; LOCKED   28-Jun-2008 00:52:53<br />
WMSYS        DEFAULT        EXPIRED &amp; LOCKED   23-Oct-2005 08:47:10</p>
<p>SQL&gt; l<br />
  1  select username, profile,  account_status, created<br />
  2    from dba_users<br />
  3*  where username like upper(&#8217;%&amp;1%&#8217;)<br />
</code></p>
<p>What I like about this script is if you do not enter a username then it&#8217;ll display all of the users. The results are as narrow or as broad as you want. I have more columns in this script, like password hash, but that&#8217;s not information I care to give out. I think you understand <img src='http://itknowledgeexchange.techtarget.com/oracle-dba/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>I hope this gives you an idea of what you can do with such a simple variable.  The more simple and cleaner you can make your environment the better off you&#8217;ll be. </p>
<p>What do you do to simplify your environment? Are there variables and aliases that you setup that I&#8217;ve missed? I&#8217;d like to hear about them!</p>
]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/oracle-dba/environmental-consistency-is-that-even-a-real-phrase/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Grid Control OS Command Job and a problem&#8230;</title>
		<link>http://itknowledgeexchange.techtarget.com/oracle-dba/grid-control-os-command-job-and-a-problem/</link>
		<comments>http://itknowledgeexchange.techtarget.com/oracle-dba/grid-control-os-command-job-and-a-problem/#comments</comments>
		<pubDate>Fri, 10 Jul 2009 19:17:31 +0000</pubDate>
		<dc:creator>Richard Evans</dc:creator>
		
		<category><![CDATA[Job System]]></category>

		<category><![CDATA[OS Command]]></category>

		<category><![CDATA[error]]></category>

		<category><![CDATA[grep]]></category>

		<category><![CDATA[special characters]]></category>

		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/oracle-dba/?p=91</guid>
		<description><![CDATA[If you&#8217;re an avid user of Grid Control, like me, then you&#8217;ve probably fallen in love with the ability to run OS commands on multiple machines from GC.  It&#8217;s a great tool!
For example, I often want to know how much space my Archive Logs are taking up - easy!  Since we have a very uniform [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re an avid user of Grid Control, like me, then you&#8217;ve probably fallen in love with the ability to run OS commands on multiple machines from GC.  It&#8217;s a great tool!</p>
<p>For example, I often want to know how much space my Archive Logs are taking up - easy!  Since we have a very uniform environment, I&#8217;m able to query the /oracle/$ORACLE_SID/oraarch mount point and get the results ASAP.</p>
<p><code>df -h | grep arch</code></p>
<p>Easy enough right? Here is the problem&#8230; as you get more advanced, Oracle has hardcoded the shell the Agent uses!! It DOES NOT take the shell of the process owner, in our case the owner is the OS user Oracle and his shell is /bin/ksh. <br />
 <br />
This may not affect you on &#8220;df -h | grep arch&#8221; but it most certainly will affect you if you you get into special characters!  Let&#8217;s say you want to use Grid Control to see if all of your /var/opt/oracle/oratab files have the autostart parameter set to &#8220;Y.&#8221; This is a fair test, I think.</p>
<p>From the command line, it&#8217;s as simple as&#8230;</p>
<p><code><br />
[oracle: /oracle] grep -v ^# /var/opt/oracle/oratab<br />
 <br />
agt:/oracle/OracleHomes/agent10g:Y</code></p>
<p>Let&#8217;s create an OS Command job that is exactly what we did from the command line&#8230;</p>
<p><a href="http://http.cdnlayer.com/itke/blogs.dir/133/files/2009/07/gc_job_query_oratab.png"><img class="alignnone size-full wp-image-94" src="http://http.cdnlayer.com/itke/blogs.dir/133/files/2009/07/gc_job_query_oratab.png" alt="" width="500" height="267" /></a></p>
<p><a href="http://http.cdnlayer.com/itke/blogs.dir/133/files/2009/07/gc_job_query_oratab2.png"><img class="alignnone size-medium wp-image-95" src="http://http.cdnlayer.com/itke/blogs.dir/133/files/2009/07/gc_job_query_oratab2.png" alt="" width="300" height="119" /></a></p>
<p>Here is the output if you do the same thing in Grid Control&#8230; what gives??</p>
<p><a href="http://http.cdnlayer.com/itke/blogs.dir/133/files/2009/07/gc_job_query_oratab3.png"><img class="alignnone size-medium wp-image-96" src="http://http.cdnlayer.com/itke/blogs.dir/133/files/2009/07/gc_job_query_oratab3.png" alt="" width="300" height="254" /></a><br />
 <br />
With the help of Oracle support, we&#8217;ve determined this is an issue with Grid Control on Solaris SPARC, specifically. According to Support, it seems to work fine in Linux and Windows.  Their answer?</p>
<p style="padding-left: 30px"> <br />
CAUSE DETERMINATION</p>
<p style="padding-left: 30px">====================</p>
<p style="padding-left: 30px">The interpreter is hardcoded a /bin/sh</p>
<p style="padding-left: 30px">On Solaris this is the Bourne Shell. On Linux this is the BASH Shell</p>
<p style="padding-left: 30px">CAUSE JUSTIFICATION</p>
<p style="padding-left: 30px">====================</p>
<p style="padding-left: 30px">Verified that the interpreter is /bin/sh and that the differences between Linux and Solaris</p>
<p>You can verify that a couple different ways&#8230; as you can see, the second item works as this shell requires double quotes to accept special characters. If you copy that code into an OS Command Job it&#8217;ll work just fine.<br />
<code><br />
[oracle:&lt;AD1&gt; /oracle] echo $SHELL<br />
/bin/ksh</p>
<p>[oracle:&lt;AD1&gt; /oracle] sh<br />
[$LOGNAME:&lt;$ORACLE_SID&gt; $PWD] grep -v ^# /var/opt/oracle/oratab<br />
&gt; <br />
&gt; ^C<br />
[$LOGNAME:&lt;$ORACLE_SID&gt; $PWD] grep -v &#8220;^#&#8221; /var/opt/oracle/oratab<br />
agt:/oracle/OracleHomes/agent10g:Y<br />
AD1:/oracle/AD1/102_64:Y<br />
</code><br />
 </p>
<p>Or, I was able to create an OS Command Job (to run &#8220;ps -ef | grep rman&#8221;) and quickly run the same command &#8220;ps -ef | grep rman&#8221; on the host I told it to execute against to see if it&#8217;s executing.</p>
<p><code><br />
[oracle:&lt;AD1&gt; /oracle&gt; ps -ef  | grep rman<br />
oracle 8167 8163 0 11:05:52 ? 0:00 grep rman<br />
oracle 8163 8161 0 11:05:52 ? 0:00 /bin/sh -c ps -ef | grep rman<br />
</code><br />
 </p>
<p>You can see how the Agent is executing the command.</p>
<p> Lucky for me, I was executing something simple and harmless, but think if I was trying to edit a configuration file across my environment? When I found this error, I was doing just that! Fortunately, it was just my crontabs and I could easily (relatively) go back and fix them. I was very very very lucky it wasn&#8217;t something more serious.</p>
<p> I&#8217;ve been working with a great Oracle Support Rep, Peter, but unfortunately he gave me some bad news on Wednesday regarding this SR:</p>
<p style="padding-left: 30px"><em>Hi Rich,</em></p>
<p style="padding-left: 30px"><em>The enhancement request has been rejected. It was suggested that script version of host command be used instead and specify which shell interpreter you want to use in the &#8220;Interpreter&#8221; field.</em></p>
<p style="padding-left: 30px"><em>Don&#8217;t think there is anything more I can do on this.</em></p>
<p style="padding-left: 30px"><em>You OK for me to close this SR now?</em> </p>
<p>But I don&#8217;t go down without a fight. I asked for an escalation of this issue :-) </p>
<p>I think this is a very important issue and I think Oracle development needs to recognize it and FIX IT. It&#8217;s easy to put a note in the Solaris SPARC README saying &#8220;oh, remember that this OS uses the Bourne Shell while Linux defaults to the BASH Shell.&#8221; But that would be a horrible remedy, in my humble opinion. That&#8217;s a band-aid, not a solution. This is a problem that needs a solution.</p>
]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/oracle-dba/grid-control-os-command-job-and-a-problem/feed/</wfw:commentRss>
		</item>
		<item>
		<title>A win for us and the customers&#8230;</title>
		<link>http://itknowledgeexchange.techtarget.com/oracle-dba/a-win-for-us-and-the-customers/</link>
		<comments>http://itknowledgeexchange.techtarget.com/oracle-dba/a-win-for-us-and-the-customers/#comments</comments>
		<pubDate>Fri, 10 Jul 2009 16:45:25 +0000</pubDate>
		<dc:creator>Richard Evans</dc:creator>
		
		<category><![CDATA[Data Guard]]></category>

		<category><![CDATA[10g]]></category>

		<category><![CDATA[11g]]></category>

		<category><![CDATA[implementation]]></category>

		<category><![CDATA[logical standby]]></category>

		<category><![CDATA[RMAN]]></category>

		<category><![CDATA[improvement]]></category>

		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/oracle-dba/?p=68</guid>
		<description><![CDATA[Today we demonstrated the capabilities of Oracle Data Guard. I&#8217;ve implemented it at a couple other locations and absolutely love it. I&#8217;d still consider myself a DG newbie, but it&#8217;s so straight forward and easy to manage at this point (10gR2) you don&#8217;t have to be an expert. I&#8217;ve read that it gets even better [...]]]></description>
			<content:encoded><![CDATA[<p>Today we demonstrated the capabilities of Oracle Data Guard. I&#8217;ve implemented it at a couple other locations and absolutely love it. I&#8217;d still consider myself a DG newbie, but it&#8217;s so straight forward and easy to manage at this point (10gR2) you don&#8217;t have to be an expert. I&#8217;ve read that it gets even better with 11g! I can&#8217;t wait for some of the new features they&#8217;ve integrated into RMAN for Data Guard.</p>
<p>Even if you&#8217;re not using RAC, check out page 33 of the <a href="http://www.oracle.com/technology/deploy/availability/pdf/dataguard11g_rac_maa.pdf">Data Guard 11g Installation and Configuration On Oracle RAC Systems</a></p>
<p>And Uwe Hesse, an Oracle Instructor, has put together a nice document demonstrating 11g&#8217;s Data Guard Features: <a href="http://www.oracle.com/global/uk/education/downloads/uwe_data_guard.pdf">Oracle 11g Data Guard in Action</a></p>
<p>Back on topic now, we have Business Analysts that want to run reports against the data from our production server. Since we don&#8217;t really want them bogging down the production server, we&#8217;ve been using a Korn shell script to copy the Level 0 of the production DB from NetBackup to a reporting Zone.  This has worked pretty well for a couple years now, but when I came on board I asked why we hadn&#8217;t considered Data Guard. Mostly it was a lack of experience with the product and when you&#8217;re a small team with a large workload, it&#8217;s hard to tackle products that are out of arms reach. I completely understand that, been there! Still am there!!</p>
<p>So I put together a scenario using one of their development DBs. I had permission to start/stop that DB as necessary and used it as my primary DB.  I duplicated this DB to a separate Solaris Zone to, eventually, be my logical standby database.</p>
<p>I&#8217;ll post the steps I took on here sometime soon &#8212; first I want to make sure I have the bumps smoothed over.</p>
<p>The big thing was our demonstration today. I put together a few (~7) PowerPoint slides to give them an idea of what I want to do:</p>
<ol>
<li> What is Data Guard?</li>
<li> How does Data Guard work?</li>
<li> Why use Data Guard instead?</li>
<li> What&#8217;s the catch?</li>
<li> How would we implement?</li>
<li> How long will this take??</li>
</ol>
<p>Generally our customers don&#8217;t care about the details, they just want to know what the catch is, how long it&#8217;ll take to implement, and how much downtime they&#8217;ll experience.  Since I&#8217;m a technical guy, I like throwing in some technical information to see exactly how long it takes for their eyes to glaze over!  <img src='http://itknowledgeexchange.techtarget.com/oracle-dba/wp-includes/images/smilies/icon_biggrin.gif' alt=':-D' class='wp-smiley' /> </p>
<p>If you aren&#8217;t or haven&#8217;t looked at creating a Logical Database for reporting purposes you really might check it out. You can tell DG to duplicate only specific schemas, to have a lag-time, and you can create users that only exist on the reporting DB as well as index the **** out of it so their queries perform better.  Yes, I know indexes come with an overhead expense, but this is on our reporting DB specifically &#8212; not production &#8212; so I really don&#8217;t care if it takes a little extra space or a few extra CPU cycles to insert, update, or delete data from the indexes. The benefits outweigh the costs in such a scenario.</p>
<p>It&#8217;s always a great feeling when you can alleviate some of the monotonous administrative tasks &#8212; i.e. weekly duplications on a Friday afternoon when you really want to be at the bar instead. This way, their data is always current; now they won&#8217;t complain that we duplicated it two days before the month ended and they really needed the whole month&#8217;s data available! They will have near-real time data at their finger tips.</p>
<p>The next thing is to get them out of fat client reporting tools and to take a good hard look at <a href="http://www.oracle.com/technology/products/database/application_express/index.html">Application Express</a> <img src='http://itknowledgeexchange.techtarget.com/oracle-dba/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /></p>
]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/oracle-dba/a-win-for-us-and-the-customers/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Piggybacking on VI&#8217;s importance&#8230;</title>
		<link>http://itknowledgeexchange.techtarget.com/oracle-dba/piggybacking-on-vis-importance/</link>
		<comments>http://itknowledgeexchange.techtarget.com/oracle-dba/piggybacking-on-vis-importance/#comments</comments>
		<pubDate>Fri, 10 Jul 2009 16:06:21 +0000</pubDate>
		<dc:creator>Richard Evans</dc:creator>
		
		<category><![CDATA[SQL]]></category>

		<category><![CDATA[DML]]></category>

		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/oracle-dba/?p=61</guid>
		<description><![CDATA[As a guy who uses Solaris for 99% of his administration I&#8217;ve gone from fearing vi to loving and respecting it and seriously considering buying it a valentine&#8217;s day present every year. That&#8217;s probably best reserved for a different blog all together:-)
This is a good write-up on why VI is such a powerful too even [...]]]></description>
			<content:encoded><![CDATA[<p>As a guy who uses Solaris for 99% of his administration I&#8217;ve gone from fearing vi to loving and respecting it and seriously considering buying it a valentine&#8217;s day present every year. That&#8217;s probably best reserved for a different blog all together:-)</p>
<p>This is a good write-up on why VI is such a powerful too even today.<br />
<a href="http://www.viemu.com/a-why-vi-vim.html">Why, oh WHY, do those #?@! nutheads use vi?<br />
</a></p>
<p>I&#8217;m by no means an expert. I have learned enough vi to make my daily life so much easier though. As a lazy computer guy, VI is your best friend!! </p>
<p>Some examples of how I use vi on a regular basis.. creating bulk insert statements, generating quick shell scripts to execute similar commands repeatedly, and other countless items&#8230;</p>
<p>Yesterday, I was playing with NLS_SORT and I wanted to generate a table with a lot of first &amp; last names. This would take forever if I did it by hand. Thank god there is the Internet!! I downloaded a random .CSV with distinct first name and last name columns, removed the extranious data, and then pasted that data into vi.</p>
<p><code><br />
[oracle: /oracle] more insert_first_last_names.sql<br />
Ralph Lauren<br />
Piper Laurie<br />
D.H. Lawrence<br />
Martin Lawrence<br />
Steve Lawrence<br />
Thomas Lawrence<br />
Vickie Lawrence<br />
Bill Lee<br />
</code></p>
<p>A quick table creation&#8230;<br />
<code><br />
create table rich_test (first_name varchar2(30), last_name varchar2(40));</code></p>
<p>And now comes the vi fun! Since I know I have only first and last names at this point, I can assume the space between them delineates first from last. </p>
<p>## This guy will take the space and replace it with tick comma tick&#8230;<br />
<code>:%s/ /','/g</p>
<p>Ralph&#8217;,'Lauren<br />
Piper&#8217;,'Laurie<br />
D.H.&#8217;,'Lawrence<br />
Martin&#8217;,'Lawrence<br />
Steve&#8217;,'Lawrence<br />
Thomas&#8217;,'Lawrence<br />
Vickie&#8217;,'Lawrence<br />
Bill&#8217;,'Lee<br />
</code></p>
<p>Now let&#8217;s get the insert statement taken care of&#8230;</p>
<p>## make sure you don&#8217;t forget the tick at the beginning of the first name!<br />
<code><br />
:%s/^/insert into rich_test values(&#8217;/g</p>
<p>insert into rich_test values(&#8217;Ralph&#8217;,'Lauren<br />
insert into rich_test values(&#8217;Piper&#8217;,'Laurie<br />
insert into rich_test values(&#8217;D.H.&#8217;,'Lawrence<br />
insert into rich_test values(&#8217;Martin&#8217;,'Lawrence<br />
insert into rich_test values(&#8217;Steve&#8217;,'Lawrence<br />
insert into rich_test values(&#8217;Thomas&#8217;,'Lawrence<br />
insert into rich_test values(&#8217;Vickie&#8217;,'Lawrence<br />
insert into rich_test values(&#8217;Bill&#8217;,'Lee<br />
</code></p>
<p>Last, we can finish it off by closing out the last_name tick, the parenthesis and do NOT forget the semicolon! Otherwise you&#8217;ll be left with a bunch of insert statements that are waiting for you to send them!<br />
<code><br />
:%s/$/&#8217;);/g</p>
<p>insert into rich_test values(&#8217;Ralph&#8217;,'Lauren&#8217;);<br />
insert into rich_test values(&#8217;Piper&#8217;,'Laurie&#8217;);<br />
insert into rich_test values(&#8217;D.H.&#8217;,'Lawrence&#8217;);<br />
insert into rich_test values(&#8217;Martin&#8217;,'Lawrence&#8217;);<br />
insert into rich_test values(&#8217;Steve&#8217;,'Lawrence&#8217;);<br />
insert into rich_test values(&#8217;Thomas&#8217;,'Lawrence&#8217;);<br />
insert into rich_test values(&#8217;Vickie&#8217;,'Lawrence&#8217;);<br />
insert into rich_test values(&#8217;Bill&#8217;,'Lee&#8217;);<br />
</code><br />
Now it&#8217;s as simple as running our SQL statement and then committing the data!<br />
<code><br />
SQL&gt; @&#8221;insert_first_last_names.sql&#8221;</p>
<p>1 row created.<br />
1 row created.<br />
1 row created.<br />
1 row created.<br />
1 row created.<br />
1 row created.<br />
1 row created.<br />
1 row created.<br />
</code><br />
I&#8217;ve only given you an example with a few entries, but this is beautiful if you wanted to generate a table with a few thousand, tens of thousands, or hundreds of thousands of rows. It&#8217;s really just that quick and easy. </p>
<p>Until you&#8217;ve memorized the commands, you should keep a cheat sheet close at hand. This one looks pretty good! <a href="http://www.atmos.albany.edu/deas/atmclasses/atm350/vi_cheat_sheet.pdf">vi Editor “Cheat Sheet”</a></p>
<p>And one final note, keep your hands on the home keys. The sooner you learn to use h, j,k, &amp; l to navigate the better off you&#8217;ll be. </p>
]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/oracle-dba/piggybacking-on-vis-importance/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Grid Control Job to Excel Worksheet</title>
		<link>http://itknowledgeexchange.techtarget.com/oracle-dba/grid-control-job-to-excel-worksheet/</link>
		<comments>http://itknowledgeexchange.techtarget.com/oracle-dba/grid-control-job-to-excel-worksheet/#comments</comments>
		<pubDate>Fri, 10 Jul 2009 00:04:34 +0000</pubDate>
		<dc:creator>Richard Evans</dc:creator>
		
		<category><![CDATA[Excel]]></category>

		<category><![CDATA[microsoft]]></category>

		<category><![CDATA[job]]></category>

		<category><![CDATA[SQL Script]]></category>

		<category><![CDATA[GC]]></category>

		<category><![CDATA[reporting]]></category>

		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/oracle-dba/?p=42</guid>
		<description><![CDATA[Often times I&#8217;m asked to run a report that requires querying multiple databases. I suppose I could just setup DB Links and use a UNION ALL but why, when I have Grid Control?  
First thing I do is setup a SQL Script job in Grid Control that looks like this. In addition to the [...]]]></description>
			<content:encoded><![CDATA[<p>Often times I&#8217;m asked to run a report that requires querying multiple databases. I suppose I could just setup DB Links and use a UNION ALL but why, when I have Grid Control? <img src='http://itknowledgeexchange.techtarget.com/oracle-dba/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p><strong>First thing I do is setup a SQL Script job in Grid Control that looks like this. In addition to the user information, this query will get the DB Name so I know the user-DB relationship.</strong></p>
<p>WHENEVER SQLERROR EXIT FAILURE;<br />
set head off<br />
set lines 210<br />
column output format a140<br />
select (select name from v$database)||&#8217;,'||username||&#8217;,'||account_status||&#8217;,'||created||&#8217;,'||profile as output from dba_users;</p>
<p><strong>Make sure you run this job as SYSDBA so you have the correct privileges to query dba_users</strong></p>
<p><strong>Now that you have the results you can query them from SYSMAN&#8217;s table&#8230;</strong></p>
<p>select output from MGMT$JOB_STEP_HISTORY where job_name = &#8216;TEST111&#8242;;</p>
<p><strong>Paste that output into Excel and you&#8217;ll end up with something like this:</strong></p>
<p><a href="http://http.cdnlayer.com/itke/blogs.dir/133/files/2009/07/joboutput_to_excel_1.png"><img src="http://http.cdnlayer.com/itke/blogs.dir/133/files/2009/07/joboutput_to_excel_1.png" alt="" width="298" height="300" class="alignnone size-medium wp-image-43" /></a></p>
<p><strong>Now use the Text to Columns function in Excel to migrate the data to individual columns.</strong></p>
<p><a href="http://http.cdnlayer.com/itke/blogs.dir/133/files/2009/07/joboutput_to_excel_2.png"><img src="http://http.cdnlayer.com/itke/blogs.dir/133/files/2009/07/joboutput_to_excel_2.png" alt="" width="300" height="217" class="alignnone size-medium wp-image-44" /></a></p>
<p><a href="http://http.cdnlayer.com/itke/blogs.dir/133/files/2009/07/joboutput_to_excel_3.png"><img src="http://http.cdnlayer.com/itke/blogs.dir/133/files/2009/07/joboutput_to_excel_3.png" alt="" width="300" height="217" class="alignnone size-medium wp-image-44" /></a></p>
<p><strong> The final output! </strong></p>
<p><a href="http://http.cdnlayer.com/itke/blogs.dir/133/files/2009/07/joboutput_to_excel_5.png"><img src="http://http.cdnlayer.com/itke/blogs.dir/133/files/2009/07/joboutput_to_excel_5.png" alt="" width="292" height="300" class="alignnone size-medium wp-image-52" /></a></p>
<p><strong>This is a great way to produce quick reports that span multiple databases. </strong></p>
]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/oracle-dba/grid-control-job-to-excel-worksheet/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Preventing MS Word from formatting your code&#8230;</title>
		<link>http://itknowledgeexchange.techtarget.com/oracle-dba/19/</link>
		<comments>http://itknowledgeexchange.techtarget.com/oracle-dba/19/#comments</comments>
		<pubDate>Thu, 09 Jul 2009 21:21:26 +0000</pubDate>
		<dc:creator>Richard Evans</dc:creator>
		
		<category><![CDATA[technical writing]]></category>

		<category><![CDATA[formatting]]></category>

		<category><![CDATA[microsoft]]></category>

		<category><![CDATA[office]]></category>

		<category><![CDATA[word]]></category>

		<category><![CDATA[ms word]]></category>

		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/oracle-dba/?p=19</guid>
		<description><![CDATA[This is probably a problem that was solved years ago but I figured it out recently. Hopefully it helps someone!
The Problem
When I&#8217;m in Word and I&#8217;m creating or modifying documentation that involves code, Word wants to automatically replace certain characters with characters it thinks looks better.
Often times, I don&#8217;t notice it did that until I [...]]]></description>
			<content:encoded><![CDATA[<p>This is probably a problem that was solved years ago but I figured it out recently. Hopefully it helps someone!</p>
<p><strong>The Problem</strong></p>
<p>When I&#8217;m in Word and I&#8217;m creating or modifying documentation that involves code, Word wants to automatically replace certain characters with characters it thinks looks better.</p>
<p>Often times, I don&#8217;t notice it did that until I go to use the code. Here you&#8217;ll see the &#8220;smart quotes&#8221; ( ` ) that Word automatically replaced my straight quote ( &#8216; ) with.</p>
<p><code><br />
SQL&gt; select job_id, job_name, job_owner, job_status<br />
from mgmt_job<br />
where job_status != 0<br />
and job_name like ‘%LEVEL%0%’<br />
order by job_name</code></p>
<p>It doesn&#8217;t look like much of difference, but it shows up in SSH as a period ( . ) and then errors.</p>
<p><code><br />
SQL&gt; select job_id, job_name, job_owner, job_status<br />
from mgmt_job<br />
where job_status != 0<br />
and job_name like .%LEVEL%0%.<br />
order by job_name<br />
/<br />
and job_name like .%LEVEL%0%.<br />
*<br />
ERROR at line 4:<br />
ORA-00936: missing expression</code></p>
<p><strong>The Fix</strong></p>
<p>When you set options on the AutoFormat As You Type tab (Tools menu, AutoCorrect Options command), Word can automatically format text as you&#8217;re typing your document. For example, if you type a number followed by a period or hyphen, followed by a space or tab, followed by text, Word makes the text a numbered list.</p>
<p style="text-align: left"><a href="http://http.cdnlayer.com/itke/blogs.dir/133/files/2009/07/wordautoformatfix.png"><img class="size-full wp-image-21 alignleft" src="http://http.cdnlayer.com/itke/blogs.dir/133/files/2009/07/wordautoformatfix.png" alt="" width="304" height="241" /></a>When Word applies automatic formatting, you can use the AutoCorrect Options button to undo the action or change AutoFormat settings. Depending on the situation, the entire button may appear or the button may first appear as a small, blue box that changes to a button icon when you point to it.</p>
<p>I unchecked the first option, straight quotes vs. smart quotes as well as the hyphens and the bold/italic options.</p>
<p> </p>
<p> </p>
<p>If the automatic borders, tables or bullet lists annoy you there are options there to fix them as well <img src='http://itknowledgeexchange.techtarget.com/oracle-dba/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /></p>
]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/oracle-dba/19/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Inaccessible UNIX filenames&#8230;</title>
		<link>http://itknowledgeexchange.techtarget.com/oracle-dba/inaccessible-unix-filenames/</link>
		<comments>http://itknowledgeexchange.techtarget.com/oracle-dba/inaccessible-unix-filenames/#comments</comments>
		<pubDate>Thu, 09 Jul 2009 20:47:06 +0000</pubDate>
		<dc:creator>Richard Evans</dc:creator>
		
		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/oracle-dba/?p=15</guid>
		<description><![CDATA[I goofed up earlier and somehow managed to give my file a name. To fix this I was able to rename it by using ctl+v followed by ctl+h to generate the ^H character.
The Problem
When I saved it in vi I somehow messed up my :wq! And I it saved it with this name:

&#8220;^H&#8221; [New file] [...]]]></description>
			<content:encoded><![CDATA[<p>I goofed up earlier and somehow managed to give my file a name. To fix this I was able to rename it by using ctl+v followed by ctl+h to generate the ^H character.</p>
<p><strong>The Problem</strong></p>
<p>When I saved it in vi I somehow messed up my :wq! And I it saved it with this name:</p>
<p><code><br />
&#8220;^H&#8221; [New file] 167 lines, 3054 characters<br />
</code></p>
<p>You can see below that there is a file with no filename. </p>
<p><code><br />
[oracle: /oracle/DB/102_64/network/admin] ls -al<br />
total 38<br />
-rw-r&#8211;r&#8211; 1 oracle dba 3054 Jun 17 11:12<br />
drwxr-x&#8212; 3 oracle dba 1024 Jun 17 11:12 .<br />
drwxr-x&#8212; 13 oracle dba 1024 Feb 20 15:48 ..<br />
-rw-r&#8211;r&#8211; 1 oracle dba 695 Mar 5 14:32 listener.ora<br />
drwxr-x&#8212; 2 oracle dba 96 Feb 20 15:45 samples<br />
-rw-r&#8212;&#8211; 1 oracle dba 172 Dec 26 2003 shrept.lst<br />
-rw-r&#8211;r&#8211; 1 oracle dba 172 May 27 13:57 sqlnet.ora<br />
-rw-r&#8211;r&#8211; 1 oracle dba 4069 Jun 17 11:11 tnsnames.ora<br />
-rw-r&#8212;&#8211; 1 oracle dba 6759 May 1 11:16 tnsnames.ora.20090319</p>
<p>[oracle: /oracle/DB/102_64/network/admin] find ./ -ls<br />
373 1 drwxr-x&#8212; 3 oracle dba 1024 Jun 17 11:12 ./<br />
374 0 drwxr-x&#8212; 2 oracle dba 96 Feb 20 15:45 ./samples<br />
2101 4 -rw-r&#8212;&#8211; 1 oracle dba 3867 Sep 9 1997 ./samples/listener.ora<br />
4652 31 -rw-r&#8212;&#8211; 1 oracle dba 31023 Sep 9 2003 ./samples/sqlnet.ora<br />
4653 3 -rw-r&#8212;&#8211; 1 oracle dba 2939 May 16 2000 ./samples/tnsnames.ora<br />
10346 1 -rw-r&#8212;&#8211; 1 oracle dba 172 Dec 26 2003 ./shrept.lst<br />
2002 1 -rw-r&#8211;r&#8211; 1 oracle dba 695 Mar 5 14:32 ./listener.ora<br />
2003 4 -rw-r&#8211;r&#8211; 1 oracle dba 4069 Jun 17 11:11 ./tnsnames.ora<br />
18456 7 -rw-r&#8212;&#8211; 1 oracle dba 6759 May 1 11:16 ./tnsnames.ora.20090319<br />
28266 1 -rw-r&#8211;r&#8211; 1 oracle dba 172 May 27 13:57 ./sqlnet.ora<br />
28342 3 -rw-r&#8211;r&#8211; 1 oracle dba 3054 Jun 17 11:12 ./</p>
<p>[oracle: /oracle/DB/102_64/network/admin] find ./ -type f -ls<br />
2101 4 -rw-r&#8212;&#8211; 1 oracle dba 3867 Sep 9 1997 ./samples/listener.ora<br />
4652 31 -rw-r&#8212;&#8211; 1 oracle dba 31023 Sep 9 2003 ./samples/sqlnet.ora<br />
4653 3 -rw-r&#8212;&#8211; 1 oracle dba 2939 May 16 2000 ./samples/tnsnames.ora<br />
10346 1 -rw-r&#8212;&#8211; 1 oracle dba 172 Dec 26 2003 ./shrept.lst<br />
2002 1 -rw-r&#8211;r&#8211; 1 oracle dba 695 Mar 5 14:32 ./listener.ora<br />
2003 4 -rw-r&#8211;r&#8211; 1 oracle dba 4069 Jun 17 11:11 ./tnsnames.ora<br />
18456 7 -rw-r&#8212;&#8211; 1 oracle dba 6759 May 1 11:16 ./tnsnames.ora.20090319<br />
28266 1 -rw-r&#8211;r&#8211; 1 oracle dba 172 May 27 13:57 ./sqlnet.ora<br />
28342 3 -rw-r&#8211;r&#8211; 1 oracle dba 3054 Jun 17 11:12 ./<br />
</code></p>
<p><strong>The Fix</strong></p>
<p>By using the ctl+v followed by ctl+h I was able to reproduce the ^H character and get the file information.</p>
<p><code><br />
[oracle: /oracle/DB/102_64/network/admin] ls -al ^H<br />
-rw-r&#8211;r&#8211; 1 oracle dba 3054 Jun 17 11:12<br />
</code></p>
<p>Now I move it to a file with a legit name&#8230;</p>
<p><code><br />
[oracle: /oracle/DB/102_64/network/admin] mv ^H test<br />
</code></p>
<p>Now I can move it to something useful <img src='http://itknowledgeexchange.techtarget.com/oracle-dba/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/oracle-dba/inaccessible-unix-filenames/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Silent Install of Oracle EM Agent 10.2.0.4</title>
		<link>http://itknowledgeexchange.techtarget.com/oracle-dba/silent-install-of-oracle-em-agent-10204/</link>
		<comments>http://itknowledgeexchange.techtarget.com/oracle-dba/silent-install-of-oracle-em-agent-10204/#comments</comments>
		<pubDate>Thu, 09 Jul 2009 16:31:58 +0000</pubDate>
		<dc:creator>Richard Evans</dc:creator>
		
		<category><![CDATA[em]]></category>

		<category><![CDATA[agent]]></category>

		<category><![CDATA[silent installation]]></category>

		<category><![CDATA[responsefile]]></category>

		<category><![CDATA[response file]]></category>

		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/oracle-dba/?p=30</guid>
		<description><![CDATA[I install a lot of Oracle EM Agents&#8230; it&#8217;s time consuming and I never seem to do it quite the same way. So I decided to do what any lazy computer guy would do and spend a day configuring various response files so I don&#8217;t ever have to work again! Well, at least so I [...]]]></description>
			<content:encoded><![CDATA[<p>I install a lot of Oracle EM Agents&#8230; it&#8217;s time consuming and I never seem to do it quite the same way. So I decided to do what any lazy computer guy would do and spend a day configuring various response files so I don&#8217;t ever have to work again! Well, at least so I don&#8217;t have to manually install EM Agent 10.2.0.4 again :-0</p>
<p><strong>I changed was the base directory and the OMSConnectInfo variables. I think that was it&#8230; double check the file though.</strong></p>
<p>[oracle: /oracle] vi /group/software/oracle/stage/102_64/Agents/10.2.0.4/solaris/response/additional_agent.rsp</p>
<p>BASEDIR=/oracle/OracleHomes<br />
sl_OMSConnectInfo={&#8221;omsapp&#8221;,&#8221;1159&#8243;}</p>
<p>cd /group/software/oracle/stage/102_64/Agents/10.2.0.4/solaris/agent</p>
<p>./runInstaller -silent -responseFile /group/software/oracle/stage/102_64/Agents/10.2.0.4/solaris/response/additional_agent.rsp -force</p>
<p><strong>Next, what I like to do is setup the Agent environment so we can use it&#8217;s $ORACLE_HOME variables. I put the agent information in /var/opt/oracle/oratab so I can easily assume it&#8217;s environment:</strong></p>
<p>echo &#8220;agt:/oracle/OracleHomes/agent10g:Y&#8221; &gt;&gt; /var/opt/oracle/oratab</code></p>
<p>[oracle: /oracle] grep agt /var/opt/oracle/oratab<br />
agt:/oracle/OracleHomes/agent10g:Y</p>
<p>[oracle: /oracle] oraenv<br />
ORACLE_SID = [DDSC1] ? agt</p>
<p><strong>Check if the agent is running, if so, shut it down!</strong></p>
<p>[oracle: /oracle/OracleHomes/agent10g] ps -ef | grep ora<br />
oracle 19566 17696 0 16:26:42 pts/8 0:00 /oracle/OracleHomes/agent10g/perl/bin/perl /oracle/OracleHomes/agent10g/bin/emw<br />
oracle 20102 12101 0 16:27:39 pts/8 0:00 ps -ef<br />
oracle 7585 7207 0 16:10:39 pts/1 0:00 -ksh<br />
oracle 20103 12101 0 16:27:39 pts/8 0:00 grep ora<br />
oracle 19574 19566 0 16:26:43 pts/8 0:03 /oracle/OracleHomes/agent10g/bin/emagent<br />
root 18306 17696 0 14:39:11 ? 0:00 /usr/lib/dmi/snmpXdmid -s orastc1<br />
oracle 12101 12088 0 16:16:15 pts/8 0:00 -ksh<br />
oracle 15290 17696 0 16:19:18 ? 0:00 /oracle/STC1/102_64/bin/tnslsnr LISTENER -inherit</p>
<p>[oracle: /oracle/OracleHomes/agent10g] emctl stop agent<br />
Oracle Enterprise Manager 10g Release 4 Grid Control 10.2.0.4.0.<br />
Copyright (c) 1996, 2007 Oracle Corporation. All rights reserved.<br />
Stopping agent &#8230; stopped.</p>
<p><strong>To secure an Agent when the OMS has already been secured. Reference Note 283091.1 on Metalink.</strong></p>
<p>vi /oracle/OracleHomes/agent10g/sysman/config/emd.properties</p>
<p>Make sure you change the following lines to read https not http.</p>
<p>EMD_URL=https://oradtc1:3872/emd/main/<br />
REPOSITORY_URL=https://omsapp:1159/em/upload/<br />
emdWalletSrcUrl=https://omsapp:1159/em/wallets/emd[/code]</p>
<p><strong>Now secure the agent!!</strong></p>
<p>[oracle: /oracle] emctl secure agent<br />
Oracle Enterprise Manager 10g Release 4 Grid Control 10.2.0.4.0.<br />
Copyright (c) 1996, 2007 Oracle Corporation. All rights reserved.<br />
Enter Agent Registration password :<br />
Agent is already stopped&#8230; Done.<br />
Securing agent&#8230; Started.<br />
Requesting an HTTPS Upload URL from the OMS&#8230; Done.<br />
Requesting an Oracle Wallet and Agent Key from the OMS&#8230; Done.<br />
Check if HTTPS Upload URL is accessible from the agent&#8230; Done.<br />
Configuring Agent for HTTPS in CENTRAL_AGENT mode&#8230; Done.<br />
EMD_URL set in /oracle/OracleHomes/agent10g/sysman/config/emd.properties<br />
publicKeyFile = /oracle/OracleHomes/agent10g/sysman/config/nmosudo.props<br />
Generating RSA keys.</p>
<p>Saving private key in wallet.<br />
SaveKeyWallet: Cannot open wallet (error=28759): file:/oracle/OracleHomes/agent10g/sysman/config<br />
SaveKeyWallet: Re-creating wallet.</p>
<p>Reading private key from wallet.</p>
<p>Saving public key into file.</p>
<p>Reading public key from file.</p>
<p>Encrypting clear-text: gensudoprops pass.</p>
<p>Decrypting encrypted-text.<br />
Decrypted Text: gensudoprops pass<br />
Securing agent&#8230; Successful.</p>
<p><strong>Fire the bad boy back up!</strong></p>
<p>[oracle: /oracle] emctl start agent</p>
<p>Oracle Enterprise Manager 10g Release 4 Grid Control 10.2.0.4.0.<br />
Copyright (c) 1996, 2007 Oracle Corporation. All rights reserved.<br />
Starting agent &#8230;&#8230; started.</p>
<p><strong>If this happens&#8230;</strong></p>
<p>[oracle: /oracle] emctl start agent<br />
Oracle Enterprise Manager 10g Release 4 Grid Control 10.2.0.4.0.<br />
Copyright (c) 1996, 2007 Oracle Corporation. All rights reserved.<br />
Starting agent &#8230;.. failed.<br />
Failed to start HTTP listener.<br />
Consult the log files in: /oracle/OracleHomes/agent10g/sysman/log</p>
<p><strong>Re-run the secure command&#8230;</strong></p>
<p>[oracle: /oracle/OracleHomes/agent10g/sysman/config] emctl secure agent<br />
Oracle Enterprise Manager 10g Release 4 Grid Control 10.2.0.4.0.<br />
Copyright (c) 1996, 2007 Oracle Corporation. All rights reserved.<br />
Enter Agent Registration password :<br />
Agent is already stopped&#8230; Done.<br />
Securing agent&#8230; Started.<br />
Requesting an HTTPS Upload URL from the OMS&#8230; Done.<br />
Requesting an Oracle Wallet and Agent Key from the OMS&#8230; Done.<br />
Check if HTTPS Upload URL is accessible from the agent&#8230; Done.<br />
Configuring Agent for HTTPS in CENTRAL_AGENT mode&#8230; Done.<br />
EMD_URL set in /oracle/OracleHomes/agent10g/sysman/config/emd.properties<br />
publicKeyFile = /oracle/OracleHomes/agent10g/sysman/config/nmosudo.props<br />
Generating RSA keys.</p>
<p>Saving private key in wallet.</p>
<p>Reading private key from wallet.</p>
<p>Saving public key into file.</p>
<p>Reading public key from file.</p>
<p>Encrypting clear-text: gensudoprops pass.</p>
<p>Decrypting encrypted-text.<br />
Decrypted Text: gensudoprops pass<br />
Securing agent&#8230; Successful.</p>
]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/oracle-dba/silent-install-of-oracle-em-agent-10204/feed/</wfw:commentRss>
		</item>
		<item>
		<title>select user from dual&#8230;</title>
		<link>http://itknowledgeexchange.techtarget.com/oracle-dba/hello-world/</link>
		<comments>http://itknowledgeexchange.techtarget.com/oracle-dba/hello-world/#comments</comments>
		<pubDate>Thu, 09 Jul 2009 00:00:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/oracle-dba/hello-world/</guid>
		<description><![CDATA[
SQL&#62; select user from dual;
USER
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;
Rich
  
 
Hi, My name is Rich and I&#8217;ve started yet another Oracle blog for you to keep track of (use Google Reader, it rocks!). Will this one be better than the rest? Different from them? How about at least above average? Probably not. But this a good avenue for me [...]]]></description>
			<content:encoded><![CDATA[<p><code><br />
SQL&gt; select user from dual;</p>
<p>USER<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
Rich</p>
<p> <img src='http://itknowledgeexchange.techtarget.com/oracle-dba/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </code></p>
<p> <br />
Hi, My name is Rich and I&#8217;ve started yet another Oracle blog for you to keep track of (use Google Reader, it rocks!). Will this one be better than the rest? Different from them? How about at least above average? Probably not. But this a good avenue for me to share my experiences and stories as an Oracle DBA.  </p>
<p>As a DBA, I&#8217;ve used and abused so many forums, blogs, and websites over the years it should be criminal. I feel that it&#8217;s now my turn to be the abusee (is that even a word?). As I learn new things I&#8217;ll try to post them here so others have the ability to learn from my mistakes and/or accomplishments.</p>
<p>Use whatever cliche you want: <em>don&#8217;t reinvent the wheel</em>, <em>work smarter not harder</em>, etc, etc. No matter what you call it, it&#8217;s a practice I try to follow <img src='http://itknowledgeexchange.techtarget.com/oracle-dba/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>I&#8217;ve always said the best computer guys are the laziest computer guys. How many times have you tried to find a way to automate even the simplest of processes? If you can&#8217;t count that high you&#8217;re probably pretty good at what you do! <img src='http://itknowledgeexchange.techtarget.com/oracle-dba/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>If you have any questions for me, about my posts, or on items you&#8217;d like to see on here please let me know.</p>
]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/oracle-dba/hello-world/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
<!-- dynamic -->