By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,611 Members | 2,296 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,611 IT Pros & Developers. It's quick & easy.

How to move a database into "global" area?

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a
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.