<?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 Re: script help in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/3926202#M761901</link>
    <description>Hy&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/ksh&lt;BR /&gt;ctl_files=`sqlplus -s "/ as sysdba" &amp;lt;&lt;EOF&gt;&lt;/EOF&gt;  set echo off head off feed off&lt;BR /&gt;  select name from v\\$controlfile;&lt;BR /&gt;  exit&lt;BR /&gt;EOF`&lt;BR /&gt;&lt;BR /&gt;for file in ${ctl_files} ; do&lt;BR /&gt;   #do something awk or whatever&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;</description>
    <pubDate>Mon, 15 Jan 2007 03:23:50 GMT</pubDate>
    <dc:creator>Oviwan</dc:creator>
    <dc:date>2007-01-15T03:23:50Z</dc:date>
    <item>
      <title>script help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/3926199#M761898</link>
      <description>I 'm going to get the name of dabase oracle&lt;BR /&gt;and I'm going to 'sqlplus /nolog' and&lt;BR /&gt;query like select name from v$database;&lt;BR /&gt;&lt;BR /&gt;SQL&amp;gt; SQL&amp;gt; SQL&amp;gt; SQL&amp;gt; &lt;BR /&gt;NAME&lt;BR /&gt;---------&lt;BR /&gt;IAEIS&lt;BR /&gt;&lt;BR /&gt;Query like select name from v$controlfile&lt;BR /&gt;SQL&amp;gt; &lt;BR /&gt;NAME&lt;BR /&gt;--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;/oradata/IAEIS/control01.ctl&lt;BR /&gt;/oradata/IAEIS/control02.ctl&lt;BR /&gt;/oradata/IAEIS/control03.ctl&lt;BR /&gt;&lt;BR /&gt;How can I get the output using awk or other scipt &lt;BR /&gt;I just want 'IAEIS' and controlfiles &lt;BR /&gt;&lt;BR /&gt;/oradata/IAEIS/control01.ctl&lt;BR /&gt;/oradata/IAEIS/control02.ctl&lt;BR /&gt;/oradata/IAEIS/control03.ctl&lt;BR /&gt;</description>
      <pubDate>Mon, 15 Jan 2007 00:54:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/3926199#M761898</guid>
      <dc:creator>file system</dc:creator>
      <dc:date>2007-01-15T00:54:10Z</dc:date>
    </item>
    <item>
      <title>Re: script help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/3926200#M761899</link>
      <description>&lt;!--!*#--&gt;Try the script below:&lt;BR /&gt;============================================&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;&lt;BR /&gt;sqlplus -s $USERID &amp;lt;&amp;lt;-EOF&lt;BR /&gt;  set echo off head off feed off&lt;BR /&gt;  select name from v\$controlfile;&lt;BR /&gt;  exit&lt;BR /&gt;EOF</description>
      <pubDate>Mon, 15 Jan 2007 02:30:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/3926200#M761899</guid>
      <dc:creator>Sandman!</dc:creator>
      <dc:date>2007-01-15T02:30:12Z</dc:date>
    </item>
    <item>
      <title>Re: script help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/3926201#M761900</link>
      <description>Hi,&lt;BR /&gt;you probably want to add "pages 0" to Sandmans set line, in order to avoid the initial blank line.&lt;BR /&gt;&lt;BR /&gt;Do you want to save the output to b.lis ?&lt;BR /&gt;Also you wanted to connect /nolog ?&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;sqlplus -s /nolog &amp;lt;&amp;lt;-EOF&lt;BR /&gt;  connect / as sysdba;&lt;BR /&gt;  set echo off head off feed off pages 0;&lt;BR /&gt;  spool b.lis&lt;BR /&gt;  select name from v\$database;&lt;BR /&gt;  select name from v\$controlfile;&lt;BR /&gt;  spool off;&lt;BR /&gt;  exit&lt;BR /&gt;EOF&lt;BR /&gt;</description>
      <pubDate>Mon, 15 Jan 2007 03:12:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/3926201#M761900</guid>
      <dc:creator>Peter Godron</dc:creator>
      <dc:date>2007-01-15T03:12:50Z</dc:date>
    </item>
    <item>
      <title>Re: script help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/3926202#M761901</link>
      <description>Hy&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/ksh&lt;BR /&gt;ctl_files=`sqlplus -s "/ as sysdba" &amp;lt;&lt;EOF&gt;&lt;/EOF&gt;  set echo off head off feed off&lt;BR /&gt;  select name from v\\$controlfile;&lt;BR /&gt;  exit&lt;BR /&gt;EOF`&lt;BR /&gt;&lt;BR /&gt;for file in ${ctl_files} ; do&lt;BR /&gt;   #do something awk or whatever&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;</description>
      <pubDate>Mon, 15 Jan 2007 03:23:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/3926202#M761901</guid>
      <dc:creator>Oviwan</dc:creator>
      <dc:date>2007-01-15T03:23:50Z</dc:date>
    </item>
    <item>
      <title>Re: script help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/3926203#M761902</link>
      <description>I will run the script to backup of oracle hot backup.&lt;BR /&gt;&lt;BR /&gt;but it is not work?&lt;BR /&gt;&lt;BR /&gt;# Get DB info&lt;BR /&gt;&lt;BR /&gt;#get_db_info()&lt;BR /&gt;{&lt;BR /&gt;#$ORACLE_HOME/bin/sqlplus /nolog &amp;lt;&amp;lt; EOF &amp;gt; DB_INFO&lt;BR /&gt;sqlplus /nolog &amp;lt;&amp;lt; EOF &amp;gt; DB_INFO&lt;BR /&gt;connect / as sysdba;&lt;BR /&gt;&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;&lt;BR /&gt;disconnect&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 $1 }' DB_INFO` &lt;BR /&gt;CONTROLFILE_BACK=${ORACLE_HOME}/dbs/control.${DATE}&lt;BR /&gt;TABLESPACE_NAME=`/usr/bin/awk -F: '$3 == "AVAILABLE" { print $2 }' DB_INFO`&lt;BR /&gt;DATAFILE=`/usr/bin/awk -F: '$3 == "AVAILABLE" { print $1 }' DB_INFO`&lt;BR /&gt;}&lt;BR /&gt;# Programmable Variables&lt;BR /&gt;&lt;BR /&gt;DATE=`/usr/bin/date +%y%m%d`&lt;BR /&gt;BACKUP_HOME=/oracle/backuplog&lt;BR /&gt;BACKUP_PID=${BACKUP_HOME}/`/usr/bin/basename $0`.pid&lt;BR /&gt;BACKUP_LOG=${BACKUP_HOME}/`/usr/bin/basename $0 | /usr/bin/cut -d. -f1`.iaeisdb.${DATE}&lt;BR /&gt;INIT_ORA=${ORACLE_HOME}/dbs/initdw.ora&lt;BR /&gt;&lt;BR /&gt;if [ $TABLESPACE_NAME ]&lt;BR /&gt;sqlplus /nolog&lt;BR /&gt;connect /as sysdba&lt;BR /&gt;alter tablespace $TABLESPACE_NAME begin backup;&lt;BR /&gt;disconnect&lt;BR /&gt;EOF&lt;BR /&gt;&lt;BR /&gt;save -s $NSR_SERVER \&lt;BR /&gt;                   -l full \&lt;BR /&gt;                   -b oracle \&lt;BR /&gt;                   -N $DATAFILE &lt;BR /&gt;alter tablespace $TABLESPACE_NAME end backup;&lt;BR /&gt;&lt;BR /&gt;$sh a&lt;BR /&gt;$ sh a&lt;BR /&gt;a: syntax error at line 44: `end of file' unexpected&lt;BR /&gt;&lt;BR /&gt;How can I run the script to backup perfectly.&lt;BR /&gt;any tips are good for me.&lt;BR /&gt;thanks&lt;BR /&gt;I want the script to run &lt;BR /&gt;&lt;BR /&gt;1. oracle login&lt;BR /&gt;2. alter tablespace tablespace_name begin backup&lt;BR /&gt;3. run backup command&lt;BR /&gt;4. After backup , oracle login&lt;BR /&gt;   alter tablespace tablespace_name end backup. &lt;BR /&gt;SEQUENCIALLY.&lt;BR /&gt;</description>
      <pubDate>Mon, 15 Jan 2007 04:04:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/3926203#M761902</guid>
      <dc:creator>file system</dc:creator>
      <dc:date>2007-01-15T04:04:26Z</dc:date>
    </item>
    <item>
      <title>Re: script help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/3926204#M761903</link>
      <description>hi,&lt;BR /&gt;&lt;BR /&gt;to be able to troubleshoot your script, make a backup of it and remove all the commands that have been commented out using the "#" symbol.&lt;BR /&gt;&lt;BR /&gt;Check if each command runs separately well.&lt;BR /&gt;&lt;BR /&gt;Also, if you are running oracle 8i or later, please consider RMAN for backup of your database. This Oracle tool simplifies the hot backup process.&lt;BR /&gt;&lt;BR /&gt;kind regards&lt;BR /&gt;yogeeraj</description>
      <pubDate>Mon, 15 Jan 2007 04:17:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/3926204#M761903</guid>
      <dc:creator>Yogeeraj_1</dc:creator>
      <dc:date>2007-01-15T04:17:12Z</dc:date>
    </item>
    <item>
      <title>Re: script help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/3926205#M761904</link>
      <description>Hi,&lt;BR /&gt;just a brief scan of your script:&lt;BR /&gt;1. You have commeneted out procedure get_db_info&lt;BR /&gt;2. Within you main your first sqlplus step does not have a &amp;lt;&lt;EOF&gt;&lt;/EOF&gt;3. Your save statement is outside the sqlplus script&lt;BR /&gt;&lt;BR /&gt;Other threads with similar issues:&lt;BR /&gt;&lt;A href="http://orafaq.com/faqdbabr.htm#ONLBRR" target="_blank"&gt;http://orafaq.com/faqdbabr.htm#ONLBRR&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=879590" target="_blank"&gt;http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=879590&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.samspublishing.com/articles/article.asp?p=30348&amp;amp;seqNum=3&amp;amp;rl=1" target="_blank"&gt;http://www.samspublishing.com/articles/article.asp?p=30348&amp;amp;seqNum=3&amp;amp;rl=1&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=225926" target="_blank"&gt;http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=225926&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Please also read:&lt;BR /&gt;&lt;A href="http://forums1.itrc.hp.com/service/forums/helptips.do?#33" target="_blank"&gt;http://forums1.itrc.hp.com/service/forums/helptips.do?#33&lt;/A&gt; on how to reward any useful answers given to your questions.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 15 Jan 2007 05:11:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/3926205#M761904</guid>
      <dc:creator>Peter Godron</dc:creator>
      <dc:date>2007-01-15T05:11:13Z</dc:date>
    </item>
    <item>
      <title>Re: script help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/3926206#M761905</link>
      <description>I saw your hot backup solution using script.&lt;BR /&gt;Just a comment.&lt;BR /&gt;Why not do a an 'alter system switch logfile'&lt;BR /&gt;followed by 'select * from v$LOGHIST&lt;BR /&gt;where rownum &amp;lt; 2' &amp;gt;&amp;gt; $YOURLOG&lt;BR /&gt;Just before your do your  'alter tablespace start backup' command&lt;BR /&gt;&lt;BR /&gt;This gives you increased admin over &lt;BR /&gt;logs when your need to restore.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 16 Jan 2007 02:35:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/3926206#M761905</guid>
      <dc:creator>Frank de Vries</dc:creator>
      <dc:date>2007-01-16T02:35:23Z</dc:date>
    </item>
  </channel>
</rss>

