sysman.emcp.ParamsManager setFlag

This error Appears when are trying maunally creating EM using :

emca -config dbcontrol db -repos create 


To Solve this error make sure you do all the below steps :

1-In your local users and groups add User to ORA_DBA group.
2-Set ORACLE_HOME and ORACLE_SID.

3- sqlplus / as sysdba

@$ORACLE_HOME/rdbms/admin/dbmspool.sql
Package created.

Create the dbmspool package body:

@$ORACLE_HOME/rdbms/admin/prvtpool.plb
View created.
Package body created.

Grant execution privilege on the package:
 

 SQL> grant execute on dbms_shared_pool to sysman;
Grant succeeded.


SQL> grant execute on dbms_shared_pool to dba;
Grant succeeded.

4-Reinstall EM Using
 
emca -deconfig dbcontrol db -repos drop
emca -config dbcontrol db -repos create

Time drift detected. Please check VKTM trace file for more details

Error :

“Time drift detected. Please check VKTM trace file for more details”

Description :

This Error usually Appear After upgrade to 11.2.0.2/11.2.0.3 regarding to MOS its Bug.

Bug 11837095 "TIME DRIFT DETECTED" APPEARS INTERMITTENTLY IN ALERT LOG, THO' EVENT 10795 SET.

And you Check MOS Note For More Information About this Bug :

Time Drift Detected. Please Check Vktm Trace File For More Details. [ID 1347586.1]
Bug 11837095 – “time drift detected” appears intermittently in alert log [ID 11837095.8]

To fix the issue, Please download and apply patch 11837095 if available for your release/platform.

Download Patch From MOS/Patch Tab .

Enjoy 

Osama Mustafa

ORA-14452

Error :
 ORA-14452: attempt to create, alter or drop an index on temporary table already in use

Cause : 
 An attempt was made to create, alter or drop an index on temporary table which is already in use.

Solution :
All the sessions using the session-specific temporary table have to truncate table and all the transactions using transaction specific temporary table have to end their transactions.

Example :

SQL>CREATE GLOBAL TEMPORARY TABLE Osama ON COMMIT PRESERVE ROWS
AS SELECT * FROM employee ;

SQL> DELETE FROM Osama;
258 rows deleted.

SQL> DROP TABLE Osama;
drop table t1
*
ERROR at line 1:
ORA-14452: attempt to create, alter or drop an index on temporary table already in use

Fixing :

SQL> TRUNCATE TABLE Osama;
Table truncated.

SQL> DROP TABLE Osama;
Table dropped.

Done & Enjoy 

Osama Mustafa

BSLN_MAINTAIN_STATS_JOB

Error will Looks Like this :

Errors in file /u01/app/oracle/admin/ORCL/bdump/orcl1_j000_1781806.trc:
ORA-12012: error on auto execute of job 23122
ORA-06550: line 1, column 780:
PLS-00201: identifier ‘DBSNMP.BSLN_INTERNAL’ must be declared

Solution :

First Check if its Failed Or not :

select log_date,status from dba_scheduler_job_run_details  where job_name=’BSLN_MAINTAIN_STATS_JOB’
order by log_date desc;

LOG_DATE                                                                    STATUS
———————————————————————— ————
08-JUL-12 01.30.01.224309 PM                                         FAILED
09-JUL-12 01.30.00.855555 PM                                         FAILED
10-JUL-12 01.30.00.761203 PM                                         FAILED
11-JU:L-12 01.30.00.583605 PM                                        FAILED
12-DEC-12 01.30.00.450731 PM                                        FAILED

 to Fix it Run

SQL> @?/rdbms/admin/catnsnmp.sql
SQL> @?/rdbms/admin/catsnmp.sql

Done & Enjoy

Osama Mustafa

Mos Notes

On My Oracle Support There’s lot of Useful notes I Posted Some Of them Here :

Note:1030426.6 How to Clean Up Duplicate Objects Owned by SYS and SYSTEM Schema
Note:472937.1 Information On Installed Database Components
Note:753041.1 How to diagnose Components with NON VALID status

Simple but Useful .

Enjoy
Osama mustafa

Oracle 11.2.0.3.0 Patch

For the People Who Asked me about Patch 11.2.0.3 Please Check this Topics :

New Features

  • Oracle ACFS Snapshot Enhancements
  • Oracle ACFS Security and Encryption Features
  • Support for ACFS Replication and Tagging on Windows
  • Oracle LogMiner Support for Binary XML
  • SQL Apply Support for Binary XML
  • Oracle LogMiner Support for Object Relational Model
  • SQL Apply Support for Object Relational Model
  • Deprecation of Obsolete Oracle XML DB Functions and Packages
  • Oracle Warehouse Builder Support for Partition DML
  • Enhanced Partitioning Support in Oracle Warehouse Builder
  • Oracle Warehouse Builder External Table Data Pump Support
  • Oracle Warehouse Builder External Table Preprocessor Support
  • Compressed Table and Partition Support in Oracle Warehouse Builder
  • Support for PL/SQL Native Compilation

