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

Home -> Community -> Mailing Lists -> Oracle-L -> why spool result is different?

why spool result is different?

From: Guang Mei <GMei_at_ph.com>
Date: 2006-01-12 20:08:26
Message-id: 99965A782DFBA44EB9F773211FFC9DE602A5F15E@phexchange2.ph.com


Hi All,

We have two oracle instances, on two different Unix boxes (but same OS platform), both \ running Oracle 9206.

The 1st instance is called "staging", with OS and Oracle Info below:

SunOS phwebsdb1 5.9 Generic_118558-04 sun4u sparc SUNW,Sun-Fire-V440

BANNER



Oracle9i Enterprise Edition Release 9.2.0.6.0 - Production PL/SQL Release 9.2.0.6.0 - Production
CORE 9.2.0.6.0 Production
TNS for Solaris: Version 9.2.0.6.0 - Production NLSRTL Version 9.2.0.6.0 - Production

The 2nd instance is called "prod", with OS and Oracle info:

SunOS phwebdb7 5.9 Generic_118558-04 sun4u sparc SUNW,Sun-Fire-480R BANNER



Oracle9i Enterprise Edition Release 9.2.0.6.0 - Production PL/SQL Release 9.2.0.6.0 - Production
CORE 9.2.0.6.0 Production
TNS for Solaris: Version 9.2.0.6.0 - Production NLSRTL Version 9.2.0.6.0 - Production

Now, if I run the following same sql code from a PC with sqlplus client installed, against \ both "staging" and "prod", I got different output file.

SET head off echo off termout ON feedback off verify off pagesize 0 linesize 1000 \ trimspool ON
SET serveroutput ON SIZE 999999
WHENEVER sqlerror EXIT
spool spool_test.txt
SELECT rpad('ABA Number',30), rpad('Account Number',35), rpad('Account Type',15), \ rpad('Customer ID',20), rpad('Account Name',32) FROM dual; SELECT rpad('-',30,'-'), rpad('-',35,'-'), rpad('-',15,'-'), rpad('-',20,'-'), \ rpad('-',32,'-') FROM dual;
spool off

I got from "stagging" (which is what I want):

ABA Number Account Number Account Type Customer ID Account Name
------------------------------ ----------------------------------- --------------- \

however I got from "Prod" is different and it seems to put an extra "carriage return" \ character after each rpad call:
ABA Number
Account Number
Account Type
Customer ID
Account Name






Has anyone seen this kind of problem? BTW, the "prod" is on RAC, don't know if this makes \ any difference.

Thanks.

Guang Received on Thu Jan 12 2006 - 20:08:26 CST

Original text of this message

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