Friday, October 16, 2015

How to See Initialization Parameters of my Oracle Database

To see the current settings for initialization parameters, use the following SQL*Plus command:


SQL> SHOW PARAMETERS

Enter the following text string to display all parameters having BLOCK in their names:


SQL> SHOW PARAMETERS BLOCK

Thursday, October 15, 2015

STATISTICS_LEVEL parameter in Oracle


STATISTICS_LEVEL specifies the level of collection for database and operating system statistics. The Oracle Database collects these statistics for a variety of purposes, including making self-management decisions.
3 differen values that can be set for STATISTICS_LEVEL parameter in init.ora
STATISTICS_LEVEL=ALL (or)
STATISTICS_LEVEL=TYPICAL (or)STATISTICS_LEVEL=BASIC

The default setting of TYPICAL ensures collection of all major statistics required for database self-management functionality and provides best overall performance. The default value should be adequate for most environments.
When the STATISTICS_LEVEL parameter is set to ALL, additional statistics are added to the set of statistics collected with the TYPICAL setting. The additional statistics are timed operating system statistics and plan execution statistics.
Setting the STATISTICS_LEVEL parameter to BASIC disables the collection of many of the important statistics required by Oracle Database features and functionality, including:

Note:  Oracle strongly recommends that you do not disable these important features and functionality.
STATISTICS_LEVEL parameter can be modified by either ALTER SESSION or ALTER SYSTEM command
all advisories or statistics are dynamically turned on or off, depending on the new value of STATISTICS_LEVEL. When modified by ALTER SESSION, the following advisories or statistics are turned on or off in the local session only. Their systemwide state is not changed
The V$STATISTICS_LEVEL view displays information about the status of the statistics or advisories controlled by the STATISTICS_LEVELparameter
Query: 
select * from V$STATISTICS_LEVEL 

Wednesday, October 14, 2015

Query to Validate whether a Trigger is enabled or disabled

select status from user_triggers where trigger_name = 'ItsATriggerName'