My Headlines

SCRIPT FOR User Information

REM:**********************************************************************************************
REM: Script SCRIPT FOR User Informations
REM: Author:  Kumar Menon
REM: Date Submitted: 07.09.2009
REM:FileName: userinfo.sql
REM:
REM: NOTE: PLEASE TEST THIS SCRIPT BEFORE USE.
REM: Author will not be responsible for any damage that may be cause by this script.
****************************************************************************************************
set feedback off
set termout on 
set pagesize 56
set linesize 800
ttitle off
spool D:\userinfo.wri

set verify off
set heading on
Prompt Database Name:
select   'Database Name (SID): ' || name "name" from     v$database; 
prompt
prompt

prompt Database Version Informations:

select * from v$version; 

select username,profile,default_tablespace,temporary_tablespace from dba_users;

Prompt Database Character Set Informations:

select * from nls_database_parameters;

Prompt Database Segment Managment  Informations:

select TABLESPACE_NAME,BLOCK_SIZE,EXTENT_MANAGEMENT,SEGMENT_SPACE_MANAGEMENT from dba_tablespaces;

Prompt Database Object Informations:

select owner,object_type,count(1) from dba_objects Where owner not IN ('SYS','MDSYS','CTXSYS','HR','ORDSYS','OE','ODM_MTR','WMSYS','XDB','QS_WS', 'RMAN','SCOTT','QS_ADM','QS_CBADM',
'ORDSYS','OUTLN','PM','QS_OS','QS_ES','ODM','OLAPSYS','WKSYS','SH','SYSTEM','ORDPLUGINS','QS','QS_CS') group by owner,object_type order by owner;

Prompt File and Tablespace Informations:

SELECT file_name,tablespace_name,autoextensible,maxbytes/1048576 FROM dba_data_files;


spool off

0 comments:

Post a Comment

Popular Posts

Followers