Seems that the application tooks too many queries and data volume were bit too much (OK, maybe I should profile the data volume & query counts...), it took me an hour of trial and error so that I realized : it is impossible to run the app without timing out while in tunneled connection.
OK, then proceed to think.. If this is were my usual application, what would I do ? I would fire up MySQL Administrator and backup the externally located database in my system, then restore it to my local MySQL database.
For oracle database, the tool alternatives were:
- use TOAD to move the database (which, I think would be tedious, and also I have no TOAD installed in my system)
- use Oracle Datapump, which we cannot use because the database are 126.96.36.199, where such technology haven't exist yet, and also .. I have no experience at this moment on Datapump.
- migrate to MySQL, and migrate back to Oracle, because each RDMBS vendor provided tools to migrate from almost any database into _their_ RDBMS
- use exp/imp
Migrating back and forth gives risk of inconsistent data type in the target database. So I choose Exp/imp.
But.. exp/imp have constraints that must be satisfied :
- version of the exp utility must match with the source database
- version of the imp utility must match with the target database
- the user being used in the source database and target database must in the similar rank, that is, they're both SYSDBAs or they're both normal users
The exp utility installed in my laptop system are 10.2.0.1.0, and the server is 188.8.131.52. So I must either (a) find one oracle client installation which version is 184.108.40.206, or (b) run the exp in the server.
Running exp on the server, I got these:
EXP-00008: ORACLE error 6550 encountered
ORA-06550: line 1, column 13:
PLS-00201: identifier 'SYS.LT_EXPORT_PKG' must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
EXP-00083: The previous problem occurred when calling SYS.LT_EXPORT_PKG.schema_info_exp
. exporting statistics
Export terminated successfully with warnings.
Puzzled for some moment, and after some googling I found :
GRANT EXECUTE ON sys.lt_export_pkg TO exp_full_database;
GRANT EXECUTE ON sys.lt_export_pkg TO PUBLIC;
And now I could export sucessfully with no strange warnings. Then downloaded the exported DMP file, import it here using oracle 10.2's IMP, and continue debugging the app..
About Oracle and MySQL
Some readers who knows me well will wonder why most of my posts is about troubleshooting Oracle, while I am one kind of person who will use MySQL for all purpose if I could. I think, its not that I am forced to work with much more Oracle database than I liked to, its more like that I seldom have problems with MySQL - export/imports run beautifully using MySQL Administrator, and no corrupted data yet when using MySQL.
Ok to be sure lets backup my one and only production app running on mysql :)