ORACLE_DBA_101

sqlplus /?

SQL*Plus: Release 12.2.0.1.0 Production on Fri Dec 22 16:41:27 2017
...

When SQL*Plus starts, and after CONNECT commands, the site profile
(e.g. $ORACLE_HOME/sqlplus/admin/glogin.sql) and the user profile
(e.g. login.sql in the working directory) are run. 

=================
/******************************************************************************
 * example lllogon.sql/lllogin.sql
 *
 * put this in $ORACLE_HOME/sqlplus/admin/glogin.sql
 *
 ******************************************************************************/
/* page/width line/vertical height sizing */
set numwidth 11
set linesize 500
set lines 500
set pagesize 200


/***** column formating ******/
COLUMN tablespace_name   FORMAT A21
COL segment_name         FORMAT A50
COL segment_type         FORMAT A10
col file_name            format a65
col value                format a60
col type                 format a15
col sid                  format a10
col member               format a60
col db_link              format a30
col host                 format a30
col username             format a20
col osuser               format a20
col program              format a30
col machine              format a30

COL log_id               FORMAT 9999   HEADING 'Log#'
COL log_date             FORMAT A35    HEADING 'Log Date'
COL owner                FORMAT A20    HEADING 'Owner'
COL job_name             FORMAT A30    HEADING 'Job'
COL status               FORMAT A10    HEADING 'Status'
COL actual_start_date    FORMAT A10    HEADING 'Actual|Start|Date'
col req_start_date       FORMAT A10   
COL error#               FORMAT 999999 HEADING 'Error|Nbr'
col run_duration         format a15
col comm                 Format $99,999.99
COL extents              FORMAT 9,999
COL blocks               FORMAT 999,999
COL bytes                FORMAT 999,999,999,999
col name                 format a65

COL TABLE_NAME           FORMAT A15
col tablespace_name      format a20
col object_name          format a30
col component            format a60
col server               format a30
col principal            format a30
col acl                  format a30
col host                 format a40
col salary               format $999,999.99
col comm                 format $99,999.99

/* convenient column alias ex: select bla w10 from dual; */
col w10                  format a10
col w20                  format a20
col w30                  format a30
col w40                  format a40

define gname = 'not connected'

col    global_name     new_value  gname


/* Select tablespace_name, Sum(bytes/(1024*1024)) TotalMB */
COL Sum(bytes/(1024*1024)) FORMAT 999,999,999,999 


set termout off
SELECT user || ' (' || v$instance.instance_name || ')' global_name FROM v$instance, global_name;
set sqlprompt '&&gname >'
set termout on

set feedback on
set serveroutput on
set pause 'press enter dude'
/* set pause off  */
=================


support.oracle.com - search "Download RDA"

https://support.oracle.com/epmos/faces/DocumentDisplay?_afrLoop=555842922662474&parent=DOCUMENT&sourceId=1910064.1&id=314422.1&_afrWindowMode=0&_adf.ctrl-state=1smy5u1mt_151

From RDA download page
  use UNZIP dos command (NOT the gui extract)
   set ORACLE_HOME and ORACLE_SID
    open dos as admin and run RDA.CMD
     take the defaults

Comments

Popular Posts