Friday, 7 July 2023

How to extract the data from informix db

 Step 1: login into db server and connect to db server.

Step 2: select the database and click info option to list all the tables in db.

Step 3: prepare shell script as below

vi data_extract.sh

dbaccess - - <<SQLSTMT

database <db name>;

unload to tablename.csv delimiter '|' select * from tablename;

SQLSTMT

#Save and close it

#example:

dbaccess - - <<SQLSTMT

database IBM;

unload to frm.csv delimiter '|' select * from frm;

unload to b2b.csv delimiter '|' select * from b2b;

unload to b2b_in.csv delimiter '|' select * from b2b_in;

unload to bays.csv delimiter '|' select * from bays;

unload to cef_ddm_inv.csv delimiter '|' select * from cef_ddm_inv;

SQLSTMT

#Save and close it

Step 4: chmod 775 data_extract.sh

Step 5: execute the file

./data_extract.sh

No comments:

Post a Comment

Migration of extract and pump process from 11g to 19c in golden gate

 In this example, we are going to migrated golden gate from 11g to 19c. As part of migration, we need to perform the below steps. Step 1: Pr...