ALTER DATABASE – Managing Redo logs

Alter database command is used to add loggfile or add logfile member in Oracle. This post gives the commands used to create a redo log group and adding members to this group.

Alter system kill session in Oracle

Alter system kill session – command in Oracle. This post explains scenarios when you may need to use this command

How to Install Oracle 11g Client

Step by step instructions with images for each step of Oracle 11g Client installation process. This guide will teach you how to install Oracle 11g Client

Re-Compiling ALL INVALID objects in your Oracle database

This script will re-compile all invalid objects of all schemas in yuor database. This is quite powerfull script as it will try to re-compile everything in the database that is invalid. So you must need to run this script as a highly priviledged user (such as SYS or SYSTEM or a user with DBA role)

Re-Compiling INVALID objects in own (users) schema

The script first builds up the ALTER commands for all invalid objects and put (spool) the list into an operating system file called templist.sql. The ALTER commands will be of the format

ALTER PROCEDURE CALL COMPILE;
ALTER PACKAGE PKG_TEST1 COMPILE BODY;
ALTER PACKAGE PKG_TEST1 COMPILE BODY;

Then the list file templist.sql will be run against the database to run all this commands in one go. Which means you just need to run this one script to re-compile all your invalid objects in your schema. Note that I am using here USER_OBJECTS – which is a VIEW owned by SYS user.



Similar Posts