Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

DESC[RIBE] output of 19c dictionary view not readable in SQL*Plus

Mark82Jun 28 2022

Database version : 19C on RHEL 7.9
In a 19c SQL*Plus in Linux terminal, I cannot even have a readable DESC command output for a DBA dictionary view as shown below.

If I copy paste the below output from Linux SQL*Plus window to a text editor like VS Code/Atom with wider linesize , it is readable. But, in SQL*Plus, its not (see screenshot below)
28June.PNGHow can I format (reduce the length) the DESCRIBE command output's "Name" and "Type" columns for a DBA_view like below in 19c ?
The following attempts failed. i.e. I couldn't reduce the column width of NAME column to 30 characters.
I am posting this here because I see that that there is no longer dedicated forum for SQL*Plus

SQL> COL NAME FOR A30
SQL> desc DBA_DB_LINKS
           Name                                                                                                    Null?    Type
           ------------------------------------------------------------------------------------------------------- -------- ----------------------------------------------------------------------------
    1      OWNER                                                                                                   NOT NULL VARCHAR2(128)
    2      DB_LINK                                                                                                 NOT NULL VARCHAR2(128)
    3      USERNAME                                                                                                         VARCHAR2(128)
    4      HOST                                                                                                             VARCHAR2(2000)
    5      CREATED                                                                                                 NOT NULL DATE
    6      HIDDEN                                                                                                           VARCHAR2(3)
    7      SHARD_INTERNAL                                                                                                   VARCHAR2(3)
    8      VALID                                                                                                            VARCHAR2(3)
    9      INTRA_CDB                                                                                                        VARCHAR2(3)




SQL> col NAME_COL_PLUS_SHOW_PARAM form a20
SQL> desc DBA_DB_LINKS
           Name                                                                                                    Null?    Type
           ------------------------------------------------------------------------------------------------------- -------- ----------------------------------------------------------------------------
    1      OWNER                                                                                                   NOT NULL VARCHAR2(128)
    2      DB_LINK                                                                                                 NOT NULL VARCHAR2(128)
    3      USERNAME                                                                                                         VARCHAR2(128)
    4      HOST                                                                                                             VARCHAR2(2000)
    5      CREATED                                                                                                 NOT NULL DATE
    6      HIDDEN                                                                                                           VARCHAR2(3)
    7      SHARD_INTERNAL                                                                                                   VARCHAR2(3)
    8      VALID                                                                                                            VARCHAR2(3)
    9      INTRA_CDB                                                                                                        VARCHAR2(3)


SQL> col "Name" for a30
SQL> desc DBA_DB_LINKS
           Name                                                                                                    Null?    Type
           ------------------------------------------------------------------------------------------------------- -------- ----------------------------------------------------------------------------
    1      OWNER                                                                                                   NOT NULL VARCHAR2(128)
    2      DB_LINK                                                                                                 NOT NULL VARCHAR2(128)
    3      USERNAME                                                                                                         VARCHAR2(128)
    4      HOST                                                                                                             VARCHAR2(2000)
    5      CREATED                                                                                                 NOT NULL DATE
    6      HIDDEN                                                                                                           VARCHAR2(3)
    7      SHARD_INTERNAL                                                                                                   VARCHAR2(3)
    8      VALID                                                                                                            VARCHAR2(3)
    9      INTRA_CDB                                                                                                        VARCHAR2(3)


SQL>
Comments
Post Details
Added on Jun 28 2022
5 comments
449 views