Sqlplus outputs everything in 1 line

Hello,
A colleague just logged in in his Unix system with sqlplus for the first time in 9i.
The output of a statent is displayed in 1 coninued row and not in collumns.
What can be wrong.
Any ideas ?
Thank you

Oracle is 9i
EVERY statement will output results in one line
SQL> show linesize;
linesize 80
SQL> show pagesize;
pagesize 14
SQL> show newpage;
newpage 1
SQL>
/app/oracle/product/9.2.0.8/sqlplus/admin:cat glogin.sql
-- Copyright (c) Oracle Corporation 1988, 2000. All Rights Reserved.
-- NAME
-- glogin.sql
-- DESCRIPTION
-- SQL*Plus global login startup file.
-- Add any sqlplus commands here that are to be executed when a user
-- starts SQL*Plus on your system
-- USAGE
-- This script is automatically run when SQL*Plus starts
-- For backward compatibility
SET PAGESIZE 14
SET SQLPLUSCOMPATIBILITY 8.1.7
-- Used by Trusted Oracle
COLUMN ROWLABEL FORMAT A15
-- Used for the SHOW ERRORS command
COLUMN LINE/COL FORMAT A8
COLUMN ERROR FORMAT A65 WORD_WRAPPED
-- Used for the SHOW SGA command
COLUMN name_col_plus_show_sga FORMAT a24
-- Defaults for SHOW PARAMETERS
COLUMN name_col_plus_show_param FORMAT a36 HEADING NAME
COLUMN value_col_plus_show_param FORMAT a30 HEADING VALUE
-- Defaults for SET AUTOTRACE EXPLAIN report
COLUMN id_plus_exp FORMAT 990 HEADING i
COLUMN parent_id_plus_exp FORMAT 990 HEADING p
COLUMN plan_plus_exp FORMAT a60
COLUMN object_node_plus_exp FORMAT a8
COLUMN other_tag_plus_exp FORMAT a29
COLUMN other_plus_exp FORMAT a44

