Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: hi alll......How can i connect to oracle9i db and fetch the data from specific tables using shell script
sybrandb wrote:
> Yes, you are right. Sorry, I forgot.
> But IIRC, if you also want to suppress the 'Connected' message, you
> need to use /nolog and -s simultaneously, and issue a connect statement
> in your code (which is advantageous, as it will hide your password)
>
> --
> Sybrand Bakker
> Senior Oracle DBA
Correct. For example:
[oracle_at_ServerName tmp]$ cat script.sql
set newpage 0 pagesize 0 feedback off
connect system/<password>
select sysdate from dual;
exit
[oracle_at_ServerName tmp]$ sqlplus -s /nolog @script.sql
05-DEC-06
[oracle_at_ACBristol105 tmp]$
Received on Tue Dec 05 2006 - 06:04:05 CST