469,328 Members | 1,327 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,328 developers. It's quick & easy.

How to move a database into "global" area?

DB2ers,

I am a newbie to DB2 world. I just built a test DB2 server and
installed the "SAMPLE" database. It turns out the database was created
under my ownership. As a result, if some other user tries to fetch
data, as in the following query, it doesn't work:

select * from employee

However, the following query work:
select * from pradeep.employee

Is there a way to set the database such that
"select * from employee" would work for any user?

Thank you in advance for your help.

Pradeep

Nov 12 '05 #1
2 1088
Ian
Pradeep wrote:
DB2ers,

I am a newbie to DB2 world. I just built a test DB2 server and
installed the "SAMPLE" database. It turns out the database was created
under my ownership. As a result, if some other user tries to fetch
data, as in the following query, it doesn't work:

select * from employee

However, the following query work:
select * from pradeep.employee

Is there a way to set the database such that
"select * from employee" would work for any user?


There is no such thing as a public alias like Oracle. You can
create aliases for each user, but this quickly becomes unmanageable.

A better solution is for your users to issue 'set current schema
pradeep' upon connection.

I believe you can also hard code this in the db2cli.ini file on the
client workstations.

Nov 12 '05 #2
Pradeep wrote:
DB2ers,

I am a newbie to DB2 world. I just built a test DB2 server and
installed the "SAMPLE" database. It turns out the database was created
under my ownership. As a result, if some other user tries to fetch
data, as in the following query, it doesn't work:

select * from employee

However, the following query work:
select * from pradeep.employee

Is there a way to set the database such that
"select * from employee" would work for any user?


The basic thing to understand is that your table's name _is_
"pradeep.employee". The schema name "pradeep" qualifies the table to
uniquely identify it.

--
Knut Stolze
DB2 Information Integration Development
IBM Germany
Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

11 posts views Thread by mrbog | last post: by
1 post views Thread by Chris Stromberger | last post: by
9 posts views Thread by Javaman59 | last post: by
2 posts views Thread by Steve | last post: by
8 posts views Thread by Hans Greif | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by Purva khokhar | last post: by
reply views Thread by haryvincent176 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.