Re: Sqlplus formatting error



Comments embedded.

On May 4, 10:21 am, andre...@xxxxxxxxxx wrote:
I am running the following script from my Windows client:

w.sql:
select substr(host_name,1,15) host, substr(instance_name,1,10)
instance, substr(global_name,1,10) DB_name,
version, substr(user,1,10) username from v$instance, dual,
global_name;

Result:


This is your first session.

SQL> connect w/w@test
Connected.
SQL> @w;

HOST INSTANCE DB_NAME VERSION
USERNAME
--------------- ---------- ---------- -----------------
----------
sm1tordat201 test TEST 9.2.0.7.0
W


This is NOT the same session as you've connected to another database
and have invoked a possibly different glogin.sql.

SQL> connect system/sebsystem@seblps;
Connected.
SQL> @w;

HOST
------------------------------------------------------------
INSTANCE
----------------------------------------
DB_NAME
VERSION
----------------------------------------
-----------------
USERNAME
----------------------------------------
sm1tordat201
SEBLPS
SEBLPS
9.2.0.7.0
SYSTEM

SQL> quit

In the first instance test, the output are formatted correctly. In the
second instance seblps, the columns are not trimming. Does anyone know
what's causing this? Since I'm running them both from the same Sqlplus
session, it can't be the sqlplus settings.

This is not correct, as explained above.

SELBPS and TEST both reside
on the same unix box so the unix environment is the same. The only
thing I can think on is the server parmeters are different but I can't
find out which one.

You would need to do this from each connection:

connect w/w@test
spool test_sqlplus_parms.lst
show all
spool off
@w
connect system/sebsystem@seblps
spool seblps_sqlplus_parms.lst
show all
spool off
@w

You could then check the spool files for differences.


David Fitzjarrell

.



Relevant Pages

  • Re: 1000 records FlatFile takes over 5 minutes before being publis
    ... I need to debatch 1 file of 1000 records into 1000 seperate records. ... I am still seeing the spool size increasing step by ... We use 1 BizTalk application server with 1 remote SQL server when doing our ...
    (microsoft.public.biztalk.general)
  • Re: 1000 records FlatFile takes over 5 minutes before being publis
    ... I need to debatch 1 file of 1000 records into 1000 seperate records. ... I am still seeing the spool size increasing step by ... We use 1 BizTalk application server with 1 remote SQL server when doing our ...
    (microsoft.public.biztalk.general)
  • RE: Question with DBI versus PERL
    ... The number of SQL statements is not significant with Perl/DBI. ... All spool statements will turn to Perl printcalls. ... Read the Perl docs to get familiar with the syntax of the language. ... I want to know how can i run this sql script with DBI. ...
    (perl.dbi.users)
  • Re: Running SQLPlus from command line
    ... Startup and display SQL file that is running... ... Spool the output to .txt file... ... you start spooling *after* you run the SQL script. ... You need to turn on spooling, run your SQL statements, and then turn spooling off. ...
    (comp.databases.oracle.misc)