<?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: Output from the oracle database via shell scripts in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/output-from-the-oracle-database-via-shell-scripts/m-p/2746794#M944481</link>
    <description>You mean something like this?&lt;BR /&gt;&lt;BR /&gt;export ORACLE_HOME=/.../...&lt;BR /&gt;export ORACLE_SID=XXX&lt;BR /&gt;su oracle -c $ORACLE_HOME/bin/sqlplus /nolog &amp;lt;&amp;lt; EOF&lt;BR /&gt;connect / as sysdba ;&lt;BR /&gt;select sr_no, customer_ID, creation_date from customer_table ;&lt;BR /&gt;exit ;&lt;BR /&gt;EOF&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Of course, you'll need to set ORACLE_HOME and ORACLE_SID correctly, and know the correct names for the tables and columns.&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;&lt;BR /&gt;Duncan</description>
    <pubDate>Tue, 18 Jun 2002 06:44:50 GMT</pubDate>
    <dc:creator>Duncan Edmonstone</dc:creator>
    <dc:date>2002-06-18T06:44:50Z</dc:date>
    <item>
      <title>Output from the oracle database via shell scripts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/output-from-the-oracle-database-via-shell-scripts/m-p/2746793#M944480</link>
      <description>Hi Folks,&lt;BR /&gt;&lt;BR /&gt;On a daily basis i need some data from Oracle database, can i execute a shell script and get the same. As i don't know the format, if any1 can send me the same that will be fine.&lt;BR /&gt;&lt;BR /&gt;eg: &lt;BR /&gt;customer table&lt;BR /&gt;sr_no, customer_ID, creation_date &lt;BR /&gt;&lt;BR /&gt;Thanks in advance,&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;!!! NAIK !!!&lt;BR /&gt;</description>
      <pubDate>Tue, 18 Jun 2002 05:47:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/output-from-the-oracle-database-via-shell-scripts/m-p/2746793#M944480</guid>
      <dc:creator>Dayanand Naik_1</dc:creator>
      <dc:date>2002-06-18T05:47:49Z</dc:date>
    </item>
    <item>
      <title>Re: Output from the oracle database via shell scripts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/output-from-the-oracle-database-via-shell-scripts/m-p/2746794#M944481</link>
      <description>You mean something like this?&lt;BR /&gt;&lt;BR /&gt;export ORACLE_HOME=/.../...&lt;BR /&gt;export ORACLE_SID=XXX&lt;BR /&gt;su oracle -c $ORACLE_HOME/bin/sqlplus /nolog &amp;lt;&amp;lt; EOF&lt;BR /&gt;connect / as sysdba ;&lt;BR /&gt;select sr_no, customer_ID, creation_date from customer_table ;&lt;BR /&gt;exit ;&lt;BR /&gt;EOF&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Of course, you'll need to set ORACLE_HOME and ORACLE_SID correctly, and know the correct names for the tables and columns.&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;&lt;BR /&gt;Duncan</description>
      <pubDate>Tue, 18 Jun 2002 06:44:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/output-from-the-oracle-database-via-shell-scripts/m-p/2746794#M944481</guid>
      <dc:creator>Duncan Edmonstone</dc:creator>
      <dc:date>2002-06-18T06:44:50Z</dc:date>
    </item>
    <item>
      <title>Re: Output from the oracle database via shell scripts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/output-from-the-oracle-database-via-shell-scripts/m-p/2746795#M944482</link>
      <description>Hi Again,&lt;BR /&gt;&lt;BR /&gt;i need only to type the shell script at the command line. and it gets me the result. &lt;BR /&gt;&lt;BR /&gt;so it means the sql stmt should be written into the shell script. correct me if 'm wrong&lt;BR /&gt;</description>
      <pubDate>Tue, 18 Jun 2002 06:57:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/output-from-the-oracle-database-via-shell-scripts/m-p/2746795#M944482</guid>
      <dc:creator>Dayanand Naik_1</dc:creator>
      <dc:date>2002-06-18T06:57:44Z</dc:date>
    </item>
    <item>
      <title>Re: Output from the oracle database via shell scripts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/output-from-the-oracle-database-via-shell-scripts/m-p/2746796#M944483</link>
      <description>Yes, you can put Duncan's script into a file and just call this file from the command line.</description>
      <pubDate>Tue, 18 Jun 2002 07:01:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/output-from-the-oracle-database-via-shell-scripts/m-p/2746796#M944483</guid>
      <dc:creator>Deepak Extross</dc:creator>
      <dc:date>2002-06-18T07:01:33Z</dc:date>
    </item>
    <item>
      <title>Re: Output from the oracle database via shell scripts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/output-from-the-oracle-database-via-shell-scripts/m-p/2746797#M944484</link>
      <description>Hi Naik,&lt;BR /&gt;&lt;BR /&gt;Duncans script seems to be fine. Simply put all these command lines into a text file, chmod u+x script_name after that. Then you call your script and it gives you the desired result.&lt;BR /&gt;&lt;BR /&gt;Normally standard output for the script is your terminal, if desired, redirect the output to a file:&lt;BR /&gt;&lt;BR /&gt;script_name &amp;gt;&amp;gt; /path_to_output_file&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Allways stay on the bright side of life!&lt;BR /&gt;&lt;BR /&gt;Peter</description>
      <pubDate>Tue, 18 Jun 2002 07:04:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/output-from-the-oracle-database-via-shell-scripts/m-p/2746797#M944484</guid>
      <dc:creator>Peter Kloetgen</dc:creator>
      <dc:date>2002-06-18T07:04:10Z</dc:date>
    </item>
    <item>
      <title>Re: Output from the oracle database via shell scripts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/output-from-the-oracle-database-via-shell-scripts/m-p/2746798#M944485</link>
      <description>Hi All,&lt;BR /&gt;&lt;BR /&gt;The script works but needed some changes.. which i made.. thanks again and following are the changes :&lt;BR /&gt;&lt;BR /&gt;file : cust.sh&lt;BR /&gt;&lt;BR /&gt;ORACLE_HOME=/u05/oracle/product/8.1.7&lt;BR /&gt;ORACLE_SID=testdb&lt;BR /&gt;su - oracle -c "$ORACLE_HOME/bin/sqlplus username/password" /nolog &amp;lt;&amp;lt; EOF&lt;BR /&gt;spool /tmp/test1.log&lt;BR /&gt;select sr_no, customer_ID, creation_date&lt;BR /&gt;from customer;&lt;BR /&gt;spool off&lt;BR /&gt;exit;&lt;BR /&gt;EOF&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks again....&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;!!! NAIK !!!&lt;BR /&gt;</description>
      <pubDate>Tue, 18 Jun 2002 08:46:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/output-from-the-oracle-database-via-shell-scripts/m-p/2746798#M944485</guid>
      <dc:creator>Dayanand Naik_1</dc:creator>
      <dc:date>2002-06-18T08:46:41Z</dc:date>
    </item>
  </channel>
</rss>

