Document Type | Troubleshooting
Category | Utility
Applicable Product Versions | 6FS07, 7FS01, 7FS02
Error Code | 90613
Document Number | TUTTS005
Issue
When there are rows in a table exceeding the int max value (2147483647), during the tbexport process, a
JDBC-90613:Number of fetched rows exceeds the maximum error occurs.
Cause
Due to the JDBC 1.8 patch not being applied, the resultset value cannot handle values exceeding the int max value, causing an error during the row extraction process.
Solutions
1. Apply the patch. (Patch applied: FS02_315042a_expimp)
FS02_315042a_expimp Patch Description
The export module itself creates a hidden parameter called ora_hash, which uses ora_hash to divide buckets and handle values exceeding the integer max value.
Result after patch application
tbexport/import username=tibero password=tibero sid=tibero ip=xxx.xxx.xxx port=xxxx file=test.dat log=test.log user=test ora_hash=y
CautionApply the patch through technical support provided by TmaxTibero.
2. Attempt to resolve the error by setting a workaround.
Workaround
Set the row count below Integer.Max_Value and split the data for insertion.
Use the ORA_HASH function.
(You can divide the data into a certain number of buckets, and if based on ROWID, the data will be properly distributed.)
(You can divide the data into a certain number of buckets, and if based on ROWID, the data will be properly distributed.)
2.1. Create Table Structure
-- Original table CREATE TABLE t1 ( c1 NUMBER, c2 VARCHAR2(100), c3 DATE ); -- Insert sample data for testing INSERT INTO t1 SELECT level, 'value_' || level, SYSDATE - level FROM dual CONNECT BY level <= 1000; commit; -- Create subtables for distributed storage (same structure as original) CREATE TABLE t1_1 AS SELECT * FROM t1 WHERE 1=0; CREATE TABLE t1_2 AS SELECT * FROM t1 WHERE 1=0; CREATE TABLE t1_3 AS SELECT * FROM t1 WHERE 1=0; CREATE TABLE t1_4 AS SELECT * FROM t1 WHERE 1=0;
2.2. Data Partitioning Using ORA_HASH(ROWID, 3)
-- bucket 0 INSERT INTO t1_1 SELECT * FROM t1 WHERE ora_hash(rowid, 3) = 0; -- bucket 1 INSERT INTO t1_2 SELECT * FROM t1 WHERE ora_hash(rowid, 3) = 1; -- bucket 2 INSERT INTO t1_3 SELECT * FROM t1 WHERE ora_hash(rowid, 3) = 2; -- bucket 3 INSERT INTO t1_4 SELECT * FROM t1 WHERE ora_hash(rowid, 3) = 3;
2.3. Data Verification
-- Check row count for each table SELECT 't1_1' AS table_name, COUNT(*) FROM t1_1 UNION ALL SELECT 't1_2', COUNT(*) FROM t1_2 UNION ALL SELECT 't1_3', COUNT(*) FROM t1_3 UNION ALL SELECT 't1_4', COUNT(*) FROM t1_4; -- Compare with original data SELECT COUNT(*) FROM t1; -- Total count