2

I am using DBArtisan 9.6.0 for accessing an IBM DB2 database. When entering a SQL query, DBArtisan forces me to prefix the schema name explicitly before every table name.

I would like to set up a default schema, but searching the DBArtisan user guide for "default schema" no longer returns any results (in older DB2 versions it did)

I know there must be a way to do this. Any suggestions?

Victor Grazi
  • 15,563
  • 14
  • 61
  • 94

1 Answers1

2

Don't know about dbartisan, but you can do it the DB2-way.

Either using the parameter currentSchema in the connection String, e.g. (Java example):

jdbc:db2://localhost:50000/MYDB:currentSchema=MYSCHEMA;

Or in your SQL using set current schema before your other commands:

set current schema MYSCHEMA;
select * from MYTABLE;
Uooo
  • 6,204
  • 8
  • 36
  • 63
  • It turns out DB Artisan does this for you if you check "Use JDBC" and then enter the data source under "defaultDatasource". Note that these fields cannot be changed once the connections is created, so you need to remember to do set that before closing the connection wizard – Victor Grazi May 15 '15 at 16:26