Archive

Archive for June, 2010

ORA-24237 When Execute DBMS_UTILITY.COMPILE_SCHEMA

June 17, 2010 1 comment

Refer to metalink ID 457505.1

When executing the DBMS_UTILITY.COMPILE_SCHEMA procedure, the following errors are given:

ERROR at line 1:
ORA-20000:
ORA-06512: at “SYS.DBMS_UTILITY”, line 347
ORA-24237: object id argument passed to DBMS_UTILITY.INVALIDATE is not legal
ORA-06512: at line 1

Cause

SYS does not have the required privileges to run the procedure.

Solution

To check whether SYS has the required privileges, run the following query connected as SYS:

SQL> select username, privilege from user_sys_privs order by privilege;

If SYS does not have the following privileges, then grant them to SYS directly:

CREATE ANY DIMENSION
CREATE ANY EVALUATION CONTEXT
CREATE ANY INDEX
CREATE ANY INDEXTYPE
CREATE ANY LIBRARY
CREATE ANY MATERIALIZED VIEW
CREATE ANY OPERATOR
CREATE ANY PROCEDURE
CREATE ANY RULE
CREATE ANY RULE SET
CREATE ANY SYNONYM
CREATE ANY TRIGGER
CREATE ANY TYPE
CREATE ANY VIEW

Advertisements
Categories: Oracle

recreate 11G DB Console

June 7, 2010 Leave a comment

Drop the existing repository

$ORACLE_HOME/sysman/admin/emdrep/bin/RepManager host 1522 SID -action drop

This requires some input


$ORACLE_HOME/sysman/admin/emdrep/bin/RepManager linuxdb 1521 TESTORAC  -action drop
Enter SYS user's password :
Enter repository user name : SYSMAN
Getting temporary tablespace from database...
Found temporary tablespace: TEMP
Checking SYS Credentials ... rem error switch
OK.
rem error switch
Dropping the repository..
Checking for Repos User ... Exists.
Repos User exists..
Clearing EM Contexts ... OK.
Dropping EM users ...
Done.
Dropping Repos User ... Done.
Dropping Roles/Synonymns/Tablespaces ... Done.
Dropped Repository Successfully.

To recreate the repository

emca -config dbcontrol db -repos create

Categories: Oracle

Creating a view only user in Enterprise Manager grid control

June 7, 2010 Leave a comment

If you need to give database monitoring access to some grid control users.


SQL> connect / as sysdba

SQL> create user grid_view identified by xxx

default tablespace users temporary tablespace temp;

SQL> grant create session, oem_monitor to grid_view;

1. Logon to Grid Control as a super admin user (SYSMAN or equivalent)
2. Click on the links: Setup -> Administrators -> Click on Create
3. Remove the ‘PUBLIC ROLE’ that is listed by default
4. Under Create Administrator: System Privileges select ‘VIEW ANY TARGET’.
5. Under Create Administrator: Targets, choose all the targets this new admin should be able to view
6. Under Create Administrator: Target Privileges , BATCH ASSIGN Choose ‘View’
7. Click Apply.

Login as this new administrator user you created and set grid_view as the username for the database target in preferred credentials.

Reference: metalink note 377310.1

Categories: Grid