Gokhan Atil's Technology Blog

How To Retrieve Passwords From The Named Credentials in EM12c?

The username, password, and role name of the named credentials are stored in the em_nc_cred_columns table. When we examine it, we can see that there’s one-to-many relation with em_nc_creds using the target_guid column, and the sensitive information is stored in the cred_attr_value column. That column is encrypted using the em_crypto package. The encryption algorithm uses a secret key which is stored in the “Admin Credentials Wallet” and a salt (random data for additional security). The wallet file is located in:

$MIDDLEWARE_HOME/gc_inst/em/EMGC_OMS1/sysman/config/adminCredsWallet/cwallet.sso

And the salt data can be found in the cred_salt column of the em_nc_cred_columns table. Here’s what it looks like:

encrypted_credentials

read more

BBED Block Browser Editor For Oracle 11g

BBED (Block Browser Editor) is a tool for Oracle internal use, and it helps you to read and manipulate data at the Oracle Database block level. No need to say that it’s very powerful and extremely dangerous because you can corrupt data/header blocks. There’s an unofficial but very comprehensive manual for BBED. It’s written by Graham Thornton. You can download it as PDF: http://orafaq.com/papers/dissassembling_the_data_block.pdf

The object code of BBED is shipped for earlier releases of Oracle. All you need is to compile it. On Oracle 11g, the required files are not shipped. So you need to copy the following files from an Oracle 10g home to Oracle 11g home:

$ORACLE_HOME/rdbms/lib/sbbdpt.o
$ORACLE_HOME/rdbms/lib/ssbbded.o
$ORACLE_HOME/rdbms/mesg/bbedus.msb
$ORACLE_HOME/rdbms/mesg/bbedus.msg
read more

Is It Possible to Build An Exadata Simulator?

The idea of creating an Exadata simulator arose at Oracle Day 2011 Istanbul. One of my friends was trying to fix a virtual machine in a hurry (right before his presentation), and he said his “fake Exadata” crashed. He was joking, but I wondered if it’s possible to build an Exadata Simulator using virtual Box (or any other virtualization software). I googled it and found nothing useful, so I started to work on it.

The important point is, simulating Exadata does not mean simulating all features of the Exadata Database Machine. The key features of the Exadata Database Machine are Infiniband connections and Exadata Storage Servers (the offloading capabilities and Flash Cache). It’s obvious that we do not need to simulate InfiniBand. All we need is to simulate “Exadata Storage Servers”.

Smart scanning, storage indexes, hybrid columnar compression, I/O resource manager, smart flash cache are all handled by the Exadata Storage Server “Software”. Although it’s called Oracle Exadata Database “Machine”, its heart is the Exadata Storage Server “Software”. You may say that all hardware needs software, but the Exadata software is not an embedded one. It’s just an application running on Oracle Linux 5.x 64bit.

I found a way to download the Exadata Storage Server Software. It took about three days to install it in a virtual box and one week to solve the problem of mapping physical “disks” to cell disks. By the way, I haven’t modified any executable file or script. So it was a clean installation. Then I created an ASM disk group using my “fake” Exadata Storage and started to test the features of the Exadata Storage Server.

Exadata Simulator

read more

How To Gather The Header Information And The Content Of An Export Dumpfile?

I’ve found a great document at My Oracle Support (Metalink): How to Gather the Header Information and the Content of an Export Dumpfile? [ID 462488.1]. The document explains how to extract DDL statements from dump files and how to use the DBMS_DATAPUMP.GET_DUMPFILE_INFO procedure to gather header information for both original and data pump exports.

In summary,

The Data Definition Language (DDL) statements in a DataPump dump file can be extracted with the parameter SQLFILE:

impdp DIRECTORY=testdir DUMPFILE=test.dmp SQLFILE=ddlcommands.sql FULL=y

Note: This command will not import the data, but it still needs a valid database connection.

The Data Definition Language (DDL) statements in a original export file can be extracted with the parameter SHOW:

imp FILE=test.dmp LOG=test.log FULL=y SHOW=y

The sample PL/SQL script can be found at MOS note. Unfortunately, it can only be used in an Oracle10g Release 2 or any higher release database.

After I’ve made some tests with PL/SQL code, I decided to examine Oracle export files and write my own utility to read the header information.

read more