Set sqlplus format

select b.OWNER TABLEOWNER, b.OBJECT_NAME TABLENAME,c.OSUSER LOCKBY,c.USERNAME LOGINID, c.SID SID,
c.SERIAL# SERIAL,c.SERVICE_NAME,c.PROGRAM,a.LOCKED_MODE,c.SQL_ID,d.LAST_ACTIVE_TIME,d.SQL_TEXT "STATEMENT"
from v$locked_object a
left join
dba_objects b on b.object_id = a.object_id
left join v$session c on a.SESSION_ID =c.sid
left join v$sqlarea d on
c.sql_id=d.sql_id;

View the process

################################################################

 

set linesize 500; # Set 500 characters per line
set pagesize 1000; # 1000 rows per page set

COLUMN command
This command format query results can be achieved, provided the width of the column, the column header reset functions.

Of the character, with axx format, the digital type, a format 9999 (999 indicates the occupancy 3)

col 'TABLEOWNER' format a30;

col TABLESPACE_NAME heading a; # read a name

 

Guess you like

Origin www.cnblogs.com/Haihong72H/p/11698666.html