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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Help on using host in sqlplus.

Re: Help on using host in sqlplus.

From: Mark D Powell <mark.powell_at_eds.com>
Date: 17 May 2002 07:01:15 -0700
Message-ID: <178d2795.0205170601.226c62ad@posting.google.com>


markg_at_mymail.co.uk (Mark) wrote in message news:<ddb31653.0205170001.56532c64_at_posting.google.com>...
> Try putting your HOST command on one line
>
> alter tablespace SYSTEM begin backup;
> host(/usr/bin/tar cvf - /ud2/ORACLE2/ORTEST1/DATA/SYS1ORTEST1.DBF \
> |compress>/tape1/SYSTEM_25_may_99.Z )
> exit
> alter tablespace SYSTEM end backup;
>
> M
>
> shrekreturn_at_yahoo.com (Matt) wrote in message news:<955c3e6.0205160534.48fae2c3_at_posting.google.com>...
> > Hi, there,
> >
> > I was testing a script similar as this one:
> >
> > alter tablespace SYSTEM begin backup;
> > host
> > /usr/bin/tar cvf - /ud2/ORACLE2/ORTEST1/DATA/SYS1ORTEST1.DBF \
> > |compress>/tape1/SYSTEM_25_may_99.Z
> > exit
> > alter tablespace SYSTEM end backup;
> >
> > If I copy paste this to sqlplus, it runs perfectly. However, if I save
> > this script into a file, say test.sql, and run it (@test.sql) in
> > sqlplus, it will pause after the host and waite for my input. It does
> > not run the tar command. I can work around this by put host and tar
> > etc into one line. But that is not what I intend to do. What I did
> > wrong here? Any help is appreciated.
> >
> > I use 8.1.7.3 on solaris 8 sparc.
> >
> > Thanks.

I think Mark gave a working answer; I would just like to add on most UNIX Oracle installations your can use an explanation mark, '!', as shorhand for the HOST command:

!rm generated.sql
spool generated.sql
select 'Grant select on'||....

HTH -- Mark D Powell -- Received on Fri May 17 2002 - 09:01:15 CDT

Original text of this message

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