Patch Number : 10404530 and you Can Find On MOS ( My Oracle Support)

Some Useful Notes On MOS:
Availability and Known Issues [1348336.1]
Oracle 11g Release 2 (11.2) Support Status and Alerts [880782.1]
Fixed Bugs 1348303.1

Thank you
Osama Mustafa

Create Database Link

This Topics talks About how to create Database link , what i need

Solution

1-If you are creating public dblink, you will need a user with the following permissions:

create public database link 
drop public database link 

 If you are creating dblink, you will need a user with the following permission: 

create database link

2-check Global_names parameter in database , if you create public database link its should be TRUE, otherwise FALSE 

How To check it :

-Show Parameter global 
OR
SELECT name, valueFROM gv$parameter WHERE name =’global_names’;

To Change its Value :

Alter system set = Scope=Spfile/Memory 

3) Create the database link: 

SQL> CREATE [SHARED] [PUBLIC] DATABASE LINK CONNECT TO CURRENT_USER USING ”;

 Please note that: 
* The single quotes around the service name are mandatory 
* The service name used above must be in the TNSNAMES.ORA file on the server. If it does not existyou can create one like below: 

connection_link = 
(DESCRIPTION =(ADDRESS_LIST =(ADDRESS = (PROTOCOL = TCP)(HOST = n host name>)

(PORT = 1521)))(CONNECT_DATA =(SERVICE_NAME = )))

4) Make sure that the database link is created:

SQL> SELECT * FROM user_db_links;

Also you Can Check Database Domain :

SQL> SELECT name, valueFROM gv$parameter WHERE name IN (‘db_name’, ‘db_domain’);

sometimes you need to set database domain , refer to  Note 578668.1

Enjoy 

Osama Mustafa  

Oracle OpenWorld 2012: Focus On Database Security

Oracle OpenWorld 2012 is going to be the place to learn about Oracle Database Security solutions including Oracle Advanced Security with transparent data encryption, Database Vault, Audit Vault and Database Firewall, Label Security, and more.
We’ve put together this Focus On Database Security document so you’ll know when and where to attend the key database security sessions, and not miss a thing.

Thank you
Osama Mustafa

Determine The DBID When Using RMAN

1)If your database is open you may issue the following query:

SQL>SELECT dbid FROM v$database;

DBID
———-
1411146558

2) If you are using a recovery catalog then connect to the recovery catalog via
RMAN and issue the “list incarnation” command. You must first nomount the target
database. For example:

D:\> rman target /@mydb rcvcat /@rcat

Recovery Manager: Release 8.1.7.4.1 – Production

RMAN-06193: connected to target database (not started)
RMAN-06008: connected to recovery catalog database

RMAN> startup nomount

RMAN-06196: Oracle instance started

Total System Global Area      94980124 bytes

Fixed Size 75804 bytes
Variable Size57585664 bytes
Database Buffers 37240832 bytes
Redo Buffers 77824 bytes

RMAN> list incarnation;

RMAN-03022: compiling command: list

List of Database Incarnations
DB Key ; Inc Key DB Name ; DB ID CUR Reset SCN; Reset Time
——- ——- ——– —————- — ———- ———-
1 YES                                              282854     03-DEC-02
——————————————————————————–

3) If you have a saved copy of the screen details from a previous RMAN session
you may refer to this output for the dbid. For example:

D:\> rman target /@mydb rcvcat /@rcat

Recovery Manager: Release 8.1.7.4.1 – Production

RMAN-06005: connected to target database: ORCL817 (DBID=1411146558)
RMAN-06008: connected to recovery catalog database
——————————————————————————–

4)If you are using RMAN with version 9i you have the ability to configure the
automatic backup of your control files. If you have this feature on locate one
of your control file autobackups The name of this file will tell you the dbid
of your database. For example:

D:\ORACLE\ORA92\DATABASE> dir
Volume in drive D has no label.
Volume Serial Number is 3E3B-12FD

Directory of D:\ORACLE\ORA92\DATABASE

In this case 2282329623 is the dbid for this database.

5)If the four steps above are not available because you have lost all the files
for your database, you are not using a recovery catalog, you are not using
autobackup of your controlfile, etc., but you have an old control file available,
mount the database with the old control file then query v$database as in step 1
to obtain the dbid of your database.

6)If the platform is UNIX and you have a datafile still on disk for the problem database, you may
be able to obtain the DBID using the strings command as in the following example:

$ strings undotbs01.dbf | grep MAXVALUE

3587267724, MAXVALUE
… etc.

The output above shows the DBID in this example to be 3587267724

Source Site :
1-Mike Blog

Thank you
Osama Mustafa
Sharing for Knowledge

ORA-39083/ORA-02304 during impdp

Error :

ORA-39083: Object type TYPE failed to create with error:
ORA-02304: invalid object identifier literal

Cause:
 OID should be unique in a database. the OID in the impdp create statemene was used by old schema. 

solution:

impdp again with parameter transform=OID:n

Example :

impdp username/password@SID DIRECTORY=DMP LOGFILE=impdp.log transform=OID:n
DUMPFILE=%.dmp