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

Home -> Community -> Usenet -> c.d.o.server -> How to invoke Windows SQL command from a batch file?

How to invoke Windows SQL command from a batch file?

From: srini <schimata2_at_yahoo.com>
Date: 27 Apr 2005 20:39:42 -0700
Message-ID: <1114659582.389879.266800@l41g2000cwc.googlegroups.com>


Hi all,

I have the following question:

I have SQLPlus on my Windows 2000 box:



D:\upgrades\new\CC>sqlplus srini/srini_at_srini SQL*Plus: Release 8.1.7.0.0 - Production on Wed Apr 27 20:34:15 2005 (c) Copyright 2000 Oracle Corporation. All rights reserved. Connected to:
Oracle8i Enterprise Edition Release 8.1.7.4.0 - Production With the Partitioning option
JServer Release 8.1.7.4.0 - Production
SQL>

Now I want to have a batch file, test.bat with the following two lines:



sqlplus srini/srini_at_srini
select bytes/power(1024,3) from dba_segments where segment_name='ATTACHMENTS_BLOB';

But when I run test.bat from the command line, it is not giving me the output of the "select" command.

How can I get the command output from a batch file without logging into the SQL shell?

Thanks in advance,
Srini Received on Wed Apr 27 2005 - 22:39:42 CDT

Original text of this message

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