Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Unix bourne shell HELP

Re: Unix bourne shell HELP

From: Mr. Majestic <rc_at_neomenia.com>
Date: Mon, 19 Jun 2000 15:52:29 -0400
Message-Id: <10533.109771@fatcity.com>


hi

Thanks everyone for the clarification of bourne. Another question.
I'm trying to run a sample database creation script. The script contains the pathname to the demobld.sql script supplied by oracle. I'm currently am using this line of code below to reach this file. Also is there a way to assign the database created to a user created in the file?

thanks again for the input

#!/bin/sh

sqlplus /nolog<<EOF

     connect internal
     drop user a ;
     create user a identified by b;
     grant connect, resource to a;

    $Oracle_home/sqlplus/demo/demobld.sql/user a     exit
EOF

> To run sqlplus within a shell 'enclose' the sql commands as follows (by <<
> EOF to start, and by EOF to end, starting at col 1 ). You can use any
> matching chars for 'EOF'...
>
> #!/bin/sh
> sqlplus /nolog << EOF
> connect internal
> select * from cat;
> exit
> EOF
>
> - Kirti
>
>
> > -----Original Message-----
> > From: Mr. Majestic [SMTP:rc_at_neomenia.com]
> > Sent: Monday, June 19, 2000 1:45 PM
> > To: ORACLE-L_at_fatcity.com; 'lazydba'
> > Subject: Unix bourne shell HELP
> >
> > I'm executing this bourn shell script below. When I call the file to
> > execute, I'm only getting logged on to sql plus with sqlplus /nolog.
> >
> > How can I get the other statements to execute??
> >
> > thanks
> >
> >
> > #!/bin/sh
> >
> > sqlplus /nolog
> >
> > connect internal
> >
> > select * from cat;
> >
> > exit
> >
> --
> Author: Deshpande, Kirti
> INET: Kirti.Deshpande_at_gtedc.gte.com
>
> Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
> San Diego, California -- Public Internet access / Mailing Lists
> --------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from). You may
Received on Mon Jun 19 2000 - 14:52:29 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US