ADS version : ads-windows-x64-14.0-dev-44
Database:Sybase Anywhere 12/Sybase ASE15.7
Why both database have different behavior,since same insert script is used in both the DB's
![]() |
101 KB
|
167 KB
|
150 KB
|
173 KB
![]() |
15 KB
|
128 KB
Tariq - pls try & reproduce here on Sybase ASE so we can debug the issue.
I was not able to reproduce your "Type '7'" error here. I followed the step described above and applied the same test file on both Sybase Anywhere 12.x (see screenshot Import-Sybase-Anywhere) and Sybase ASE 15.x (see screenshot Import-Sybase-ASE), everything worked as expected. The following errors are correctly reported by the Import tool:
Execute batch failed: JZ0BE: BatchUpdateException: Error occurred while executing batch statement: SQL Anywhere Error -195: Column 'P_Id' in table 'issue_8757' cannot be NULL
Execute batch failed: JZ0BE: BatchUpdateException: Error occurred while executing batch statement: SQL Anywhere Error -195: Column 'P_Id' in table 'issue_8757' cannot be NULL
Execute batch failed: JZ0BE: BatchUpdateException: Error occurred while executing batch statement: SQL Anywhere Error -131: Syntax error near 'INSERT' on line 1
Execute batch failed: JZ0BE: BatchUpdateException: Error occurred while executing batch statement: SQL Anywhere Error -131: Syntax error near 'INSERT' on line 1
This is because your data file contains 5 blank rows and 2 rows with non-integer values assigned to the first column (see screenshot Rows-With-Invalid-Data).
There are 8,547 rows of data in your test data file, if I removed those 7 rows described above from the test data file, I then can import the rest of 8,540 rows without any problem.
Applying your test file to Sybase Anywhere, 5,200 rows will be inserted to the database; however, on Sybase ASE, only 4,547 rows get inserted. The reason is when a batch is submitted, Sybase Anywhere will commit all of transactions prior a failure is encountered; on Sybase ASE, the batch is handled as a single unit, either all of transactions are committed or none of them. For Sybase ASE, 4 errors are reported so you can easily figured out that 4,000 rows are rejected (1,000/batch per your test case), and only 4,547 rows are inserted. For Sybase Anywhere, it is a bit harder for you to calculate: FYI - here is the number of rows successfully inserted on each batch - 629, 1000, 24, 0, 1000, 0, 1000, 1000, 547 (total is 5200).
The final row count reported in the Status field is incorrect, I have logged a separate issue for that (issue #9021).
I was not able to reproduce your "Type '7'" error here. I followed the step described above and applied the same test file on both Sybase Anywhere 12.x (see screenshot Import-Sybase-Anywhere) and Sybase ASE 15.x (see screenshot Import-Sybase-ASE), everything worked as expected. The following errors are correctly reported by the Import tool:
Execute batch failed: JZ0BE: BatchUpdateException: Error occurred while executing batch statement: SQL Anywhere Error -195: Column 'P_Id' in table 'issue_8757' cannot be NULL
Execute batch failed: JZ0BE: BatchUpdateException: Error occurred while executing batch statement: SQL Anywhere Error -195: Column 'P_Id' in table 'issue_8757' cannot be NULL
Execute batch failed: JZ0BE: BatchUpdateException: Error occurred while executing batch statement: SQL Anywhere Error -131: Syntax error near 'INSERT' on line 1
Execute batch failed: JZ0BE: BatchUpdateException: Error occurred while executing batch statement: SQL Anywhere Error -131: Syntax error near 'INSERT' on line 1
This is because your data file contains 5 blank rows and 2 rows with non-integer values assigned to the first column (see screenshot Rows-With-Invalid-Data).
There are 8,547 rows of data in your test data file, if I removed those 7 rows described above from the test data file, I then can import the rest of 8,540 rows without any problem.
Applying your test file to Sybase Anywhere, 5,200 rows will be inserted to the database; however, on Sybase ASE, only 4,547 rows get inserted. The reason is when a batch is submitted, Sybase Anywhere will commit all of transactions prior a failure is encountered; on Sybase ASE, the batch is handled as a single unit, either all of transactions are committed or none of them. For Sybase ASE, 4 errors are reported so you can easily figured out that 4,000 rows are rejected (1,000/batch per your test case), and only 4,547 rows are inserted. For Sybase Anywhere, it is a bit harder for you to calculate: FYI - here is the number of rows successfully inserted on each batch - 629, 1000, 24, 0, 1000, 0, 1000, 1000, 547 (total is 5200).
The final row count reported in the Status field is incorrect, I have logged a separate issue for that (issue #9021).
>> Why both database have different behavior,since same insert script is used in both the DB's
In ADS 14 the import for Sybase ASE and IQ now use prepared statements, while it still uses INSERT statements for all the other databases including Sybase Anywhere.
>> Commit failed: Type '7' not implemented
I can't find any reference to this error message in the jConnect docs. I also don't see a screenshot with this error so I am not sure where the error is occuring.
>> Why both database have different behavior,since same insert script is used in both the DB's
In ADS 14 the import for Sybase ASE and IQ now use prepared statements, while it still uses INSERT statements for all the other databases including Sybase Anywhere.
>> Commit failed: Type '7' not implemented
I can't find any reference to this error message in the jConnect docs. I also don't see a screenshot with this error so I am not sure where the error is occuring.
>> Why both database have different behavior,since same insert script is used in both the DB's
> In ADS 14 the import for Sybase ASE and IQ now use prepared statements, while it still uses INSERT statements for all the other databases including Sybase Anywhere.
When testing Batch Import related issues (e.g. issues #8757, #8788, #8799, #8801) on Sybase ASE 15.x (running on xxx.xxx.11.46), the message shown below is always logged. I mentioned this in other 3 issues but not #8757. I was assuming this is irrelevant to 'Type 7' error.
<2013-05-20 13:54:00,984> ERROR [import] <com.aquafold.datastudio.tools.importtool.ImportThread> Prepared statement failed, fallback to insert statement.
java.sql.SQLException: JZ0SJ: Metadata accessor information was not found on this database. Please install the required tables as mentioned in the jConnect documentation.
at com.sybase.jdbc4.jdbc.SybConnection.getAllExceptions(SybConnection.java:2780)
at com.sybase.jdbc4.jdbc.SybStatement.handleSQLE(SybStatement.java:2665)
at com.sybase.jdbc4.jdbc.SybPreparedStatement.prepareBCP(SybPreparedStatement.java:3427)
at com.sybase.jdbc4.jdbc.SybPreparedStatement.<init>(SybPreparedStatement.java:209)
at com.sybase.jdbc4.jdbc.SybConnection.prepareStatement(SybConnection.java:1406)
at com.sybase.jdbc4.jdbc.SybConnection.prepareStatement(SybConnection.java:1307)
at com.sybase.jdbc4.jdbc.SybConnection.prepareStatement(SybConnection.java:1278)
at com.aquafold.aquacore.scripts.WrapperConnection.prepareStatement(WrapperConnection.java:64)
at com.aquafold.datastudio.tools.importtool.ImportThread.process(ImportThread.java:258)
at com.aquafold.datastudio.tools.importtool.ImportThread.run(ImportThread.java:98)
>> 4. Now you will see that number of records imported from file in both the databases are different.In ASE very less records are inserted and we get this error:Commit failed: Type '7' not implemented.
The difference on the number of records imported is explained in 05/18/2013 comment. I was assuming 'Type 7' error has nothing to do with prepared statement.
>> Why both database have different behavior,since same insert script is used in both the DB's
> In ADS 14 the import for Sybase ASE and IQ now use prepared statements, while it still uses INSERT statements for all the other databases including Sybase Anywhere.
When testing Batch Import related issues (e.g. issues #8757, #8788, #8799, #8801) on Sybase ASE 15.x (running on xxx.xxx.11.46), the message shown below is always logged. I mentioned this in other 3 issues but not #8757. I was assuming this is irrelevant to 'Type 7' error.
<2013-05-20 13:54:00,984> ERROR [import] <com.aquafold.datastudio.tools.importtool.ImportThread> Prepared statement failed, fallback to insert statement.
java.sql.SQLException: JZ0SJ: Metadata accessor information was not found on this database. Please install the required tables as mentioned in the jConnect documentation.
at com.sybase.jdbc4.jdbc.SybConnection.getAllExceptions(SybConnection.java:2780)
at com.sybase.jdbc4.jdbc.SybStatement.handleSQLE(SybStatement.java:2665)
at com.sybase.jdbc4.jdbc.SybPreparedStatement.prepareBCP(SybPreparedStatement.java:3427)
at com.sybase.jdbc4.jdbc.SybPreparedStatement.<init>(SybPreparedStatement.java:209)
at com.sybase.jdbc4.jdbc.SybConnection.prepareStatement(SybConnection.java:1406)
at com.sybase.jdbc4.jdbc.SybConnection.prepareStatement(SybConnection.java:1307)
at com.sybase.jdbc4.jdbc.SybConnection.prepareStatement(SybConnection.java:1278)
at com.aquafold.aquacore.scripts.WrapperConnection.prepareStatement(WrapperConnection.java:64)
at com.aquafold.datastudio.tools.importtool.ImportThread.process(ImportThread.java:258)
at com.aquafold.datastudio.tools.importtool.ImportThread.run(ImportThread.java:98)
>> 4. Now you will see that number of records imported from file in both the databases are different.In ASE very less records are inserted and we get this error:Commit failed: Type '7' not implemented.
The difference on the number of records imported is explained in 05/18/2013 comment. I was assuming 'Type 7' error has nothing to do with prepared statement.
Type 7 might be referring to java.sql.Types.REAL = 7.
Type 7 might be referring to java.sql.Types.REAL = 7.
I am able to reproduce this error in Sybase ASE 15.5 at 11.57. Can you try this at the Server ending 11.57 ? Here is the log
I am able to reproduce this error in Sybase ASE 15.5 at 11.57. Can you try this at the Server ending 11.57 ? Here is the log
> Can you try this at the Server ending 11.57 ?
Here are some of error messages get logged, see screenshot Dev-Type-7-Error for more info; not sure if there is anything we can do in ADS. Only 2000 rows are successfully inserted into the database on server 11.57.
<2013-05-20 19:40:53,906> ERROR [import] <com.aquafold.datastudio.tools.importtool.ImportThread>
java.sql.SQLException: JZ009: Error encountered in conversion. Error message: java.lang.NumberFormatException: For input string: "15-0"
at com.sybase.jdbc4.jdbc.SybConnection.getAllExceptions(SybConnection.java:2780)
at com.sybase.jdbc4.jdbc.SybStatement.handleSQLE(SybStatement.java:2665)
at com.sybase.jdbc4.jdbc.SybBCP.bcpSendRow(SybBCP.java:1144)
at com.sybase.jdbc4.jdbc.SybPreparedStatement.executeBulkBatch(SybPreparedStatement.java:1684)
at com.sybase.jdbc4.jdbc.SybPreparedStatement.executeBatch(SybPreparedStatement.java:1722)
at com.aquafold.aquacore.scripts.WrappedStatement.executeBatch(WrappedStatement.java:150)
at com.aquafold.datastudio.tools.importtool.ImportThread.process(ImportThread.java:310)
at com.aquafold.datastudio.tools.importtool.ImportThread.run(ImportThread.java:98)
<2013-05-20 19:41:45,906> ERROR [import] <com.aquafold.datastudio.tools.importtool.ImportThread>
java.sql.SQLException: Bad row data received from the client while bulk copying into object 1885496538 partition 1885496538 in database 2. Received a row of length 8448 whilst maximum or expected row length is 1038.
at com.sybase.jdbc4.jdbc.SybConnection.getAllExceptions(SybConnection.java:2780)
at com.sybase.jdbc4.jdbc.SybConnection.handleSQLE(SybConnection.java:2648)
at com.sybase.jdbc4.jdbc.SybConnection.commit(SybConnection.java:1635)
at com.aquafold.aquacore.scripts.WrapperConnection.commit(WrapperConnection.java:96)
at com.aquafold.datastudio.tools.importtool.ImportThread.process(ImportThread.java:326)
at com.aquafold.datastudio.tools.importtool.ImportThread.run(ImportThread.java:98)
<2013-05-20 19:42:00,375> ERROR [import] <com.aquafold.datastudio.tools.importtool.ImportThread> Prepared statement failed, fallback to insert statement.
java.sql.SQLException: Type '7' not implemented.
at com.sybase.jdbc4.jdbc.SybConnection.getAllExceptions(SybConnection.java:2780)
at com.sybase.jdbc4.jdbc.SybStatement.handleSQLE(SybStatement.java:2665)
at com.sybase.jdbc4.jdbc.SybPreparedStatement.prepareBCP(SybPreparedStatement.java:3427)
at com.sybase.jdbc4.jdbc.SybPreparedStatement.<init>(SybPreparedStatement.java:209)
at com.sybase.jdbc4.jdbc.SybConnection.prepareStatement(SybConnection.java:1406)
at com.sybase.jdbc4.jdbc.SybConnection.prepareStatement(SybConnection.java:1307)
at com.sybase.jdbc4.jdbc.SybConnection.prepareStatement(SybConnection.java:1278)
at com.aquafold.aquacore.scripts.WrapperConnection.prepareStatement(WrapperConnection.java:64)
at com.aquafold.datastudio.tools.importtool.ImportThread.process(ImportThread.java:258)
at com.aquafold.datastudio.tools.importtool.ImportThread.run(ImportThread.java:98)
<2013-05-20 19:42:34,828> ERROR [import] <com.aquafold.datastudio.tools.importtool.ImportThread>
java.sql.BatchUpdateException: JZ0BE: BatchUpdateException: Error occurred while executing batch statement: Type '7' not implemented.
at com.sybase.jdbc4.jdbc.ErrorMessage.raiseBatchUpdateException(ErrorMessage.java:1300)
at com.sybase.jdbc4.jdbc.SybStatement.batchLoop(SybStatement.java:2134)
at com.sybase.jdbc4.jdbc.SybStatement.sendBatch(SybStatement.java:1924)
at com.sybase.jdbc4.jdbc.SybStatement.executeBatch(SybStatement.java:1882)
at com.sybase.jdbc4.jdbc.SybStatement.executeBatch(SybStatement.java:1691)
at com.aquafold.aquacore.scripts.WrappedStatement.executeBatch(WrappedStatement.java:150)
at com.aquafold.datastudio.tools.importtool.ImportThread.process(ImportThread.java:313)
at com.aquafold.datastudio.tools.importtool.ImportThread.run(ImportThread.java:98)
> Can you try this at the Server ending 11.57 ?
Here are some of error messages get logged, see screenshot Dev-Type-7-Error for more info; not sure if there is anything we can do in ADS. Only 2000 rows are successfully inserted into the database on server 11.57.
<2013-05-20 19:40:53,906> ERROR [import] <com.aquafold.datastudio.tools.importtool.ImportThread>
java.sql.SQLException: JZ009: Error encountered in conversion. Error message: java.lang.NumberFormatException: For input string: "15-0"
at com.sybase.jdbc4.jdbc.SybConnection.getAllExceptions(SybConnection.java:2780)
at com.sybase.jdbc4.jdbc.SybStatement.handleSQLE(SybStatement.java:2665)
at com.sybase.jdbc4.jdbc.SybBCP.bcpSendRow(SybBCP.java:1144)
at com.sybase.jdbc4.jdbc.SybPreparedStatement.executeBulkBatch(SybPreparedStatement.java:1684)
at com.sybase.jdbc4.jdbc.SybPreparedStatement.executeBatch(SybPreparedStatement.java:1722)
at com.aquafold.aquacore.scripts.WrappedStatement.executeBatch(WrappedStatement.java:150)
at com.aquafold.datastudio.tools.importtool.ImportThread.process(ImportThread.java:310)
at com.aquafold.datastudio.tools.importtool.ImportThread.run(ImportThread.java:98)
<2013-05-20 19:41:45,906> ERROR [import] <com.aquafold.datastudio.tools.importtool.ImportThread>
java.sql.SQLException: Bad row data received from the client while bulk copying into object 1885496538 partition 1885496538 in database 2. Received a row of length 8448 whilst maximum or expected row length is 1038.
at com.sybase.jdbc4.jdbc.SybConnection.getAllExceptions(SybConnection.java:2780)
at com.sybase.jdbc4.jdbc.SybConnection.handleSQLE(SybConnection.java:2648)
at com.sybase.jdbc4.jdbc.SybConnection.commit(SybConnection.java:1635)
at com.aquafold.aquacore.scripts.WrapperConnection.commit(WrapperConnection.java:96)
at com.aquafold.datastudio.tools.importtool.ImportThread.process(ImportThread.java:326)
at com.aquafold.datastudio.tools.importtool.ImportThread.run(ImportThread.java:98)
<2013-05-20 19:42:00,375> ERROR [import] <com.aquafold.datastudio.tools.importtool.ImportThread> Prepared statement failed, fallback to insert statement.
java.sql.SQLException: Type '7' not implemented.
at com.sybase.jdbc4.jdbc.SybConnection.getAllExceptions(SybConnection.java:2780)
at com.sybase.jdbc4.jdbc.SybStatement.handleSQLE(SybStatement.java:2665)
at com.sybase.jdbc4.jdbc.SybPreparedStatement.prepareBCP(SybPreparedStatement.java:3427)
at com.sybase.jdbc4.jdbc.SybPreparedStatement.<init>(SybPreparedStatement.java:209)
at com.sybase.jdbc4.jdbc.SybConnection.prepareStatement(SybConnection.java:1406)
at com.sybase.jdbc4.jdbc.SybConnection.prepareStatement(SybConnection.java:1307)
at com.sybase.jdbc4.jdbc.SybConnection.prepareStatement(SybConnection.java:1278)
at com.aquafold.aquacore.scripts.WrapperConnection.prepareStatement(WrapperConnection.java:64)
at com.aquafold.datastudio.tools.importtool.ImportThread.process(ImportThread.java:258)
at com.aquafold.datastudio.tools.importtool.ImportThread.run(ImportThread.java:98)
<2013-05-20 19:42:34,828> ERROR [import] <com.aquafold.datastudio.tools.importtool.ImportThread>
java.sql.BatchUpdateException: JZ0BE: BatchUpdateException: Error occurred while executing batch statement: Type '7' not implemented.
at com.sybase.jdbc4.jdbc.ErrorMessage.raiseBatchUpdateException(ErrorMessage.java:1300)
at com.sybase.jdbc4.jdbc.SybStatement.batchLoop(SybStatement.java:2134)
at com.sybase.jdbc4.jdbc.SybStatement.sendBatch(SybStatement.java:1924)
at com.sybase.jdbc4.jdbc.SybStatement.executeBatch(SybStatement.java:1882)
at com.sybase.jdbc4.jdbc.SybStatement.executeBatch(SybStatement.java:1691)
at com.aquafold.aquacore.scripts.WrappedStatement.executeBatch(WrappedStatement.java:150)
at com.aquafold.datastudio.tools.importtool.ImportThread.process(ImportThread.java:313)
at com.aquafold.datastudio.tools.importtool.ImportThread.run(ImportThread.java:98)
Issue #8757 |
Closed |
Duplicate |
Resolved |
Completion |
No due date |
No fixed build |
No time estimate |
2 issue links |
relates to #9021
Issue #9021Import: batch mode - final row count shown in the status field might be incorrect |
duplicates #8801
Issue #8801java.lang.ArrayIndexOutOfBoundsException |
Tariq - pls try & reproduce here on Sybase ASE so we can debug the issue.