I am using ASA 10 and JConnect 6.05. I set ENABLE_BULK_LOAD=true on my database connection as a performance measure. I've started using batch inserts, updates and deletes. I get the following error when my application attempts to write to the database. 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.jdbc3.jdbc.ErrorMessage.raiseError(Unknown Source) at com.sybase.jdbc3.jdbc.MdaManager.getMetaDataAccessor(Unknown Source) at com.sybase.jdbc3.jdbc.MdaManager.getMetaDataAccessor(Unknown Source) at com.sybase.jdbc3.jdbc.MdaManager.getMetaDataAccessor(Unknown Source) at com.sybase.jdbc3.jdbc.SybBCP.<init>(Unknown Source) at com.sybase.jdbc3.jdbc.SybPreparedStatement.a(Unknown Source) at com.sybase.jdbc3.jdbc.SybPreparedStatement.<init>(Unknown Source) at com.sybase.jdbc3.jdbc.SybConnection.a(Unknown Source) at com.sybase.jdbc3.jdbc.SybConnection.prepareStatement(Unknown Source) at com.sybase.jdbc3.jdbc.SybConnection.prepareStatement(Unknown Source) I ran sql_asa.sql against my database but the problem persists. Any ideas? C:ISSjConnect-6_0classes>java IsqlApp -U dba -P notReallyMyPassword -S jdbc:sybase:Tds:localhost:2638 -I ..spsql_asa.sql -c go > out.log asked 03 Apr '13, 12:02 Shane McEneaney Mark Culp |
Newer versions of jConnect in combination with SA 12 and up will handle jConnect BULK_LOAD but the combination you are using will not support the feature. Using batch inserts as Jeff suggested is your only option, but as you have already noted, the option is not the best performing. My suggestion would be to switch from jConnect to the SQL Anywhere JDBC Driver and use batch inserts with that driver, You should find that the performance of batch inserts with the SA JDBC Driver is quite decent. Note, I believe in SA 10 the SA JDBC Driver is actually referred to as the iAnywhere JDBC Driver. answered 04 Apr '13, 08:14 Karim Khamis Thanks Karim! We will try the SQL Anywhere JDBC Driver.
(05 Apr '13, 04:08)
Shane McEneaney
|
Hi Shane, Instead of running the 'SQL Anywhere' SQL file included with jConnect, you should only need to use the built-in ALTER DATABASE UPGRADE JCONNECT ON; answered 03 Apr '13, 12:20 Jeff Albion Thanks Jeff. I used the alter database statement as suggested. The error still occurs though. Shane
(03 Apr '13, 15:22)
Shane McEneaney
Replies hidden
Does this exception only happen with the 'ENABLE_BULK_LOAD=true' property? If so, I don't believe SQL Anywhere actually respects that jConnect setting. The standard JDBC Otherwise, which JDBC method are you actually calling on the prepared statement when you see this exception thrown? Which exact build and version of SQL Anywhere 10 are you using?
(03 Apr '13, 16:22)
Jeff Albion
Thanks again Jeff for helping with this. We replaced multiple (prepared) insert statements with JDBC addBatch and it was slower. For 6000 inserts it went from 58 seconds to 72. We expected it to be faster or at least take the same length of time. It was this observation that prompted us to look at ENABLE_BULK_LOAD.
(04 Apr '13, 06:59)
Shane McEneaney
|
Where to download files sql_asa.sql ? answered 24 Jul '17, 03:15 mfkpie8 |