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

DBA Scripts / Part No.4

This Is new Scripts for Database Administrator , But this Scripts to Check Performance and helping you in Tuning :

1-Script_1 . (Active Session/Execution Plan/Oracle 9i)
2-Script_2 (Active Session/Execution Plan / Any Version).
3-Script_3 (Plan History).
4-Script_4 (Number Of sesion).

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

Query To give Dba Object for specific User

Simple Topic let you know what is the database object for specific user

SELECT object_name, object_type
FROM   all_objects
WHERE  owner = 'SYS'
AND    object_type IN ('PACKAGE', 'PACKAGE BODY')
ORDER BY object_name, object_type;

Thank you
Osama Mustafa

Dataguard on Different Operating Systems

In 10g, dataguard started to support different binaries on primary and standby database servers with the same OS family.

  For example :

Microsoft Windows 64-bit on primary and Microsoft Windows 32-bit
Microsoft Windows 64-bit for AMD on standby database server.

However with 11g, dataguard also supports different OS on primary and standby servers. I wanted to share the support matrix for this feature.

 Check this Blog which is talking about this topics and post some Notes From My Oracle Support :

Emre Baransel.



Thank you
Osama Mustafa