<?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: how to connect to database in shell script in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-connect-to-database-in-shell-script/m-p/2688901#M842597</link>
    <description>Hi Fiatu,&lt;BR /&gt;&lt;BR /&gt;Here is what you need :&lt;BR /&gt;&lt;BR /&gt;1. Remote database &lt;BR /&gt;&lt;BR /&gt;#sqlplus userName/passWord@OracleInstance&amp;lt;&lt;EOD&gt; /tmp/output.log 2&amp;gt;&amp;amp;1&lt;BR /&gt;select ....&lt;BR /&gt;insert ....&lt;BR /&gt;delete ....&lt;BR /&gt;update ....&lt;BR /&gt;&lt;BR /&gt;EOD&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;The name "OracleInstance" is the name of the oracle instance defined in the file tnsnames.ora &lt;BR /&gt;&lt;BR /&gt;2.Local database&lt;BR /&gt;&lt;BR /&gt;#sqlplus userName/passWord&amp;lt;&lt;EOD&gt; /tmp/output.log 2&amp;gt;&amp;amp;1&lt;BR /&gt;select ....&lt;BR /&gt;insert ....&lt;BR /&gt;delete ....&lt;BR /&gt;update ....&lt;BR /&gt;&lt;BR /&gt;EOD&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;&lt;BR /&gt;Magdi&lt;BR /&gt;&lt;BR /&gt;&lt;/EOD&gt;&lt;/EOD&gt;</description>
    <pubDate>Wed, 27 Mar 2002 12:39:00 GMT</pubDate>
    <dc:creator>Magdi KAMAL</dc:creator>
    <dc:date>2002-03-27T12:39:00Z</dc:date>
    <item>
      <title>how to connect to database in shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-connect-to-database-in-shell-script/m-p/2688896#M842592</link>
      <description>Whether or not connect to database or excute sql statement in shell script?please give me some documents.thank you!</description>
      <pubDate>Fri, 22 Mar 2002 07:44:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-connect-to-database-in-shell-script/m-p/2688896#M842592</guid>
      <dc:creator>fjatu</dc:creator>
      <dc:date>2002-03-22T07:44:36Z</dc:date>
    </item>
    <item>
      <title>Re: how to connect to database in shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-connect-to-database-in-shell-script/m-p/2688897#M842593</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;please would you could tell us what type of database and release.&lt;BR /&gt;&lt;BR /&gt;cheers&lt;BR /&gt;John.</description>
      <pubDate>Fri, 22 Mar 2002 07:47:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-connect-to-database-in-shell-script/m-p/2688897#M842593</guid>
      <dc:creator>John Carr_2</dc:creator>
      <dc:date>2002-03-22T07:47:13Z</dc:date>
    </item>
    <item>
      <title>Re: how to connect to database in shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-connect-to-database-in-shell-script/m-p/2688898#M842594</link>
      <description>Hi,&lt;BR /&gt;If this is oracle we are talking this would be a way (there's several other ways) :&lt;BR /&gt;&lt;BR /&gt;#!/bin/ksh&lt;BR /&gt;sql_logon=$1&lt;BR /&gt;sql_script=$2&lt;BR /&gt;$ORACLE_HOME/bin/sqlplus &amp;lt;&amp;lt; !! 2&amp;gt;&amp;amp;1 &amp;gt;tgd008.log&lt;BR /&gt;$sql_logon&lt;BR /&gt;@$sql_script;&lt;BR /&gt;quit&lt;BR /&gt;!!&lt;BR /&gt;&lt;BR /&gt;Hope this helps,&lt;BR /&gt;Tom Geudens</description>
      <pubDate>Fri, 22 Mar 2002 07:50:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-connect-to-database-in-shell-script/m-p/2688898#M842594</guid>
      <dc:creator>Tom Geudens</dc:creator>
      <dc:date>2002-03-22T07:50:03Z</dc:date>
    </item>
    <item>
      <title>Re: how to connect to database in shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-connect-to-database-in-shell-script/m-p/2688899#M842595</link>
      <description>If you're talking informix,&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/ksh&lt;BR /&gt;isql &lt;DATABASE&gt; &amp;lt;&lt;/DATABASE&gt;</description>
      <pubDate>Fri, 22 Mar 2002 08:06:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-connect-to-database-in-shell-script/m-p/2688899#M842595</guid>
      <dc:creator>Deepak Extross</dc:creator>
      <dc:date>2002-03-22T08:06:12Z</dc:date>
    </item>
    <item>
      <title>Re: how to connect to database in shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-connect-to-database-in-shell-script/m-p/2688900#M842596</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;for oracle&lt;BR /&gt;&lt;BR /&gt;sqlplus &amp;lt;&amp;lt; EOF&lt;BR /&gt;select * from tab;&lt;BR /&gt;EOF&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 22 Mar 2002 08:30:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-connect-to-database-in-shell-script/m-p/2688900#M842596</guid>
      <dc:creator>Printaporn_1</dc:creator>
      <dc:date>2002-03-22T08:30:17Z</dc:date>
    </item>
    <item>
      <title>Re: how to connect to database in shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-connect-to-database-in-shell-script/m-p/2688901#M842597</link>
      <description>Hi Fiatu,&lt;BR /&gt;&lt;BR /&gt;Here is what you need :&lt;BR /&gt;&lt;BR /&gt;1. Remote database &lt;BR /&gt;&lt;BR /&gt;#sqlplus userName/passWord@OracleInstance&amp;lt;&lt;EOD&gt; /tmp/output.log 2&amp;gt;&amp;amp;1&lt;BR /&gt;select ....&lt;BR /&gt;insert ....&lt;BR /&gt;delete ....&lt;BR /&gt;update ....&lt;BR /&gt;&lt;BR /&gt;EOD&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;The name "OracleInstance" is the name of the oracle instance defined in the file tnsnames.ora &lt;BR /&gt;&lt;BR /&gt;2.Local database&lt;BR /&gt;&lt;BR /&gt;#sqlplus userName/passWord&amp;lt;&lt;EOD&gt; /tmp/output.log 2&amp;gt;&amp;amp;1&lt;BR /&gt;select ....&lt;BR /&gt;insert ....&lt;BR /&gt;delete ....&lt;BR /&gt;update ....&lt;BR /&gt;&lt;BR /&gt;EOD&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;&lt;BR /&gt;Magdi&lt;BR /&gt;&lt;BR /&gt;&lt;/EOD&gt;&lt;/EOD&gt;</description>
      <pubDate>Wed, 27 Mar 2002 12:39:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-connect-to-database-in-shell-script/m-p/2688901#M842597</guid>
      <dc:creator>Magdi KAMAL</dc:creator>
      <dc:date>2002-03-27T12:39:00Z</dc:date>
    </item>
    <item>
      <title>Re: how to connect to database in shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-connect-to-database-in-shell-script/m-p/2688902#M842598</link>
      <description>It's PERL time:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;use strict;&lt;BR /&gt;use DBI;&lt;BR /&gt;&lt;BR /&gt;my $dbh = DBI-&amp;gt;connect( 'dbi:Oracle:orcl',&lt;BR /&gt;                        'jeffrey',&lt;BR /&gt;                        'jeffspassword',&lt;BR /&gt;                        {&lt;BR /&gt;                          RaiseError =&amp;gt; 1,&lt;BR /&gt;                          AutoCommit =&amp;gt; 0&lt;BR /&gt;                        }&lt;BR /&gt;                      ) || die "Database connection not made: $DBI::errstr";&lt;BR /&gt;&lt;BR /&gt;my $sql = qq{ CREATE TABLE employees ( id INTEGER NOT NULL, &lt;BR /&gt;                                       name VARCHAR2(128), &lt;BR /&gt;                                       title VARCHAR2(128), &lt;BR /&gt;                                       phone CHAR(8) &lt;BR /&gt;                                     ) };&lt;BR /&gt;$dbh-&amp;gt;do( $sql );&lt;BR /&gt;&lt;BR /&gt;$dbh-&amp;gt;disconnect();&lt;BR /&gt;    &lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.saturn5.com/~jwb/dbi-examples.html" target="_blank"&gt;http://www.saturn5.com/~jwb/dbi-examples.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;live free or die&lt;BR /&gt;harry</description>
      <pubDate>Wed, 27 Mar 2002 13:02:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-connect-to-database-in-shell-script/m-p/2688902#M842598</guid>
      <dc:creator>harry d brown jr</dc:creator>
      <dc:date>2002-03-27T13:02:07Z</dc:date>
    </item>
  </channel>
</rss>

