Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Re: stty: Inappropriate ioctl for device
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.Received on Thu Oct 19 2000 - 16:44:10 CDT