Database Blog

Script to determine the high water mark of tables

set verify off column owner format a10 column alcblks heading 'Allocated|Blocks' just c column usdblks heading 'Used|Blocks' just c column hgwtr heading 'High|Water' just c break on owner skip page…

Read More

Script to analyze all table and index partitions individually

set feed off echo off head off trimspool on line 500 spool /tmp/analyze$$.sql select 'ANALYZE TABLE '||table_owner||'.'||table_name||' partition ('|| partition_name||') estimate statistics;' from sys.dba_tab_partitions / select 'ANALYZE INDEX '||index_owner||'.'||index_name||' partition…

Read More

Script to know the audit information

conn / as sysdba tti "Auditing Initialisation Parameters:" select name || '=' || value PARAMETER from sys.v_$parameter where name like '%audit%' / tti "Statement Audits Enabled on this Database" column…

Read More

Script to delete RMAN backupsets older than a specified number of days

DAYSTOKEEP=60 # -- Do not change anything below this line --------------------------- CMDFILE=/tmp/rmanpurge$$.rcv LOGFILE=/tmp/rmanprige$$.log if [ ! -x $ORACLE_HOME/bin/rman ]; then echo "ERROR: RMAN not found or ORACLE_HOME not set." exit…

Read More

Script to list all Installed Oracle Products

PAGER=more if [ ! -d "${ORACLE_HOME}" ]; then print "ERROR: Oracle home not set." exit -1 fi print "Oracle Installed Products for ORACLE_HOME ${ORACLE_HOME}:" if [ -f "${ORACLE_HOME}/orainst/inspdver" ]; then…

Read More

DBALAM

# ###################################################################################################################################################### # Database Server Monitoring Script [dbalarm]. VER=”[6.3]” SCRIPT_NAME=”dbalarm${VER}” # Features: # Report ERRORS in DB, ASM Instance, GRID INFRASTRUCTURE, GOLDENGATE and LISTENERS ALERTLOG plus dmesg DEVICE DRIVER OS…

Read More

start and stop tracing script

# ################################################# # Script to Enable tracing for an Oracle Session. # #   #     # # # ################################################# # ########### # Description: # ########### echo echo “==================================================” echo “This…

Read More

Moving objects from one tablespace to another

set serveroutput on set lines 300 DECLARE  V_CURRENT_TABLESPACE VARCHAR2(50);  V_DEST_TABLESPACE VARCHAR2(50);  V_SQL VARCHAR2(1000);  V_OVERFLOW NUMBER := 0; BEGIN  V_CURRENT_TABLESPACE := ‘&current_tablespace’;  V_DEST_TABLESPACE := ‘&destination_tablespace’;  FOR LIST_OWNER IN (SELECT DISTINCT OWNER…

Read More

Query to find list of users who modified the profile options

SELECT fpot.user_profile_option_name, profile_option_value, fpov.creation_date, fpov.last_update_date, fpov.creation_date – fpov.last_update_date “Change Date”, (SELECT UNIQUE user_name FROM apps.fnd_user WHERE user_id = fpov.created_by) “Created By”, (SELECT user_name FROM apps.fnd_user WHERE user_id = fpov.last_updated_by) “Last…

Read More

A concurrent request fails to complete successfully due to a timeout caused by the Concurrent Processing integration with BI Publisher (formerly XML Publisher) functionality

ISSUE: A concurrent request fails to complete successfully due to a timeout caused by the Concurrent Processing integration with BI Publisher (formerly XML Publisher) functionality Error Message A (CONC-PP NO…

Read More