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 -> Re: Oracle on Unix vs Oracle on Windows

Re: Oracle on Unix vs Oracle on Windows

From: Oracleguru <oracleguru_at_mailcity.com>
Date: Fri, 25 Sep 1998 20:20:01 GMT
Message-ID: <01bde8d1$85847020$a504fa80@mndnet>


Hi

I am not quite sure what you mean, but reading between the lines:

Interactively, there is no difference on most any platforms/OS, including UNIX. In UNIX, you can create a SQL script file ( similar to batch file)l, such as xyz.sql with all your SQL commands, SQL*Plus commands( set commands, column, format commands etc.) and
then run it as follows on UNIX prompt:

sqlplus / @xyz
sqlplus userid/password @xyz

or
In SQL*Plus prompt:

SQL>@xyz
SQL>start xyz.sql

also you can edit a file while you are in SQL*Plus ( it depends how your Oracle environment is set up):

SQL>!vi xyz.sql

Here is an example of SQL script.

set termout off verify off echo off pause off doc off set space 1 newpage 0 linesize 91 pages 58  

column today        new_value today   noprint
column time         new_value time    noprint
column station      format a10       heading 'Station No'
column station_name format a25       heading 'Station Name'
column mast_onn     format a11       heading 'Eff. Date'
column tube         format 990.999   heading '  Tube  '
column orifice      format  90.999   heading 'Orifice'
column diff         format     999   heading 'Diff'
column static       format    9999   heading 'Static'
column rotation     format      99   heading 'Rotation'
 

break on station skip 1 on station_name  

ttitle today center 'AUDIT REPORT' -

   right 'Page ' format 90 sql.pno skip 1 time skip 1 -    'sample_sqlplus_report.sql' skip 2
select to_char(sysdate, 'DD-MON-YYYY') today,

         to_char(sysdate, 'HH:MI:SS AM') time   from dual;  

/*
  Unix remove command.
*/
host rm -f $HOME/rep/sample_sqlplus_report.lst > /dev/null  

spool $HOME/rep/sample_sqlplus_report.lst select s.station, s.station_name,

         to_char(m.mast_onn, 'dd-MON-yyyy') mast_onn, m.tube, m.orifice,
         m.differential diff, m.static, m.rotation
  from
         mastdet_hist m,
         stationbus   s
 where   m.meter_id = s.meter_id
   and   m.mast_onn between '01-JUN-93' and '31-AUG-94'
   and   s.meter_id between 13100       and 18200
   and s.company = 9
union
select   'NO RECORDS', '#########################',
         '###########',999999999, 999999999,
         999999999, 999999999, 999999999
  from
         mastdet_hist m,
         stationbus   s
 where   m.meter_id = s.meter_id
   and   m.mast_onn between '01-JUN-93' and '31-AUG-94'
   and   s.meter_id between 13100       and 18200
   and s.company = 9
having count(*) = 0
order by 1, 3;
prompt
prompt
prompt.                           ********** END OF REPORT **********
spool off
host lp $HOME/rep/sample_sqlplus_report.lst exit

Oracleguru
www.oracleguru.net
oracleguru_at_mailcity.com

Chunangad S Sriram <ramcssri_at_unm.edu> wrote in article <3607F02F.8CE4B99E_at_unm.edu>...
> I have so far programmed in Oracle via SQL*Plus only in a Windows
> environment (95 & NT). Going by the fact that I use interactive line
> programming in SQL*Plus to interact with Oracle, I have presumed that
> programming in Oracle in a Unix environment should be no different
> because of the command line interface that is followed in Unix . I am
> curious to know how different Oracle programming is in a Unix
> environment (if there are any differences) and also would like to know
> where I can get to see the obvious differences except for the GUI when
> comparing it to Oracle programming in Windows.
>
> I would appreciate it if anyone can clarify this curiosity of mine.
>
> Sriram
>
>
Received on Fri Sep 25 1998 - 15:20:01 CDT

Original text of this message

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