Search

OakieTags

Who's online

There are currently 0 users and 22 guests online.

Recent comments

Affiliations

Show stuff

There are various “show” commands in SQL*Plus that are convenient short-cuts for simple SQL commands, for example:

show parameter
show recyclebin
show sga
show spparameter

You may find, though, that the output leaves a little to be desired, for example:

show parameter sharing
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
_optimizer_extended_cursor_sharing_r string      SIMPLE
el
cursor_sharing                       string      EXACT

SQL> show parameter dump

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
background_core_dump                 string      partial
background_dump_dest                 string      /u01/app/oracle/diag/rdbms/xxx
                                                 xxx/inst01/trace
core_dump_dest                       string      /u01/app/oracle/diag/rdbms/xxx
                                                 xxx/inst01/cdump
max_dump_file_size                   string      unlimited
shadow_core_dump                     string      PARTIAL
user_dump_dest                       string      /u01/app/oracle/diag/rdbms/xxx
                                                 xxx/inst01/trace

The output can be a little messy because of column limitations – but remember, there is a column command in SQL*Plus to allow you to control the output, and all you’re looking at with the show commands is column output. So try this:

SQL> column name_col_plus_show_param  format a38
SQL> column value_col_plus_show_param format a50
SQL> set linesize 120
SQL> show parameter sharing

NAME                                   TYPE        VALUE
-------------------------------------- ----------- --------------------------------------------------
_optimizer_extended_cursor_sharing_rel string      SIMPLE
cursor_sharing                         string      EXACT
SQL> show parameter dump

NAME                                   TYPE        VALUE
-------------------------------------- ----------- --------------------------------------------------
background_core_dump                   string      partial
background_dump_dest                   string      /u01/app/oracle/diag/rdbms/xxxxxx/inst01/trace
core_dump_dest                         string      /u01/app/oracle/diag/rdbms/xxxxxx/inst01/cdump
max_dump_file_size                     string      unlimited
shadow_core_dump                       string      PARTIAL
user_dump_dest                         string      /u01/app/oracle/diag/rdbms/xxxxxx/inst01/trace

If you issue the column command on its own you get a full listing of all the column definitions and this will show you column formatting options for:

show recyclebin   %_plus_show_recyc
show param        %_col_plus_show_param
show spparam      %_col_plus_show_spparam
show sga          %_name_col_plus_show_sga

autotrace          %_plus_exp  (relevant to pre-10.2 only)