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
24.9k10139297


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.7k53870
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.8k171175
accept rate: 25%

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

Where to download files sql_asa.sql ?

permanent link

answered 24 Jul '17, 03:15

mfkpie8's gravatar image

mfkpie8
273667075
accept rate: 12%

1

Please ask the new question and don't revive the old thread.

(24 Jul '17, 04:33) Vlad
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:

×119
×86
×39
×19

question asked: 03 Apr '13, 12:02

question was seen: 12,800 times

last updated: 24 Jul '17, 04:33