Vernah
Vernah

Reputation: 81

IBM DB2 - Can't Set Schema

I am trying to use the command, SET SCHEMA. However, it does not appear to be working, I get an error message. I am able to use the schema if I use Schema.Tablename, but this can be tedious. I am perfectly connected to the database and all the schema properties appear in my schemas folder.

The error message is below:

------------------------------ Commands Entered ------------------------------

SET SCHEMA RSBALANCE;
------------------------------------------------------------------------------
SET SCHEMA RSBALANCE
DB21034E  The command was processed as an SQL statement because it was not a 
valid Command Line Processor command.  During SQL processing it returned:
SQL0805N  Package "NULLID.SQLC2H20 0X41414141415A425A" was not found.  
SQLSTATE=51002

SQL0805N  Package "NULLID.SQLC2H20 0X41414141415A425A   

Upvotes: 1

Views: 5268

Answers (3)

Vernah
Vernah

Reputation: 81

Turns out that my machine was missing an update from IBM. This allowed me to use the command from bhamby to work properly.

Thank you all for your input.

Upvotes: 0

Leo
Leo

Reputation: 1514

Information Center has documentation on the SQL0805N error.

This is the relevant course of action:

If the DB2 utility programs need to be rebound to the database, the database administrator can accomplish this by issuing one of the following CLP command from the bnd subdirectory of the instance, while connected to the database:

For the DB2 utilities:

db2 bind @db2ubind.lst blocking all grant public

For CLI::

db2 bind @db2cli.lst blocking all grant public

Upvotes: 0

bhamby
bhamby

Reputation: 15499

The syntax for DB2 is (Info Center link):

SET SCHEMA = 'YOUR_SCHEMA'

If you're using the Command Line Processor (which it appears you are by the error message), you have to use double-quotes (it does matter!):

SET SCHEMA = "YOUR_SCHEMA"

Upvotes: 2

Related Questions