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

Home -> Community -> Usenet -> c.d.o.tools -> Re: stty: Inappropriate ioctl for device

Re: stty: Inappropriate ioctl for device

From: <oratune_at_aol.com>
Date: Fri, 20 Oct 2000 18:53:12 GMT
Message-ID: <8sq4ak$jnh$1@nnrp1.deja.com>

In article <8spus1$emd$1_at_nnrp1.deja.com>,   susana73_at_hotmail.com wrote:
> In article <8snpv8$nn5$1_at_nnrp1.deja.com>,
> oratune_at_aol.com wrote:
> > In article <8snl73$jes$1_at_nnrp1.deja.com>,
> > susana73_at_hotmail.com wrote:
> > > Hi,
> > >
> > > This question may not be oracle related. But I got this error
 when
 I
> > > try to do hot backup in a shell script.
> > >
> > > The script looks like this:
> > > #!/bin/sh
> > > /opt/oracle/product/8.1.6/svrmgrl <<EOF
> > > connect internal
> > > alter tablespace system begin backup;
> > > !tar cvf /backup/system01.tar /oradb/data1/system01.dbf
> > > alter tablespace system end backup;
> > > ...
> > > quit
> > > EOF
> > >
> > > When I execute the script on unix prompt, I got this:
> > > SVRMGR> Statement processed.
> > > SVRMGR> stty: : Inappropriate ioctl for device
> > > stty: : Inappropriate ioctl for device
> > > a /oradb/data1/system01.dbf 102408K
> > > SVRMGR> Statement processed.
> > >
> > > The tar command works fine but I would like to get rid of the stty
> > > error. I have Oracle 8.1.6 on Solaris 2.7.
> > >
> > > Thanks!
> > >
> > > Susan
> > >
> > > Sent via Deja.com http://www.deja.com/
> > > Before you buy.
> > >
> >
> > Try setting the environment in your script:
> >
> > #!/bin/sh
> > . $HOME/.profile
> > /opt/oracle/product/8.1.6/svrmgrl <<EOF
> > connect internal
> > alter tablespace system begin backup;
> > !tar cvf /backup/system01.tar /oradb/data1/system01.dbf
> > alter tablespace system end backup;
> > ...
> > quit
> > EOF
> >
> > You might wish to hard-code the actual location of .profile, for
> > example:
> >
> > #!/bin/sh
> > . /opt/oracle/.profile
> > /opt/oracle/product/8.1.6/svrmgrl <<EOF
> > connect internal
> > alter tablespace system begin backup;
> > !tar cvf /backup/system01.tar /oradb/data1/system01.dbf
> > alter tablespace system end backup;
> > ...
> > quit
> > EOF
> >
> > or wherever the oracle .profile resides.
> >
> > This is a good practice to get into, as scripts you write may end up
 in
> > cron.
> >
> > --
> > David Fitzjarrell
> > Oracle Certified DBA
> >
> > Sent via Deja.com http://www.deja.com/
> > Before you buy.
> >

>

> Hi Kevin,
>

> I added:
> . /opt/oracle/.profile
> in my script but it doesn't work. Could you tell me what environment
 I
> need to get rid of the stty terminal error?
>

> Thanks,
>

> Susan
>

> Sent via Deja.com http://www.deja.com/
> Before you buy.

>

Apparently SVRMGR is not a "friendly" ioctl device and no terminal settings will correct this; try this (I believe that this was suggested by another poster):

#!/bin/sh
/opt/oracle/product/8.1.6/svrmgrl <<EOF >/dev/null 2>&1 connect internal
alter tablespace system begin backup;
!tar cvf /backup/system01.tar /oradb/data1/system01.dbf alter tablespace system end backup;
...
quit
EOF This will send all terminal output to the 'bit bucket', /dev/null, and also send the stderr output to /dev/null. You should be free of the irritating 'stty' message.

--
David Fitzjarrell
Oracle Certified DBA


Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Fri Oct 20 2000 - 13:53:12 CDT

Original text of this message

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