Wednesday, January 21, 2009

ORA-06553: PLS-213: package STANDARD not accessible

Problem Description:
====================

You are doing any of the following activities

1. Compiling PL/SQL
2. Running or executing a PL/SQL script or block
3. Connecting to SQL*Plus
4. Running "catproc.sql"

Then you will receive an error as ora-6553 or PLS-213

Cause: The PL/SQL compiler could not find package STANDARD in the current
Oracle database. To compile a program, PL/SQL needs package STANDARD.

Action: Check that package STANDARD is available in the current Oracle
database, then retry the operation, Verify the status of package as its valid or not.

select owner, object_name, object_type,status from dba_objects where object_name = 'STANDARD';

If the find the status as INVALID then try compiling the package as
Alter package STANDARD compile;

If the problem still persist try running the script
@$ORACLE_HOME/rdbms/admin/standard.sql

This should solve your problem if not then Verify "$ORACLE_HOME/rdbms/admin/standard.sql" exists.

If this file does not exist then:

You probably did not install PL/SQL.
You must use the Installer to install PL/SQL.

If the file does exist then:

Verify that your ORACLE_SID is set correctly:

SQL> connect sys/
SQL> @$ORACLE_HOME/rdbms/admin/catproc.sql


2) Verify that STANDARD is owned by SYS:

SQL> SELECT * FROM DBA_OBJECTS WHERE OBJECT_NAME = 'STANDARD';

If OWNER != SYS then catproc.sql was not correctly executed
by SYS. You will have to drop these packages and rerun catproc
as SYS.

3) Try running "catalog.sql" and "catproc.sql" while opening a spool file
to catch any errors that may have occurred.

Look for Errors like:

ORA-00604: error occurred at recursive SQL level 1
ORA-04031: unable to allocate 2192 bytes of shared memory ("shared pool,

","PROCEDURE$","KQLS heap","KQLS MEM BLOCK")

Create or Replace:
*
ORA-06553: PLS-213: package STANDARD not accessible
grant execute on STANDARD to public

ORA-04042: procedure, function, package, or package body does not exist

In this case, you would need to increase the "SHARED_POOL_SIZE" in the
"init.ora".

Then re-execute CATALOG and CATPROC.

Increasing "SHARED_POOL_SIZE" will allocate more resources and
allow the scripts to run successfully.


Explanation:
============

The PL/SQL compiler could not find package STANDARD in the current
Oracle database. To compile a program, PL/SQL needs package STANDARD.









Dbconsole installation and repository configuration

Please find the steps to configure Sysman and DBconsole and Repsoitory configuration.

Before that kindly check Os privilge and Oracle related folder permission.

Steps:-

Restore the DB and to check whether sysman and dbsnmp id available and it
should be unlock mode.Collect password for those accounts.

1) Logon SQLPLUS as user SYSMAN
2) exec
DBMS_AQADM.DROP_QUEUE_TABLE(queue_table=>'MGMT_NOTIFY_QTABLE',force
=>TRUE);

3) Logon SQLPLUS as user SYS or SYSTEM
4) SHUTDOWN IMMEDIATE;
5) STARTUP RESTRICT;
6) EXEC sysman.emd_maintenance.remove_em_dbms_jobs;
7) EXEC sysman.setEMUserContext('',5);
8) REVOKE dba FROM sysman;

9)

DECLARE
CURSOR c1 IS
SELECT owner, synonym_name name
FROM dba_synonyms
WHERE table_owner
= 'SYSMAN';
BEGIN
FOR r1 IN c1 LOOP
IF r1.owner = 'PUBLIC' THEN
EXECUTE IMMEDIATE 'DROP PUBLIC SYNONYM '||r1.name;
ELSE
EXECUTE
IMMEDIATE 'DROP SYNONYM '||r1.owner||'.'||r1.name;
END IF;
END LOOP;
END;
/

10) DROP USER mgmt_view CASCADE;
11) DROP ROLE mgmt_user;
12) DROP USER sysman CASCADE;
13) ALTER SYSTEM DISABLE RESTRICTED SESSION;
14) drop public synonym MGMT_TARGET_BLACKOUTS;
15) drop public synonym SETEMVIEWUSERCONTEXT;

Delete DB Control Configuration Files and Repository Objects using
EMCA in Command prompt
================================================================
For DB Control 10.2.x,
16) /bin/emca -deconfig dbcontrol db -repos drop


Create the DB Control Configuration Files
===================================
17) bin/emca -config dbcontrol db -repos create

Warning : - No New Connections or Operations Can Be Performed During
the DB Control Repository Creation.

Finally restart the database.