RSS
 

Posts Tagged ‘database’

Oracle Database Tips #2: How to replace the occurrence of two or more spaces with a single space using REGEXP_REPLACE

17 Dec

The REGEXP_REPLACE is an Oracle PLSQL function that works almost in the same way of the REPLACE function but extends its functionalities by using regular expression pattern.

In the following example I show you how to replace in a given string each occurrence of two or more spaces with a single space.

SQL> SELECT REGEXP_REPLACE('Too        Many       Spaces','( ){2,}', ' ') REPLACED_STRING FROM DUAL;

REPLACED_STRING
----------------
Too Many Spaces
 

Oracle Database Tips #1: How to fix the Oracle Database 11.2.0.1.0 em.ear file not found error

13 Dec

During the Oracle Database 11.2.0.1.0 installation on Windows platform you can face the following error: “<DB_HOME>\oc4j\j2ee\oc4j_applications\applications\em.ear file not found error“.

The database installation package is made of two zip archives:
win32_11gR2_database_1of2
win32_11gR2_database_2of2

To fix the problem: once you have unzipped the archives, you need to copy the content of win32_11gR2_database_2of2 folder into win32_11gR2_database_1of2 before running the installer.

 
No Comments

Posted in Database

 

OBIEE Tips #3: Make the OCI call interface option available in the connection pool definition

13 Dec

To make the OCI call interface option available in the connection pool definition you need to perform the following steps:

1. Open the repository

2. Double click on your database definition in the physical layer.

3. In the “General” tab, change the Datasource Definition to the value Oracle 10g R1 or Oracle 10g R1

4. Click OK

5. Now the OCI call interface option should be available in the related Connection Pool definition screen.

 

Natively compiled Java stored procedures using NCOMP

24 Oct

1 – Introduction

Few years ago I had the chance to make an integration between the Oracle Database and a rating engine (“WARP4“) developed by ERIS4 company.
The goal was to rate telephone traffic records stored in the database, by sending them to the rating engine.

WARP4 provided some API to allow external application to send records and rate them; this comunication was made via socket layer. In order to increase the performances I had to make several trials and one of my test cases was about the native compilation.

I personally think that Java stored procedure native compilation it’s not worthy, especially when your Java classes need to open frequently a socket connection.
Because the native compilation is a really rare activity, I thought that this post could be useful for those who want to test the ncomp benefits.

Read the rest of this entry »