Sasha Pachev wrote:

J. Allen Crider wrote:

I have just decided to try to learn something about MySQL after several years of working with Oracle and wanted to transfer the data I have in an Oracle 9i database to a new MySQL database. Since this is strictly for personal use, I can't justify the cost of SQLPorter, and none of the other commercial products work on Linux, so I decided to try oracledump.pl. However, I am getting the following error when I attempt to run it:

DBD::Oracle::st execute failed: ORA-01459: invalid length for variable character string (DBD ERROR: OCIStmtExecute) [for statement ``SELECT a.COLUMN_ID,
a.COLUMN_NAME,
a.DATA_TYPE,
a.DATA_LENGTH,
a.DATA_PRECISION,
a.DATA_SCALE,
a.NULLABLE,
a.DATA_DEFAULT,
b.COMMENTS
FROM USER_TAB_COLUMNS a, USER_COL_COMMENTS b
WHERE a.TABLE_NAME = ? AND b.TABLE_NAME = a.TABLE_NAME AND b.COLUMN_NAME = a.COLUMN_NAME'' with params: :p1='ALBUMS']) at ./oracledump.pl line 471.


(followed by several other errors obviously caused by this error.)

Running the same statement in sqlplus works fine.

I am running Oracle 9i Release 2 on Gentoo Linux. Any ideas on what I'm doing wrong?


Wild guess - oracledump.pl has some kind of compatibily issue with your version of Oracle or there is a problem with the Oracle DBD driver. In any case, try debugging it - it is just trying to pull the names of Oracle table columns from the system tables, and is not doing it quite right. I would begin debugging by first making sure the Oracle DBD works ( you should be able to execute a simple Perl script that connects and reads Oracle data).

P.S. Huntsville, AL is a very nice place


I'm afraid part of my problem is that I haven't made time to learn Perl yet. Gentoo does not have an ebuild for the Oracle driver that I could find, so I downloaded DBD-Oracle 1.15 from CPAN and built it from source on my system. I did a "make test" after the make, which seemed to work after I got the environment variables correct. Since I did not provide a list of tables on the command line when I ran oracledump.pl and ALBUMS is a table in my Oracle database, I'm assuming that oracledump.pl was able to connect to my database and successfully execute the query "SELECT TABLE_NAME FROM USER_TABLES".
I found the error message on Oracle's web site, but their description of the error doesn't help me much:
*Cause: * The buffer length was less than the minimum required or greater than its length at bind time minus two bytes.
I don't know what buffer this is referring to, and since I don't know Perl, I've had no success trying to find anything in oracledump.pl that might be the buffer.



-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to