Similar Messages

  • SQLPlus output within bash script

    Hey everyone, I wasn't sure if this should go here or in the SQL forum or the Linux forum, but here goes:
    Using Oracle10g on Linux, I'm using a bash script to run an sql script, but when I try to echo the results, it shows the output in a single line.
    Here's the script
    USERLIST=`sqlplus -s  / AS SYSDBA <<EOF
       set head off
       set verify off
       set feedback off
       SELECT username from dba_users;
       exit;
    EOF
    `
    echo $USERLIST;And here's the output:
    oracle@apps scripts]$ ./userl.sh
    PAYROLL HR2 CORE DEMO TIMEKEEPING SYS EXPENSE Is there anyway so that the output can be shown with line breaks, where all the output is not on one line? I understand I can spool to a file using the spool command, however I'd like to try and get it working this way first.
    Any help would be much appreciated, thanks.
    Edited by: oscrub on Sep 22, 2010 6:46 PM

    Handle:      oscrub
    Status Level:      Newbie
    Registered:      Oct 5, 2008
    Total Posts:      7
    Total Questions:      4 (3 unresolved)
    so many questions & so few answers.
    sh  t.sh
    SYSTEM
    SYS
    MGMT_VIEW
    DBSNMP
    SYSMAN
    USER1
    DBADMIN
    HR
    OE
    SH
    BONGO
    SCOTT
    OUTLN
    OLAPSYS
    SI_INFORMTN_SCHEMA
    OWBSYS
    ORDPLUGINS
    XDB
    ANONYMOUS
    CTXSYS
    ORDDATA
    OWBSYS_AUDIT
    APEX_030200
    APPQOSSYS
    WMSYS
    EXFSYS
    ORDSYS
    MDSYS
    FLOWS_FILES
    SPATIAL_WFS_ADMIN_USR
    SPATIAL_CSW_ADMIN_USR
    APEX_PUBLIC_USER
    DIP
    IX
    MDDATA
    PM
    BI
    XS$NULL
    ORACLE_OCMHow do you spell S-Q-L?

  • How make "Scanner" not printing the output in a new line?

    Hi!
    I'm Jordi from Barcelona and I'm new on Java and on this Forum. I have a question to you. I'm developing a testing application that uses the "Scanner".
    Before using it, the app asks a question to the user:
    String strInput;
    Scanner sc = new Scanner(System.in);
    System.out.print("* Please, write your name: ");
    strInput = sc.next();Running this, the app asks me for the options and after pressing "Enter" prints the input string in a new line like this:
    * Please, write your name:
    Jordi
    And I would to get the next:
    * Please, write your name: Jordi
    Does anybody know how to make the "Scanner" print the output in the same line as the question?
    Thanks for your help!
    Jordi

    Running the code,
    import java.util.Scanner;
    public class Test {
        public static void main(String[] args) {
            Scanner sc = new Scanner(System.in);
            System.out.print("* Please, write your name: ");
            System.out.println("* Hi, "+sc.next());
    }results in the following output:
    * Please, write your name: Bart
    * Hi, BartWhere the first "Bart" is the input I gave.
    If this is not the case, then it has something to do with your IDE or perhaps you didn't recompile and it previously was
    System.out.println("* Please, write your name: "); // println instead of printbut it's all guesses.
    Good luck.

  • How to format sqlplus output

    In previous OTN Forum format we used {code} to format sqlplus output , how to do in this version ?

    Click on "Use Advanced Editor".
    Highlight your code.
    Click on the symbol >>
    Select Syntax Highlighting
    Select SQL...output looks like below:
    select sysdate from dual;

  • Output shows the single line

    Dear All
    I have a form which shows the output for only one line for a give parameter. But when the same query is copied from the form it shows all 36 rows in backend. i think the issue is becuse of property palette.
    Kindly update it.
    regards
    Arifuddin
    Edited by: user11309801 on Feb 13, 2011 3:17 AM

    Ask your question at the Forms Forum @ Forms

  • Printing everything on same line

    Hi all,
    I want to write text on a text File in a formatted manner, such that there is line break after every line.The problem I am facing is that it print everything on same line. When we use "/n" it generates a dummy character. We are using FileWriter
    String s="Hello"+"\n"+"Everybody";
    FileWriter f=new FileWriter("abc.txt",true);
    f.write(s);
    f.close();
    I want every time this code is runs it should print sentences on different line.

    Then I would recommend that you wrap a PrintWriter around your FileWriter and use its methods named println(), then you won't have to worry about newlines yourself. Since a newline is different depending on what OS you run your program on, that is a safer approach than just typing "\n" (which only works as newlines on Unix type OS's btw, on Windows it comes out as garbage when viewd in for example Notepad since Windows uses "\r\n" for newline)
    Like this (reusing your code)
    FileWriter fw = new FileWriter("abc.txt",true);
    PrintWriter pw = new PrintWriter(fw);
    pw.println("Hello");
    pw.println("Everybody");
    pw.close();Another alternative is to use System.getProperty("line.separator") instead of "\n" to make it work on all platforms.
    HTH,
    Fredrik

  • HELP please! :) My ipod gets like lock, everything appear with lines, I already restore like three times the ipod and still happens the same, what can I do? and on some app store they just told me that restore, but well I do and is the same!

    My ipod gets like lock, everything appear with lines, I already restore like three times the ipod and still happens the same, what can I do? and on some app store they just told me that restore, but well I do and is the same! What can I do?? and is new, I buy it on march!
    This is a image of the ipod already restore, and everytime looks like that!

    If restoring the iPod to factory defaults/new iPod dow not solve the problem you likely have a hardware problem.  In that case either make an appointment at the Genius Bar of an Apple store or call AppleCare.  If defective, Apple will replace your iPod at no cost.

  • FORMATTING SQLPLUS OUTPUT

    I am running a shell script
    shell script
    #!/bin/sh
    sqlplus /nolog <<EOF>/ora01/file1
    CONNECT aaa/bbb@abc
    select table_name from user_tables;
    exit
    EOF
    output
    SQL*Plus: Release 10.2.0.1.0 - Production on Thu Sep 13 17:01:53 2007
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    SQL> Connected.
    SQL> SQL> SQL> SQL> SQL>
    COUNTRIES
    REGIONS
    JOBS
    JOB_HISTORY
    EMPLOYEES
    DEPARTMENTS
    LOCATIONS
    SQL> SQL> Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    desired result
    COUNTRIES
    REGIONS
    JOBS
    JOB_HISTORY
    EMPLOYEES
    DEPARTMENTS
    LOCATIONS
    how can i format my sqlplus output so that my desired result is as above.
    Thanks!

    Yes, this seem to work, however, only if connect is done not from within sqlplus but from the shell prompt.
    ~ >cat s.sh
    #!/bin/sh
    sqlplus -s scott/tiger <<EOF
    set term off feed off head off pages 0
    select table_name from user_tables;
    exit
    EOF
    ~ >./s.sh
    DEPT
    EMP
    BONUS
    SALGRADE
    SCHEME_CBFOWF1
    DR$SCHEME_CBFOWF1_IDX$I
    DR$SCHEME_CBFOWF1_IDX$R
    PROVATAB1
    DR$PROVAINDEX1$I
    DR$PROVAINDEX1$R
    CREATE$JAVA$LOB$TABLE
    X
    SYS_IOT_OVER_57950
    SYS_IOT_OVER_57953
    JAVA$OPTIONS
    PROVA1
    DR$PROVAINDEX1$N
    DR$PROVAINDEX1$K
    DR$SCHEME_CBFOWF1_IDX$N
    DR$SCHEME_CBFOWF1_IDX$KBest regards
    Maxim

  • SQLPlus Output issue

    Running mutiple versions of SQLPlus with the same issue : 11.1.0.6.0, 11.1.0.7.0, 11.2.0.1.0 connecting to an external suppliers 9.2.0.8 database
    Batch file calls a number of sql scripts and creates and then appends the output to a file like this :
    sqlplus -s user@server @SQLStatement.sql >> %FILENAME%.TMP
    Within the SQL Statment we've got the following set statements then the select :
    set pagesize 0
    set heading off
    set echo off
    set verify off
    set linesize 3999
    set long 1000000
    select lots of XMLELEMENTs Where .......
    Within the output there are single space's, when the end of the line should be a space it actually drops the space and has the next line just after the last character.
    Changing the linesize has no effect other than decressing the number of times it happens by having a less rows by having a larger number.
    Is there a way to get the missing space back within Oracle or will I need to modify the tmp file with something like sed ?
    Many Thanks

    ... But honestly I wasn't facing to any problem with the older version.Neither I, but who knows... Here is a list of add-ons and bugs fixed since version 0.24. The list is extracted from rlwrap's "NEWS" file.
    0.28 rlwrap bug that caused termcap problems on Fedora Core 6
    fixed (thanks Tung Nguyen)
    0.27 when stdin is not a terminal, rlwrap will now exec() the
    specified command instead of complaining
    when stdout or stderr is not a terminal, rlwrap will re-open
    it to /dev/tty (the users terminal) after forking off the
    specified command (so "rlwrap cat > file" will work as a
    quick and dirty line editor)
    rlwrap now remembers inputs of length 1
    -D option to tell rlwrap how agressively it should weed out
    duplicate history entries
    -H option added (history format string)
    Added temporary fix for termcap weirdness on Fedora Core 6
    new -t option for a quick check of terminal capabilities
    (requires configuration with --enable-debug)
    rlwrap -s 0 <command> will now zap <commands> history
    fixed broken reporting of unrecognised options
    0.26 configure on FreeBSD 6.0 still didn't find libutil
    some files were unnecessarily kept open (thanks Stephan Springl)
    on each platform, rlwrap -h now accurately reflects whether
    rlwrap can use long options or optional arguments
    0.25 rlwrap would print input twice when in vi-mode
    rlwrap under FreeBSD 6.0 now uses openpty() from libutil (config
    script fixed)
    -P option added (one-shot rlwrap with pre-given prompt)
    Until now, whem the underlying command was killed by a signal,
    rlwrap would just exit with exit code 0. Now rlwrap will
    cleanup, reset its signal handlers and then send the same signal
    to itself - so that rlwraps parent (usually a shell) doesn't see
    the difference with an un-rlwrapped command
    Regards
    N.J.

  • Misaligned SQLPlus output

    Hi,
    Yes, I know this should go in the SQLPlus (tumbleweed) forum, but somebody there asked exactly the same question over a month ago and it still hasn't received even one attempted reply!
    So, simple question; why is the following output misaligned? Specifically, the value 14 for SAMPLE_SIZE is placed in the middle of its column, and consequently LAST_ANALYZED (21-feb-13) is shoved into the SAMPLE_SIZE column:
      1  select column_name, data_type, avg_col_len, density, num_distinct NDV, histogram, num_buckets buckets, sample_
    size, last_analyzed,data_type
      2  from dba_tab_cols
      3  where owner  = 'SCOTT'
      4  and table_name = 'EMP'
      5  and column_name = 'EMPNO'
      6* order by internal_column_id
    SYS@ORCL> /
    COLUMN_NAME               DATA_TYPE  AVG_COL_LEN     DENSITY          NDV HISTOGRAM       BUCKETS SAMPLE_SIZE LAST_
    ANAL DATA_TYPE
    EMPNO                     NUMBER               4  .071428571           14 NONE                  1       14 21-FEB-1
    3 NUMBER
    SYS@ORCL>Btw, the **** above should read A N A L (without the spaces) as in LAST_ANALYZED but a rather enthusiastic filter seems to be at work.
    Second question - I was wondering if I had entered a COLUMN ... FORMAT command that had screwed things up..but as far as I can tell, there is no way to retrieve the list of column formats that SQLPlus is currently using - or is there?
    *****Edit - ignore the second question - I just found that you can simply type
    COLUMNto get a listing of all column formatting instructions currently in use. I checked to see if SAMPLE_SIZE has any formatting applied to it and it does not.
    Many thanks,
    Jason
    Edited by: Jason_942375 on Mar 25, 2013 9:53 PM
    Edited by: Jason_942375 on Mar 25, 2013 9:55 PM

    Jason_942375 wrote:
    Hi guys
    Sorry, forgot to "watch" the thread.
    Well, thanks for your advice, which all seems to boil down to setting linesize. I should have said, I had already looked at this and discounted it as responsible for the issue. I've been able to refine the problem with the following use case:
    SCOTT@ORCL> SHOW LINESIZE
    linesize 120
    SCOTT@ORCL> DROP TABLE T;
    Table dropped.
    SCOTT@ORCL> create table T (X number);
    Table created.
    SCOTT@ORCL> insert into t values (14);
    1 row created.
    SCOTT@ORCL> commit;
    Commit complete.
    SCOTT@ORCL> select * from t;
    X
    14
    SCOTT@ORCL> select lpad('Z',100,'Z') dummy , X from T;
    DUMMY                                                                                                      X
    ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ      14
    SCOTT@ORCL>What you can see is that the formatting of the column X changes. When just that column is selected, all is fine. When it is output next to other column output, it gets misaligned.
    I think it may have something to do with the Window width, which I currently have set to 115.
    If I set the linesize to a few less (not one less) than 115, it seems to wrap the next column okay. But more testing is needed (though it's not exactly the kind of thing you want to waste hours on...although it's bloody annoying!!).Probably a combination of your window width, AND the font. If it is a 'proportional' font, a space will not be as wide as a "Z" or a "W" ... a string of spaces will tend to pull everything following it to the left. Oracle and SQLPlus have no control over how your windows client renders things.

  • SQLPLUS: define variable with multiple lines

    Hi All,
    I need define a varaible with multiple lines as following:
    define schema_name = 'aaa',
    'bbb',
    'ccc';
    select * from tb_test where sName in &schema_name;
    However, it seems SQLPLUS dose not like the way I define the variable. What I want to do is to select * from tb_test where sName in ('aaa', 'bbb', 'ccc'). I would like to use multiple lines in the define.  Any suggestion?
    Thanks,

    Hi,
    If the substitution variable contains special characters, such as spaces or single-quotes, then enclosed the whole value in double-quotes, like this:
    DEFINE  schema_list = "'aaa', 'bbb', 'ccc'"
    If you really need linefeeds in the value, then you might have to use COLUMN ... NEW_VALUE (or OLD_VALUE) to set the value.  For example:
    COLUMN schema_list_col NEW_VALUE schema_list
    SELECT  '''aaa'', ' || CHR (10)
         || '''bbb'', ' || CHR (10)
         || '''ccc'''     AS schema_list_col
    FROM    dual;

  • In the output list Repeating one line always when generating query by sq01

    Hi,
    I have generated a query in sq01 for list material document for movment type 301 (Transfer posting) using below tables :
    MSEG          Material No. MATNR, Movt. - BWART, Qty. -MENGE
    MKPF          Material doc. field  MBLNR
    MARC          Stock in Transit UMLMC
    some times it is generating the output as i want i.e.
    Material document          material no.      qty.     movt.      stock in transit
    4001               1xx          1     301     0
    4002               2xx          2     301     0
    but some time it is repeating the same line in output ie..
    Material document          material no.      qty.     movt.      stock in transit
    4001               1xx          1     301     0
    4001               1xx          1     301     0
    4001               1xx          1     301     0
    4001               1xx          1     301     0
    Please let me know the reason. is there any control in sq01.
    Thanks

    Yeah it is clear visible that, the same combination might have available in different plants.
    So to avoid the duplicate entries, always select all the primary key fields available in all the tables in the output.
    If not atleast try restricting based on plant in the selection screen or any possible duplicate entreis.
    So add the key fields at Infoset level in SQ02

  • Spool output conatins unwanted blank line

    Hi all,
    I've just written a new program that outputs a report to the spool when run in batch mode. The report looks great aside from an unwanted blank line that appears in the middle of the report when I view the spool...if I run the program from the command line and set the sy-batch variable to write the spool contents to the screen I see no blank line. how do I get rid of the blank line?  Thanks in advacne for any assitance provided.
    Mat

    Hi Mat,
    The blank line you see on the spool (as distinct from the screen) is probably a page break.  The spool will always apply a page format and split the list according to the length of the page.
    I guess you can get round this by creating a page format with the maximum number of lines (99999 lines).
    Regards,
    Nick

  • How to avoid output file and error lines when condition does not match

    Hi Experts
    A customer want to send purchase order files to several vendors and each vendor has their own requirement to content and file format. I have prepared scenarios for each vendor and a template is (conditionally) called when CardCode matches. It works fine, - PO file is generated when CardCode matches, but error lines are written to SAP B1 Control Center each time CardCode does not match the one defined in a scenario (100 or more times per day). Problem is that these error lines does not get automatic deleted. Conditional processing are made in this way:
    Result Message in SAP B1 Control Center when CardCode does not match:
    I tried to avoid an error line in SAP B1 Control Center when CardCode does not match in this way:
    Then no error lines are written to SAP B1 Control Center, but an output file is generated each time (order file when CardCode matches and an empty file when CardCode does not match).
    Any suggestions on how to avoid both errors types (error lines in SAP B1 Control Center and empty output files)?
    Or - can lines in SAP B1 Control Center be automatic deleted?
    Regards
    Steen

    Hi Steen,
    using <b1im_skip> should be the right approach, if you're working with B1 OUTBOUND.
    Following extract form the B1i help describes the usage to skip the outbound processing:
    1.1 Skipping Outbound Processing
    If you do not want to hand over the message to the receiver system, the scenario step can create a special tag that indicates to generic processing in the integration framework to skip the message processing.
    Add the following to the final transformation atom (atom0):
    <b1im_skip xmlns= ”” info=”my info” msglog=”true” msgout="yes">
    If the integration framework skips the message, it puts the message log information to the Filtered section, if the message log is switched on. The result message contains the Message skipped by vBIU logic information.
    info
    To display an individual message, define it using the info attribute.
    msglog
    If you want to avoid an entry in the message log, introduce the msglog attribute and set it to false.
    msgout
    To display the skip information in the Success section of the message log, use the msgout attribute and set it to yes.
    In case you don't want any MsgLogEntry in case of a skipped message, please enter the following in final atom0:
    <xsl:template name="transform">
    <xsl:attribute name="pltype">xml</xsl:attribute>
    <xsl:choose>
    <xsl:when test="$msg/BOM/BO/Documents/row/CardCode=&apos;C20000&apos;">
    <xsl:call-template name="transform2"/>
    </xsl:when>
    <xsl:otherwise>
    <b1im_skip info="skipped" msglog="false"/>
    </xsl:otherwise>
    </xsl:choose>
    </xsl:template>
    Best regards
    Bastian

  • Output Problem with Smartform Lines

    Hai i have done an HR payslip by using smartform.All the form output has gone perfectly, but the lines given to template are not reflecting in the hardcopy of the printout but we can see these lines in output properly.
    My client is using Epson Line Printer . while i have taken a print out some lines are reflecting and some or not.
    I have tested the same SF form in HP laserjet Printer ,
    where iam getting the output with proper results.
    Pls let me know the solution whether i have done any mistake while designing the template.

    hi,
        whats the page format that u have used for ur smartform? Pls check that u using the same settings in the printer as well.
    Nayan

Maybe you are looking for

  • ICal to Notes: paste error

    For fast access of when meetings are scheduled, I can search iCal and produce a list. I cannot do that on my iPhone. My solution to get the info into the Phone is to copy the Calendar list and paste to a Note. When I tried it, the Calendar dates past

  • Storing data in a directory

    I need to store a set of records that are arranged in a tree structure. Each leaf contains what is essentially a lot of text, and each internal node simply branches into one or more subnodes. The structure would lend itself natrually to a file system

  • Modify the messages in error page.jsp

    Hi All, I am using error page for exception handling and using the statement LOG.error("dpm Exception", exception); But due to this my performance of the program is getting degraded. For example if the user is not authenticated to view a particular p

  • The application "Numbers" can't be opened - 1712

    Numbers won't open.  This is the first time I've had this problem.  It's version 3.1 updated in Jan 2014.  Can anyone help?  Thank you Juliet

  • Screen Exit for FB03 TCODE

    Hi All, I need to enhance the Standard SAP FB03 screen by adding an custom pushbutton. Kindly can some body help me in finding Screen Exit. I have searched for User Exits for FB03 in SMOD but could not find out an exact one. If any body has step by s