Tuesday, November 17, 2015

[Oracle11g] Database Table Locked Out - ORA00054 - [SOLVED]

Issue: Unable to drop a Table in Oracle 11g. Error ORA-00054: resource busy and acquire with NOWAIT specified or timeout expired.


Cause: The table object is locked out in the Oracle 11g Database.

Resolution: Killing the request serial# is the resolution to this issue and unlocking the Oracle Database table.

Find the locked object from the Oracle Database using the following query ,
select * from DBA_OBJECTS where OBJECT_NAME='TABLE_NAME'


Get the Object ID from this table

select * from V$LOCKED OBJECT where OBJECT_ID='OBJECT_ID_HERE';

From the above query get the SESSION_ID and run the following query to find the serial # for this session,


Now run the following query to kill the Session, the syntax is as below,

ALTER SYSTEM KILL SESSION 'SID,SERIAL#';




Easy Solution:

Alternatively run the following query to find the SID and SERIAL # for the particular database object as seen in screenshot below,

SELECT OBJ.OBJECT_ID,OBJ.OBJECT_NAME, VSES.SID, VSES.SERIAL#
FROM V$LOCKED_OBJECT VLOCK,
V$SESSION VSES,
DBA_OBJECTS OBJ
WHERE
VLOCK.SESSION_ID = VSES.SID
AND VLOCK.OBJECT_ID = OBJ.OBJECT_ID
AND OBJ.OBJECT_NAME ='Your_Object/Table_Name_Here'

Now use the below query to kill session,

ALTER SYSTEM KILL SESSION 'SID,SERIAL#';

Saturday, October 31, 2015

Oracle 11g R2 32/64bit Client Installation Steps

Here is how to proceed installing an Administrative database client for an Oracle 11g Database. Go the client setup folder and run the setup.exe file as Administrator.

Select the type of Installation of Client, Choose the Administrator option as seen in screenshot below.

Give necessary details to the Software updates and Product language step and proceed to Installation location step. Proceed with default as seen below or give a custom location for the same.

The installation will give a summary of the installation process before it starts. Save a response file for later reference of the installation. 

Wait for Installation to finish. 


Now to check the installation, go to Run and type sqlplus 

Check the header of the command prompt window to see the location of the sqlplus if this is from the client_1 folder then installation is successful. 


Oracle 11g R2 Server Database Installation Steps

Follow the below steps to Install and configure an Oracle 11g R2 Enterprise Edition on Windows Server 2008. Run the setup.exe file inside the setup folder as administrator. 

At the third step select 'Create and Configure a database' as shown in the below screenshot,

The next step is to select the system class for installation, choose server class since we are creating a server database. Refer screenshot below,

Since we are not going for a clustered installation select 'Single instance database installation'. 

Select the type of Installation as Typical Install. Choose Advanced install if you want to particularly configure database to detail. 

At the next step provide details such as directory location, database name, administrative password for SYS user etc and proceed. Refer screenshot below. 

The installation will check if the environment meets minimum requirements for installation of R2 Server. 

Before Installation step is started, a summary of the Installation will be displayed. It is recommended to save this Response file for future reference. 

Installation will proceed and finish.

Once the Installation is complete, go to Windows > Run and type 'sqlplus / as sysdba' and click ok.

A new sqlplus command prompt will be opened and give a sample query to ensure that the database has been connected.

If at any step the Installation fails check the Oracle 11g Database logs to debug.

Friday, October 23, 2015

OBIEE: What is a Driving Table and when is it preferred ?

A driving table is a feature available in OBIEE using which one can improve performance of cross database joins. However this feature is very limited and can be counter productive. 

Here is how Oracle defines a Driving Table,
Driving tables are for use in optimizing the manner in which the Oracle BI Server processes cross-database joins when one table is very small and the other table is very large. Specifying driving tables leads to query optimization only when the number of rows being selected from the driving table is much smaller than the number of rows in the table to which it is being joined. 

When you specify a driving table, the Oracle BI Server will use it if the query plan determines that its use will optimize query processing. The small table (the driving table) is scanned, and parameterized queries are issued to the large table to select matching rows

This feature is available in the BMM(Business Model and Mapping Layer) of repository where you define a logical join between two tables, Here you will be able to see an option called Driving Table where you can select one of the two tables in the join. Make sure you are selecting the table with the less number of rows, usually preferred when data in one of the tables is very less ( <1000) and the other table is very large. 

Driving Table feature in Logical Join of OBIEE RPD.

Monday, October 19, 2015

What are Alias Tables and It's significance in OBIEE Physical Layer

An Alias Table or Alias in OBIEE is a physical table which references to a different physical OLAP/OLTP table as it's source.

Alias tables are often used for Repository development over Physical tables as they have the following properties,

  1. Enables reuse of a physical table.
  2. Avoids circular joins that can form when importing OLTP source tables.
  3. Create self joins between tables, for eg: Manager is also an Employee.
  4. Enables to easily identify source tables and adhere to data warehousing naming standards.
  5. Makes physical query generated easier to understand.
  6. Can override source table's caching properties like Cacheable, Cache never expires and cache persistence time. 
Alias Tables in OBIEE 11g - Example.