My Oracle @desc.sql

Here's procedure source...

xx9999@oi>
@list.sql desc.sql desc.sql set echo off set linesize 80 set newpage none spool &1..1.txt describe &1 spool off set echo on !sort &1..1.txt -o &1..2.txt !grep -v " -" &1..2.txt>&1..3.txt !grep -v "l?" &1..3.txt>&1..4.txt !cp &..1.4.txt &1..txt !rm &..1.1.txt !rm &..1.2.txt !rm &..1.3.txt !rm &..1.4.txt !vim +2 &..1.txt 


Here's example use...

 @desc all_tables
 AVG_ROW_LEN                              NUMBER  AVG_SPACE                                NUMBER  AVG_SPACE_FREELIST_BLOCKS                NUMBER  BACKED_UP                                VARCHAR2(1)  BLOCKS                                   NUMBER  BUFFER_POOL                              VARCHAR2(7)  CACHE                                    VARCHAR2(5)  CHAIN_CNT                                NUMBER  CLUSTER_NAME                             VARCHAR2(30)  DEGREE                                   VARCHAR2(10)  EMPTY_BLOCKS                             NUMBER  FREELISTS                                NUMBER  FREELIST_GROUPS                          NUMBER  INITIAL_EXTENT                           NUMBER  INI_TRANS                                NUMBER  INSTANCES                                VARCHAR2(10)  IOT_NAME                                 VARCHAR2(30)  IOT_TYPE                                 VARCHAR2(12)  LAST_ANALYZED                            DATE  LOGGING                                  VARCHAR2(3)  MAX_EXTENTS                              NUMBER  MAX_TRANS                                NUMBER  MIN_EXTENTS                              NUMBER  NESTED                                   VARCHAR2(3)  NEXT_EXTENT                              NUMBER  NUM_FREELIST_BLOCKS                      NUMBER  NUM_ROWS                                 NUMBER  OWNER                           NOT NULL VARCHAR2(30)  PARTITIONED                              VARCHAR2(3)  PCT_FREE                                 NUMBER  PCT_INCREASE                             NUMBER  PCT_USED                                 NUMBER  SAMPLE_SIZE                              NUMBER  TABLESPACE_NAME                          VARCHAR2(30)  TABLE_LOCK                               VARCHAR2(8)  TABLE_NAME                      NOT NULL VARCHAR2(30)  TEMPORARY                                VARCHAR2(1) "all_tables.txt" 38L, 1900C    

No comments:

Favorite Tweets