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%20McEneaney's gravatar image

Shane McEneaney
66339
accept rate: 0%

edited 03 Apr '13, 13:05

Mark%20Culp's gravatar image

Mark Culp
22.9k9129269


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.

permanent link

answered 04 Apr '13, 08:14

Karim%20Khamis's gravatar image

Karim Khamis
5.6k53870
accept rate: 40%

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 statement, in SQL Anywhere 10:

ALTER DATABASE UPGRADE JCONNECT ON;
permanent link

answered 03 Apr '13, 12:20

Jeff%20Albion's gravatar image

Jeff Albion
10.7k171174
accept rate: 24%

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 .addBatch() methods should be sufficient for JDBC bulk-loading purposes.

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
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×113
×67
×32
×18

question asked: 03 Apr '13, 12:02

question was seen: 5,672 times

last updated: 05 Apr '13, 07:24