set current schema 
Author Message
 set current schema
i am using the command center to query a database on db2, the schema i
created is not the same as my userid.  first i  connect to db, then
set current schema = 'ABC', then i try to use select statemen without
specify schema in front of the table name to query the table, but the
error pops up stating that it try to find the table under my userid as
schema but couldn't, why i set the current schema but still can't be
recognized?


Sat, 23 Jul 2005 08:04:35 GMT
 set current schema


Quote:
> i am using the command center to query a database on db2, the schema i
> created is not the same as my userid.  first i  connect to db, then
> set current schema = 'ABC',

Take the single quotation off, like set current schema = ABC. The db2
doesn't display the warning message for the invalid schema name.
Quote:

>then i try to use select statemen without
> specify schema in front of the table name to query the table, but the
> error pops up stating that it try to find the table under my userid as
> schema but couldn't, why i set the current schema but still can't be
> recognized?



Sun, 24 Jul 2005 03:02:05 GMT
 set current schema
actually when i set current schema = 'ABC' or ABC, i got DB20000I  The
SQL command completed successfully.

but once i use select * from table, it still assume the schema is
under my userid instead of ABC, how to solve that?

Quote:



> > i am using the command center to query a database on db2, the schema i
> > created is not the same as my userid.  first i  connect to db, then
> > set current schema = 'ABC',

> Take the single quotation off, like set current schema = ABC. The db2
> doesn't display the warning message for the invalid schema name.

> >then i try to use select statemen without
> > specify schema in front of the table name to query the table, but the
> > error pops up stating that it try to find the table under my userid as
> > schema but couldn't, why i set the current schema but still can't be
> > recognized?



Mon, 25 Jul 2005 00:06:19 GMT
 set current schema
xixi wrote on Wednesday 05 February 2003 17:06:

Quote:
> actually when i set current schema = 'ABC' or ABC, i got DB20000I  The
> SQL command completed successfully.

> but once i use select * from table, it still assume the schema is
> under my userid instead of ABC, how to solve that?

$ db2 values current schema

1
------------------------------------------
STOLZE

  1 record(s) selected.

$ db2 set current schema = abc
DB20000I  The SQL command completed successfully.
$ db2 "select * from test"
SQL0204N  "ABC.TEST" is an undefined name.  SQLSTATE=42704

In my case, db2 does indeed search for the table "TEST" in the schema named
"ABC".  If you see something different, then you might want post the complete
sequence of statements that you try to execute, including your output so that
we can follow you step by step what you are doing.

--
Knut Stolze
Information Integration
IBM Germany / University of Jena



Mon, 25 Jul 2005 00:36:45 GMT
 set current schema
Xixi is working from command center.
Maybe going to the script page will help. It's possible that command
center disconnects after each command (??)

Cheers
Serge

--
Serge Rielau
DB2 UDB SQL Compiler Development
IBM Software Lab, Toronto

Visit DB2 Developer Domain at
http://www7b.software.ibm.com/dmdd/



Mon, 25 Jul 2005 03:56:59 GMT
 set current schema
The only thing i can see is someone bound utilities with dynamicrules(bind).
Not sure it's the case though.

PM



Mon, 25 Jul 2005 14:31:22 GMT
 set current schema
here is what i do:

------------------------------ Command Entered ------------------------------
connect to inq3lib user ddai using ********;
-----------------------------------------------------------------------------
connect to inq3lib user ddai using      

   Database Connection Information

 Database server        = DB2/NT 8.1.0

 SQL authorization ID   = DDAI

 Local database alias   = INQ3LIB

SQL1478W  The defined buffer pools could not be started. Instead, one small

buffer pool for each page size supported by DB2 has been started.  

SQLSTATE=01626

------------------------------ Command Entered ------------------------------
set current schema = inq3lib;
-----------------------------------------------------------------------------
set current schema = inq3lib

DB20000I  The SQL command completed successfully.

select * from aadmne

error

DBA2191E SQL execution error.

com.ibm.db.DataException: A
database manager error occurred. : [IBM][CLI Driver][DB2/NT]
SQL0204N  "DDAI.AADMNE" is an undefined name.  SQLSTATE=42704



Tue, 26 Jul 2005 00:11:34 GMT
 set current schema
xixi wrote on Thursday 06 February 2003 17:11:

Quote:
> here is what i do:

> connect to inq3lib user ddai using

>    Database Connection Information

>  Database server        = DB2/NT 8.1.0
>  SQL authorization ID   = DDAI
>  Local database alias   = INQ3LIB

> set current schema = inq3lib
> DB20000I  The SQL command completed successfully.

> select * from aadmne
> DBA2191E SQL execution error.
> com.ibm.db.DataException: A
> database manager error occurred. : [IBM][CLI Driver][DB2/NT]
> SQL0204N  "DDAI.AADMNE" is an undefined name.  SQLSTATE=42704

I can recreate this now.  I guess Serge is right in that Control Center drops
the connection to DB2 or something like that.  I suggest you contact IBM
support to get this sorted out.

--
Knut Stolze
Information Integration
IBM Germany / University of Jena



Tue, 26 Jul 2005 00:33:55 GMT
 
 [ 8 post ] 

 Relevant Pages 

1. Set current-schema and granting

2. "set current schema" and commit

3. What's the CURRENT schema ?

4. What's the CURRENT schema ?

5. Table and schema current size.

6. CURRENT SCHEMA - used in interactive SELECT statement?

7. CURRENT SCHEMA and priviledges question.....(more riddles for SERGE as per request...:)))))

8. set a date dimension to current date

9. DMO set current database

10. Set default to current time only

11. Automatice set up as current quarter minus two.

12. Setting the current timestamp value for a db


 
Powered by phpBB® Forum Software