<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic script help oracle in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help-oracle/m-p/3928939#M762136</link>
    <description>$ORACLE_HOME/bin/sqlplus /nolog &amp;lt;&lt;EOF&gt; DB_INFO&lt;BR /&gt;connect / as sysdba;&lt;BR /&gt;set linesize 200;&lt;BR /&gt;select db_unique_name, dbid from v\$database;&lt;BR /&gt;select name ||':' || block_size from v\$controlfile;&lt;BR /&gt;select file_name ||':'||tablespace_name||':'|| status from dba_data_files&lt;BR /&gt;order by tablespace_name;&lt;BR /&gt;exit&lt;BR /&gt;EOF&lt;BR /&gt;&lt;BR /&gt;DB_NAME=`/usr/bin/awk '$2 == "2859985154" { print $1}' DB_INFO`&lt;BR /&gt;CONTROLFILE=`/usr/bin/awk -F: '$2 == "16384" { print "\n" $1 }' DB_INFO`&lt;BR /&gt;DATE=`/usr/bin/date +%y%m%d`&lt;BR /&gt;CONTROLFILE_BACK=${ORACLE_HOME}/dbs/control.${DATE}&lt;BR /&gt;FILE_NAME=`/usr/bin/awk -F: '$3 == "AVAILABLE" { print $1 }' DB_INFO`&lt;BR /&gt;TABLESPACE_NAME=`/usr/bin/awk -F: '$3 == "AVAILABLE" { print $2 }' DB_INFO`&lt;BR /&gt;&lt;BR /&gt;echo $DB_NAME&lt;BR /&gt;echo $CONTROLFILE&lt;BR /&gt;echo $DATE&lt;BR /&gt;echo $CONTROLFILE_BACK&lt;BR /&gt;echo $FILE_NAME&lt;BR /&gt;echo $TABLESPACE_NAME&lt;BR /&gt;&lt;BR /&gt;DB_INFO is below&lt;BR /&gt;SQL*Plus: Release 10.2.0.2.0 - Production on Fri Jan 19 15:52:47 2007&lt;BR /&gt;&lt;BR /&gt;Copyright (c) 1982, 2005, Oracle.  All Rights Reserved.&lt;BR /&gt;&lt;BR /&gt;SQL&amp;gt; Connected.&lt;BR /&gt;SQL&amp;gt; SQL&amp;gt; &lt;BR /&gt;DB_UNIQUE_NAME                       DBID&lt;BR /&gt;------------------------------ ----------&lt;BR /&gt;IAEIS                          2859985154&lt;BR /&gt;&lt;BR /&gt;SQL&amp;gt; &lt;BR /&gt;NAME||':'||BLOCK_SIZE&lt;BR /&gt;--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;/oradata/IAEIS/control01.ctl:16384&lt;BR /&gt;/oradata/IAEIS/control02.ctl:16384&lt;BR /&gt;/oradata/IAEIS/control03.ctl:16384&lt;BR /&gt;&lt;BR /&gt;SQL&amp;gt;   2  &lt;BR /&gt;FILE_NAME||':'||TABLESPACE_NAME||':'||STATUS&lt;BR /&gt;--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;/oradata/IAEIS_DATAFILE/agriedu01.dbf:AGRIEDU:AVAILABLE&lt;BR /&gt;/oradata/IAEIS/sysaux01.dbf:SYSAUX:AVAILABLE&lt;BR /&gt;/oradata/IAEIS/system01.dbf:SYSTEM:AVAILABLE&lt;BR /&gt;/oradata/IAEIS/undotbs01.dbf:UNDOTBS1:AVAILABLE&lt;BR /&gt;/oradata/IAEIS/users01.dbf:USERS:AVAILABLE&lt;BR /&gt;&lt;BR /&gt;SQL&amp;gt; Disconnected from Oracle Database 10g Release 10.2.0.2.0 - 64bit Production&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;the output is...&lt;BR /&gt;&lt;BR /&gt;IAEIS&lt;BR /&gt;/oradata/IAEIS/control01.ctl /oradata/IAEIS/control02.ctl /oradata/IAEIS/control03.ctl&lt;BR /&gt;/oracle/product/dbs/control.070119&lt;BR /&gt;/oradata/IAEIS_DATAFILE/agriedu01.dbf /oradata/IAEIS/sysaux01.dbf /oradata/IAEIS/system01.dbf /oradata/IAEIS/undotbs01.dbf /oradata/IAEIS/users01.dbf&lt;BR /&gt;AGRIEDU SYSAUX SYSTEM UNDOTBS1 USERS&lt;BR /&gt;&lt;BR /&gt;How can I get the output like.&lt;BR /&gt;&lt;BR /&gt;IAEIS&lt;BR /&gt;/oradata/IAEIS/control01.ctl&lt;BR /&gt;/oradata/IAEIS/control02.ctl&lt;BR /&gt;/oradata/IAEIS/control03.ctl&lt;BR /&gt;070119&lt;BR /&gt;/oradata/IAEIS_DATAFILE/agriedu01.dbf&lt;BR /&gt;/oradata/IAEIS/sysaux01.dbf &lt;BR /&gt;/oradata/IAEIS/system01.dbf &lt;BR /&gt;/oradata/IAEIS/undotbs01.dbf &lt;BR /&gt;/oradata/IAEIS/users01.dbf&lt;BR /&gt;AGRIEDU&lt;BR /&gt;SYSAUX&lt;BR /&gt;SYSTEM&lt;BR /&gt;UNDOTBS1&lt;BR /&gt;USERS&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/EOF&gt;</description>
    <pubDate>Fri, 19 Jan 2007 02:04:58 GMT</pubDate>
    <dc:creator>file system</dc:creator>
    <dc:date>2007-01-19T02:04:58Z</dc:date>
    <item>
      <title>script help oracle</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help-oracle/m-p/3928939#M762136</link>
      <description>$ORACLE_HOME/bin/sqlplus /nolog &amp;lt;&lt;EOF&gt; DB_INFO&lt;BR /&gt;connect / as sysdba;&lt;BR /&gt;set linesize 200;&lt;BR /&gt;select db_unique_name, dbid from v\$database;&lt;BR /&gt;select name ||':' || block_size from v\$controlfile;&lt;BR /&gt;select file_name ||':'||tablespace_name||':'|| status from dba_data_files&lt;BR /&gt;order by tablespace_name;&lt;BR /&gt;exit&lt;BR /&gt;EOF&lt;BR /&gt;&lt;BR /&gt;DB_NAME=`/usr/bin/awk '$2 == "2859985154" { print $1}' DB_INFO`&lt;BR /&gt;CONTROLFILE=`/usr/bin/awk -F: '$2 == "16384" { print "\n" $1 }' DB_INFO`&lt;BR /&gt;DATE=`/usr/bin/date +%y%m%d`&lt;BR /&gt;CONTROLFILE_BACK=${ORACLE_HOME}/dbs/control.${DATE}&lt;BR /&gt;FILE_NAME=`/usr/bin/awk -F: '$3 == "AVAILABLE" { print $1 }' DB_INFO`&lt;BR /&gt;TABLESPACE_NAME=`/usr/bin/awk -F: '$3 == "AVAILABLE" { print $2 }' DB_INFO`&lt;BR /&gt;&lt;BR /&gt;echo $DB_NAME&lt;BR /&gt;echo $CONTROLFILE&lt;BR /&gt;echo $DATE&lt;BR /&gt;echo $CONTROLFILE_BACK&lt;BR /&gt;echo $FILE_NAME&lt;BR /&gt;echo $TABLESPACE_NAME&lt;BR /&gt;&lt;BR /&gt;DB_INFO is below&lt;BR /&gt;SQL*Plus: Release 10.2.0.2.0 - Production on Fri Jan 19 15:52:47 2007&lt;BR /&gt;&lt;BR /&gt;Copyright (c) 1982, 2005, Oracle.  All Rights Reserved.&lt;BR /&gt;&lt;BR /&gt;SQL&amp;gt; Connected.&lt;BR /&gt;SQL&amp;gt; SQL&amp;gt; &lt;BR /&gt;DB_UNIQUE_NAME                       DBID&lt;BR /&gt;------------------------------ ----------&lt;BR /&gt;IAEIS                          2859985154&lt;BR /&gt;&lt;BR /&gt;SQL&amp;gt; &lt;BR /&gt;NAME||':'||BLOCK_SIZE&lt;BR /&gt;--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;/oradata/IAEIS/control01.ctl:16384&lt;BR /&gt;/oradata/IAEIS/control02.ctl:16384&lt;BR /&gt;/oradata/IAEIS/control03.ctl:16384&lt;BR /&gt;&lt;BR /&gt;SQL&amp;gt;   2  &lt;BR /&gt;FILE_NAME||':'||TABLESPACE_NAME||':'||STATUS&lt;BR /&gt;--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;/oradata/IAEIS_DATAFILE/agriedu01.dbf:AGRIEDU:AVAILABLE&lt;BR /&gt;/oradata/IAEIS/sysaux01.dbf:SYSAUX:AVAILABLE&lt;BR /&gt;/oradata/IAEIS/system01.dbf:SYSTEM:AVAILABLE&lt;BR /&gt;/oradata/IAEIS/undotbs01.dbf:UNDOTBS1:AVAILABLE&lt;BR /&gt;/oradata/IAEIS/users01.dbf:USERS:AVAILABLE&lt;BR /&gt;&lt;BR /&gt;SQL&amp;gt; Disconnected from Oracle Database 10g Release 10.2.0.2.0 - 64bit Production&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;the output is...&lt;BR /&gt;&lt;BR /&gt;IAEIS&lt;BR /&gt;/oradata/IAEIS/control01.ctl /oradata/IAEIS/control02.ctl /oradata/IAEIS/control03.ctl&lt;BR /&gt;/oracle/product/dbs/control.070119&lt;BR /&gt;/oradata/IAEIS_DATAFILE/agriedu01.dbf /oradata/IAEIS/sysaux01.dbf /oradata/IAEIS/system01.dbf /oradata/IAEIS/undotbs01.dbf /oradata/IAEIS/users01.dbf&lt;BR /&gt;AGRIEDU SYSAUX SYSTEM UNDOTBS1 USERS&lt;BR /&gt;&lt;BR /&gt;How can I get the output like.&lt;BR /&gt;&lt;BR /&gt;IAEIS&lt;BR /&gt;/oradata/IAEIS/control01.ctl&lt;BR /&gt;/oradata/IAEIS/control02.ctl&lt;BR /&gt;/oradata/IAEIS/control03.ctl&lt;BR /&gt;070119&lt;BR /&gt;/oradata/IAEIS_DATAFILE/agriedu01.dbf&lt;BR /&gt;/oradata/IAEIS/sysaux01.dbf &lt;BR /&gt;/oradata/IAEIS/system01.dbf &lt;BR /&gt;/oradata/IAEIS/undotbs01.dbf &lt;BR /&gt;/oradata/IAEIS/users01.dbf&lt;BR /&gt;AGRIEDU&lt;BR /&gt;SYSAUX&lt;BR /&gt;SYSTEM&lt;BR /&gt;UNDOTBS1&lt;BR /&gt;USERS&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/EOF&gt;</description>
      <pubDate>Fri, 19 Jan 2007 02:04:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help-oracle/m-p/3928939#M762136</guid>
      <dc:creator>file system</dc:creator>
      <dc:date>2007-01-19T02:04:58Z</dc:date>
    </item>
    <item>
      <title>Re: script help oracle</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help-oracle/m-p/3928940#M762137</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;one solution would be to pipe the output through tr to replace every space character with a newline. &lt;BR /&gt;&lt;BR /&gt;Something like&lt;BR /&gt;&lt;BR /&gt;$ORACLE_HOME/bin/sqlplus /nolog &amp;lt;&lt;EOF&gt; DB_INFO&lt;BR /&gt;&lt;BR /&gt;should work.&lt;BR /&gt;&lt;BR /&gt;Hope this helps&lt;BR /&gt;&lt;BR /&gt;Regards Stefan&lt;/EOF&gt;</description>
      <pubDate>Fri, 19 Jan 2007 02:15:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help-oracle/m-p/3928940#M762137</guid>
      <dc:creator>Stefan Schulz</dc:creator>
      <dc:date>2007-01-19T02:15:13Z</dc:date>
    </item>
    <item>
      <title>Re: script help oracle</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help-oracle/m-p/3928941#M762138</link>
      <description>it dose not work&lt;BR /&gt;outputs are same.&lt;BR /&gt;&lt;BR /&gt;can you give me more information?&lt;BR /&gt;&lt;BR /&gt;and One more question..&lt;BR /&gt;after backup command like &lt;BR /&gt;alter tablespace tablespace_name begin backup;&lt;BR /&gt;&lt;BR /&gt;how can I get the database file status 'ACTIVE' relatively tablespace_name</description>
      <pubDate>Fri, 19 Jan 2007 02:47:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help-oracle/m-p/3928941#M762138</guid>
      <dc:creator>file system</dc:creator>
      <dc:date>2007-01-19T02:47:00Z</dc:date>
    </item>
    <item>
      <title>Re: script help oracle</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help-oracle/m-p/3928942#M762139</link>
      <description>Hi,&lt;BR /&gt;can I suggest you review your other threads and see whether you can reward the efforts there and feedback on the status of the problem.&lt;BR /&gt;&lt;BR /&gt;For example:&lt;BR /&gt;&lt;A href="http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1090793" target="_blank"&gt;http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1090793&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;As to your currect problem:&lt;BR /&gt;&lt;BR /&gt;Remove the assignation of ONTROLFILE:&lt;BR /&gt;CONTROLFILE=`/usr/bin/awk -F: '$2 == "16384" { print "\n" $1 }' DB_INFO`&lt;BR /&gt;echo $CONTROLFILE&lt;BR /&gt;&lt;BR /&gt;becomes&lt;BR /&gt;/usr/bin/awk -F: '$2 == "16384" { print $1 }' DB_INFO&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 19 Jan 2007 03:22:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help-oracle/m-p/3928942#M762139</guid>
      <dc:creator>Peter Godron</dc:creator>
      <dc:date>2007-01-19T03:22:19Z</dc:date>
    </item>
    <item>
      <title>Re: script help oracle</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help-oracle/m-p/3928943#M762140</link>
      <description>thank you Peter Godron..&lt;BR /&gt;but the problem is not resolved clearly.&lt;BR /&gt;my question is on going.&lt;BR /&gt;&lt;BR /&gt;ButI'm going to reward you and other's effors too.&lt;BR /&gt;&lt;BR /&gt;and did you see the question last reply;&lt;BR /&gt;I want to get the datafile 'ACTIVE' status &lt;BR /&gt;relative tablespace_name.&lt;BR /&gt;when I run the plsql command like &lt;BR /&gt;'alter tablespace tablespace_name begin backup;&lt;BR /&gt;&lt;BR /&gt;ACTIVE STATUS</description>
      <pubDate>Fri, 19 Jan 2007 03:48:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help-oracle/m-p/3928943#M762140</guid>
      <dc:creator>file system</dc:creator>
      <dc:date>2007-01-19T03:48:33Z</dc:date>
    </item>
    <item>
      <title>Re: script help oracle</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help-oracle/m-p/3928944#M762141</link>
      <description>Hi,&lt;BR /&gt;thanks for reviewing the earlier threads.&lt;BR /&gt;&lt;BR /&gt;Do you mean the status column on dba_data_files ?&lt;BR /&gt;&lt;BR /&gt;Found more details,which may help you with your backup strategy/coding:&lt;BR /&gt;&lt;A href="http://www.ordba.net/Articles/Backup.htm" target="_blank"&gt;http://www.ordba.net/Articles/Backup.htm&lt;/A&gt;</description>
      <pubDate>Fri, 19 Jan 2007 04:29:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help-oracle/m-p/3928944#M762141</guid>
      <dc:creator>Peter Godron</dc:creator>
      <dc:date>2007-01-19T04:29:45Z</dc:date>
    </item>
    <item>
      <title>Re: script help oracle</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help-oracle/m-p/3928945#M762142</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Once again, unless your system is now running 24x7 and you are running this backup script during off-peak hours, i would not recommend this type of backup.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;RMAN provides a neater way of doing backup. It also simplifies the recovery methods.&lt;BR /&gt;&lt;BR /&gt;The problem with the strategy if you are using are:&lt;BR /&gt; 1. it impacts directly on your database performance. (alter tablespace tablespace_name begin backup;)&lt;BR /&gt; 2. If you add a tablespace later, you will have to come review the script again.&lt;BR /&gt;&lt;BR /&gt;when you use RMAN, you don't even "alter tablespace begin backup", you just backup. &lt;BR /&gt;RMAN doesn't need the extra "begin backup" processing.&lt;BR /&gt;&lt;BR /&gt;Also note that, v$backup tells you file by file (since files can be in backup mode or not as well...)&lt;BR /&gt;&lt;BR /&gt;hope this helps!&lt;BR /&gt;&lt;BR /&gt;kind regards&lt;BR /&gt;yogeeraj</description>
      <pubDate>Sat, 20 Jan 2007 02:38:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help-oracle/m-p/3928945#M762142</guid>
      <dc:creator>Yogeeraj_1</dc:creator>
      <dc:date>2007-01-20T02:38:32Z</dc:date>
    </item>
  </channel>
</rss>

