Tuesday, October 28, 2008

TOAD Error

I just got error message when trying to load schema browser in TOAD. Below is the detail error message :
Module : TOAD.exe
Type : EListError
Message: 43 is an invalid PageIndex value. PageIndex must be between 0 and 42

Then I remembered that previously I installed TOAD version 9.5, but after that I re-installed with the older version, that was TOAD version 9.0. This problem was caused by TOAD read the newer configuration which was not supported by the older version.

The solution for this problem is :
1. Open toad.ini under C:\Program Files\Quest Software\Toad for Oracle\User Files, please ensure you did backup first and close TOAD application.
2. Edit and delete the section [PAGEORDERS], maybe you need delete [PAGENAMES] and [PAGESHOW] also.
3. Close it and open TOAD

Now it works properly :)


Thursday, September 04, 2008

How load flat file to oracle

I just know how to load flat file into oracle database. Oracle has provided us to use both of External Table and SQL Loader. The main functionality for External table is to store data from flat file to oracle database and the SQL Loader is used for load flat file data into External table. Actually for load flat file into oracle we only need SQL Loader, but using External Table is very usefull for operation purpose

Here is a nice tutorial about external table http://www.orafaq.com/node/848
and also about SQL* Loader

Monday, August 25, 2008

Passing parameter from shell script into sql script

Today I learn something good and simple. I will create a sql script to do some of oracle statement but I will drive it from shell script. Then I will pas some parameter from shell script to sql script. Following steps are what I've done, this one only sample :

1. Create shell script as interface
#!/bin/sh
ORACLE_HOME=/opt/oracle/product/10.2.0
export ORACLE_HOME
ORACLE_SID=JAJANGDB
export ORACLE_SID
echo "Begining update activity ..."
date
$ORACLE_HOME/bin/sqlplus -S jajang/jajang @/export/home/jajang/update_prefix/update_prefix.sql 20080711170 20080712170;
echo "Ending update activity ..."
date


2. Create sql script which read input parameter from shell script
select &1, &2 from dual;
exit;


3. Run and look the result
bash-2.05# ./update_prefix.sh >> update_prefix.log
bash-2.05# tail -f update_prefix.log
Mon Aug 25 14:43:04 WIT 2008
old 1: select &1, &2 from dual
new 1: select 20080711170, 20080712170 from dual

20080711170 20080712170
----------- -----------
2.0081E+10 2.0081E+10

Ending update activity ...
Mon Aug 25 14:43:04 WIT 2008