60 lines
1.5 KiB
SQL
60 lines
1.5 KiB
SQL
@@header
|
|
|
|
|
|
/*
|
|
*
|
|
* Author : Vishal Gupta
|
|
* Purpose : Displays database profile information
|
|
* Parameters : 1 - profile (Default value '%', Use % as wildcard, escape with '\' )
|
|
*
|
|
* Revision History:
|
|
* ===================
|
|
* Date Author Description
|
|
* --------- ------------ -----------------------------------------
|
|
* 29-Oct-13 Vishal Gupta Created
|
|
*
|
|
*/
|
|
|
|
/************************************
|
|
* INPUT PARAMETERS
|
|
************************************/
|
|
UNDEFINE profile
|
|
UNDEFINE resource_name
|
|
|
|
DEFINE profile="&&1"
|
|
DEFINE resource_name="&&2"
|
|
|
|
set term off
|
|
COLUMN _profile NEW_VALUE profile NOPRINT
|
|
COLUMN _resource_name NEW_VALUE resource_name NOPRINT
|
|
|
|
SELECT UPPER(DECODE('&&profile','','%','&&profile')) "_profile"
|
|
, UPPER(DECODE('&&resource_name','','%','&&resource_name')) "_resource_name"
|
|
FROM DUAL
|
|
;
|
|
|
|
set term on
|
|
|
|
|
|
PROMPT ******************************************************************
|
|
PROMPT * PROFILES
|
|
PROMPT *
|
|
PROMPT * Input Parameters
|
|
PROMPT * - Profile Name = '&&profile'
|
|
PROMPT * - Resource Name = '&&resource_name'
|
|
PROMPT ******************************************************************
|
|
|
|
|
|
SELECT p.profile
|
|
, p.resource_type
|
|
, p.resource_name
|
|
, p.limit
|
|
FROM dba_profiles p
|
|
WHERE p.profile LIKE '&&profile' ESCAPE '\'
|
|
AND p.resource_name LIKE '&&resource_name' ESCAPE '\'
|
|
ORDER BY p.profile
|
|
, p.resource_type
|
|
;
|
|
|
|
|
|
@@footer |