Tuesday, October 5, 2010

Error on Installing oracle 10g patch in linux

After installing oracle 10g in Linux machine, I have install the patch Oracle-10.2.0.4.0.  The following error raised and could not continue.

This is the command I entered:
./runInstaller –silent –responseFile /home/oracle/10g-patch10205.rsp

Error Given: 
SEVERE:OUI-10029:You have specified a non-empty directory to install this product. It is recommended to specify either an empty or a non-existent directory. You may, however, choose to ignore this message if the directory contains Operating System generated files or subdirectories like lost+found.

You have to add the “force” command with the “./runInstaller “ command.

./runInstaller –silent –responseFile –force /home/oracle/10g-patch10205.rsp

Installation runs without any interruptions. 

Sunday, October 3, 2010

How to import data from one table to another table in different Databases

To import data from one table to another table in different database you have to create a database link.

Source:
Database: 192.168.0.16/GLOBAL
Schema: GLOBBASE
Table: GLOB_COUNTRY

Destination:
Database: 192.168.0.36/LOCAL
Schema: LOCALBASE
Table: LOCAL_COUNTRY


Connect to GLOBAL database and view data form GLOB_COUNTRY


select * from GLOB_COUNTRY;


CODE    NAME           gC_CODE
1       Afghanistan    af
2       Albania        al
3       Algeria        dz
10      Argentina      ar
14      Australia      au
15      Austria        at
16      Azerbaijan     az
19      Bahrain        bh

Connect to LOCAL database.
Create table same as GLOB_COUNTRY table.


CREATE TABLE LOCAL_COUNTRY
    (code                           FLOAT(126),
    name                           VARCHAR2(255),
    lc_code                         VARCHAR2(255))
/



Create database link from the LOCAL database to GLOBAL database.

create database link glocal_link connect to GLOBBASE identified by password using '192.168.0.16/GLOBAL';


Insert data using database link

insert into LOCAL_COUNTRY
select * from GLOB_COUNTRY@glocal_link;
commit;


Select data from new table

select * from LOCAL_COUNTRY;


CODE    NAME           lC_CODE
1       Afghanistan    af
2       Albania        al
3       Algeria        dz
10      Argentina      ar
14      Australia      au
15      Austria        at
16      Azerbaijan     az
19      Bahrain        bh
….
Data have been load to the LOCAL_COUNTRY table. 

Friday, October 1, 2010

Error on execution of Oracle setup…. Fail to run the Oracle Installation

I have the Oracle set up for oracle 10g to my desktop folder named “Database software setup”. I extract the zip file and try to run the “setup.exe”. Command window for “Starting oracle universal installer” have popped up. It was unable to continue the installation. Following error message popup and end the installation process.  (Figure 1)

An unhandled win32 exception occurred in oui.exe [3020]”

Figure 1

I try several times to run the setup but it was fail. Then I just copy the setup to in to D:\ drive and try again.  This time it got executed without any issue.

Previously my “setup.exe” was in this path.
C:\Documents and Settings\chinthakas\Desktop\Oracle-10.2.0.1.0-WinNT-Base\10201_database_win32\database

Current path was:
  D:\database

The problem was my oracle installation setup containing folder path was too long......!