Hunter Medney
Hunter Medney

Reputation: 371

Can db2 import or load be used to populate DashDB?

I'm looking to bulk loads millions of rows into a DashDB database. After connecting using the DB2 CLI, I enter a command like:

db2 import from rowsToImport.csv of del insert into MY_TABLE

with results:

SQL0551N  "DASHXXX" does not have the required authorization or privilege to
perform operation "BIND" on object "NULLID.SQLUAJ19".  SQLSTATE=42501

Is this an inherent limitation with DashDB, or is something configured incorrectly on my client? I get a similar message when trying db2 load:

SQL2019N  An error occurred while utilities were being bound to the database.

p.s. I'm aware of the rest client api for DashDB for loading data - I'm asking specifically how/if bulk loads can be done with the DB2 command line as an alternate option.

Upvotes: 3

Views: 1310

Answers (2)

mustaccio
mustaccio

Reputation: 19001

According to this technote, the package NULLID.SQLUAJ19 belongs to one of the early DB2 10.1 fix packs, so I suspect your client version is 10.1. When attempting to execute the IMPORT command it needs to bind some packages of that older version, since dashDB is DB2 10.5, obvisouly.

You may want to try installing the latest DB2 client fix pack, as the necessary packages may be already bound in the database.

To verify that you could run select pkgname from syscat.packages where pkgschema = 'NULLID' and pkgname like 'SQLUA%' -- you should see "SQLUAK20", which seems to be the corresponding package in DB2 10.5.

If that doesn't work, your other option might be to move to a dedicated dashDB instance, as you won't have sufficient privileges to bind missing packages in the entry-level shared dashDB service.

Upvotes: 2

Umberto Manganiello
Umberto Manganiello

Reputation: 3233

As per dashDB documentation you can use the Command line processor plus (CLPPlus). It is included in the dashDB driver package and provides a command-line user interface that you can use to connect to the dashDB database, BLUDB. You can use CLPPlus to define, edit, and run statements, scripts, and commands. Please take also a look at Connecting CLPPlus to the dashDB database to see how to connect and use the CLI.

Please note that in CLPPlus: IMPORT, EXPORT and LOAD commands have a restriction that processed files must be on the server: see here. So you should copy the input load file onto the remote server first with SCP. However SSH/SCP protocol should be blocked (not accessible) for a normal dashDB user.

Only geospatial data can be loaded from your local machine to dashDB, using IDA LOADGEOSPATIALDATA command in CLPPlus. The file to be loaded in dashDB using the above command can be in the local file system, accessible to the CLPPlus user.

Alternative ways to do that are:

Upvotes: 3

Related Questions