473,395 Members | 1,456 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

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 1216
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: mrbog | last post by:
I have an array/hash that stores path information for my app. As in, what directory this is in, what directory that's in, what the name of the site is, what the products are called, etc. It's...
1
by: Chris Stromberger | last post by:
This doesn't seem like it should behave as it does without using "global d" in mod(). d = {} def mod(): d = 3 mod() print d
7
by: Lyn | last post by:
Hi and Season's Greetings to all. I have a question regarding the use of a qualifier word "Global". I cannot find any reference to this in Access help, nor in books or on the Internet. "Global"...
5
by: j | last post by:
Anyone here feel that "global variables" is misleading for variables whose scope is file scope? "global" seems to imply global visibility, while this isn't true for variables whose scope is file...
9
by: Javaman59 | last post by:
I saw in a recent post the :: operator used to reach the global namespace, as in global::MyNamespace I hadn't seen this before, so looked it up in MSDN, which explained it nicely. My question...
2
by: Steve | last post by:
I am new to this newsgroup & to .NET in general. I have been playing around with Visual Studio .NET, building and rendering web pages using VB "code behind" files. My problem / question is; How...
8
by: Hans Greif | last post by:
Hallo, hello, i try to implement a global dataset - singleton based. On www.bakterienforum.de i found a singleton implementation: sealed class SingletonCounter { public int Counter = 0;
11
by: eBob.com | last post by:
I have this nasty problem with Shared methods and what I think of as "global storage" - i.e. storage declared outside of any subroutines or functions. In the simple example below this "global"...
4
ChrisWang
by: ChrisWang | last post by:
Hi, I am having trouble understanding the use of 'global' variables I want to use a global variable with the same name as a parameter of a function. But I don't know how to use them at the same...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.