f



Prevent database user to access another database

Hi,

I have installed DB2 version 8.1 and created two databases, TEST1 and
TEST2. Two operating system users test1 and test2  are mapped to two
database users in TEST1 and TEST2 databases respectively.

Even though test2 user does not exists in TEST1 database, I am able to
connect to TEST1 database using test2 user. Also able to perform basic
operations like CREATE /DROP table. After creating tables, it creates
test2 SCHEMA and DB USER  automatically in TEST1 database.

How do I prevent this behavior? How do I prevent test2 user connecting
to TEST1 database?

Thanks

Sameer

0
S
7/31/2007 11:56:07 AM
comp.databases.ibm-db2 12448 articles. 3 followers. arunrocks (9) is leader. Post Follow

4 Replies
945 Views

Similar Articles

[PageSpeed] 11

On Jul 31, 6:56 am, S.M.Deshpa...@googlemail.com wrote:
> Hi,
>
> I have installed DB2 version 8.1 and created two databases, TEST1 and
> TEST2. Two operating system users test1 and test2  are mapped to two
> database users in TEST1 and TEST2 databases respectively.
>
> Even though test2 user does not exists in TEST1 database, I am able to
> connect to TEST1 database using test2 user. Also able to perform basic
> operations like CREATE /DROP table. After creating tables, it creates
> test2 SCHEMA and DB USER  automatically in TEST1 database.
>
> How do I prevent this behavior? How do I prevent test2 user connecting
> to TEST1 database?
>
> Thanks
>
> Sameer

By default connect privilege is granted to public....revoke it.

Also, do some initial reading before posting.

0
janman
7/31/2007 2:59:25 PM
On Jul 31, 10:59 am, janman <mjana...@hotmail.com> wrote:
> On Jul 31, 6:56 am, S.M.Deshpa...@googlemail.com wrote:
>
>
>
> > Hi,
>
> > I have installed DB2 version 8.1 and created two databases, TEST1 and
> > TEST2. Two operating system users test1 and test2  are mapped to two
> > database users in TEST1 and TEST2 databases respectively.
>
> > Even though test2 user does not exists in TEST1 database, I am able to
> > connect to TEST1 database using test2 user. Also able to perform basic
> > operations like CREATE /DROP table. After creating tables, it creates
> > test2 SCHEMA and DB USER  automatically in TEST1 database.
>
> > How do I prevent this behavior? How do I prevent test2 user connecting
> > to TEST1 database?
>
> > Thanks
>
> > Sameer
>
> By default connect privilege is granted to public....revoke it.
>
> Also, do some initial reading before posting.
___________

<<Also, do some initial reading before posting.>>

If he knew where to look, he wouldn't have posted!  Defaults are hard
for the novice to find, as there is no single place where one can go
to see all defaults for all the myriad choices.  Similarly environment
variables are confusing, even their existence is cryptic, let alone
their defaults, if any.

You were once in that position -- be charitable and be happy to help
your colleague.

0
2803stan
8/2/2007 10:21:42 PM
On Aug 3, 12:21 am, 2803s...@gmail.com wrote:
> On Jul 31, 10:59 am, janman <mjana...@hotmail.com> wrote:
>
> > On Jul 31, 6:56 am, S.M.Deshpa...@googlemail.com wrote:
>
> > > Hi,
>
> > > I have installed DB2 version 8.1 and created two databases, TEST1 and
> > > TEST2. Two operating system users test1 and test2  are mapped to two
> > > database users in TEST1 and TEST2 databases respectively.
>
> > > Even though test2 user does not exists in TEST1 database, I am able to
> > > connect to TEST1 database using test2 user. Also able to perform basic
> > > operations like CREATE /DROP table. After creating tables, it creates
> > > test2 SCHEMA and DB USER  automatically in TEST1 database.
>
> > > How do I prevent this behavior? How do I prevent test2 user connecting
> > > to TEST1 database?
>
> > > Thanks
>
> > > Sameer
>
> > By default connect privilege is granted to public....revoke it.
>
> > Also, do some initial reading before posting.
>
> ___________
>
> <<Also, do some initial reading before posting.>>
>
> If he knew where to look, he wouldn't have posted!  Defaults are hard
> for the novice to find, as there is no single place where one can go
> to see all defaults for all the myriad choices.  Similarly environment
> variables are confusing, even their existence is cryptic, let alone
> their defaults, if any.
>
> You were once in that position -- be charitable and be happy to help
> your colleague.

Thanks for the reply though it wasn't interesting enough. So just read
and ignored it.

Other than DB2, I haven't seen any RDBMS which gives CONNECT privilege
to public that to by default. I think CONNECT its a powerful privilege
and I don't see any reason to be granted as default to public.

Usual practice is to create user and grant necessary privileges in
other RDBMS. I wouldn't have figured it out, if one of our developer
wouldn't have connected to wrong DB2 database. First of all I was
surprised that he got successful connection. While using Oracle,
SQLServer, PostgreSQL, MySQL, this behavior of DB2 is certainly
surprising to me.

Is there any reason why DB2 grant CONNECT privilege by default. Are
there any other potential privileges also that one needs to revoke?

0
S
8/3/2007 3:06:04 PM
S.M.Deshpande@googlemail.com wrote:
> On Aug 3, 12:21 am, 2803s...@gmail.com wrote:
>> On Jul 31, 10:59 am, janman <mjana...@hotmail.com> wrote:
>>
>>> On Jul 31, 6:56 am, S.M.Deshpa...@googlemail.com wrote:
>>>> Hi,
>>>> I have installed DB2 version 8.1 and created two databases, TEST1 and
>>>> TEST2. Two operating system users test1 and test2  are mapped to two
>>>> database users in TEST1 and TEST2 databases respectively.
>>>> Even though test2 user does not exists in TEST1 database, I am able to
>>>> connect to TEST1 database using test2 user. Also able to perform basic
>>>> operations like CREATE /DROP table. After creating tables, it creates
>>>> test2 SCHEMA and DB USER  automatically in TEST1 database.
>>>> How do I prevent this behavior? How do I prevent test2 user connecting
>>>> to TEST1 database?
>>>> Thanks
>>>> Sameer
>>> By default connect privilege is granted to public....revoke it.
>>> Also, do some initial reading before posting.
>> ___________
>>

> Other than DB2, I haven't seen any RDBMS which gives CONNECT privilege
> to public that to by default. I think CONNECT its a powerful privilege
> and I don't see any reason to be granted as default to public.

That is a good point, and that is why IBM added the 'RESTRICTIVE' option
to the CREATE DATABASE command in DB2 9.

The documentation for CREATE DATABASE describes what privileges using
the RESTRICTIVE option does not grant, so you can use this as a guide
to revoke as necessary.




0
Ian
8/4/2007 2:43:03 PM
Reply:

Similar Artilces:

DataBase DataBase DataBase DataBase
DataBase DataBase DataBase DataBase Porfessional Programmable Database Ver. 2.0 2.1 Million Record Capacity. Search Rate: 2000/Records/Second. DataBase Type: Random Access. Can Create Unlimited Databases. Programmable fields for any Application. Build Time One Second, (Auto Creates DB). Setup Time: Instantly, Just Enter DB Name. Ultra Easy to Learn (Typically 30 Seconds) Ultra Cheap Price, Special $20, Paypal Accepted. Application Mailed Instantly (file Attached Email). Easy Paypal Online Ordering. See Site Below. http://www.vehiclerepair.org/dbPro/dbpro.html Scott: #DataBase...

DataBase DataBase DataBase DataBase
DataBase DataBase DataBase DataBase Porfessional Programmable Database Ver. 2.0 2.1 Million Record Capacity. Search Rate: 2000/Records/Second. DataBase Type: Random Access. Can Create Unlimited Databases. Programmable fields for any Application. Build Time One Second, (Auto Creates DB). Setup Time: Instantly, Just Enter DB Name. Ultra Easy to Learn (Typically 30 Seconds) Ultra Cheap Price, Special $20, Paypal Accepted. Application Mailed Instantly (file Attached Email). Easy Paypal Online Ordering. See Site Below. http://www.vehiclerepair.org/dbPro/dbpro.html ...

Database Database Database Database Software Cheap
Database Database Database Database Software Cheap Great Datase Software See Website Below. Ultra Easy to Learn (Typically 30 Seconds) Professional Programmable Database Ver. 2.3 2.1 Million Record Capacity, (New cond). Search Rate: 2000 / Records / Second. DataBase Type: Random Access. Can Create Unlimited Databases. Programmable fields for any Application. Has Six Seperate Field Sets All Programmable. Build Time One Second, (Auto Creates DB). Setup Time: Instantly, Just Enter DB Name. Ultra Cheap Price, Special $20, Paypal Accepted. Application Mailed Instantly (file Attached Em...

Database Database Database Database Software Cheap
Database Database Database Database Software Cheap Great Datase Software See Website Below. Ultra Easy to Learn (Typically 30 Seconds) Professional Programmable Database Ver. 2.3 2.1 Million Record Capacity, (New cond). Search Rate: 2000 / Records / Second. DataBase Type: Random Access. Can Create Unlimited Databases. Programmable fields for any Application. Has Six Seperate Field Sets All Programmable. Build Time One Second, (Auto Creates DB). Setup Time: Instantly, Just Enter DB Name. Ultra Cheap Price, Special $20, Paypal Accepted. Application Mailed Instantly (file Attached Email). http://www.vehiclerepair.org/dbPro/dbpro.html ...

Database Database Database Database Software Cheap
Database Database Database Database Software Cheap Great Datase Software See Website Below. Ultra Easy to Learn (Typically 30 Seconds) Professional Programmable Database Ver. 2.3 2.1 Million Record Capacity, (New cond). Search Rate: 2000 / Records / Second. DataBase Type: Random Access. Can Create Unlimited Databases. Programmable fields for any Application. Has Six Seperate Field Sets All Programmable. Build Time One Second, (Auto Creates DB). Setup Time: Instantly, Just Enter DB Name. Ultra Cheap Price, Special $20, Paypal Accepted. Application Mailed Instantly (file Attached Em...

Database Database Database Database Software Cheap
Database Database Database Database Software Cheap Great Datase Software See Website Below. Ultra Easy to Learn (Typically 30 Seconds) Professional Programmable Database Ver. 2.3 2.1 Million Record Capacity, (New cond). Search Rate: 2000 / Records / Second. DataBase Type: Random Access. Can Create Unlimited Databases. Programmable fields for any Application. Has Six Seperate Field Sets All Programmable. Build Time One Second, (Auto Creates DB). Setup Time: Instantly, Just Enter DB Name. Ultra Cheap Price, Special $20, Paypal Accepted. Application Mailed Instantly (file Attached Email). http://www.vehiclerepair.org/dbPro/dbpro.html ...

Database Database Database Database Software Cheap
Database Database Database Database Great Datase Software See Website Below. Ultra Easy to Learn (Typically 30 Seconds) Professional Programmable Database Ver. 2.3 2.1 Million Record Capacity, (New cond). Search Rate: 2000 / Records / Second. DataBase Type: Random Access. Can Create Unlimited Databases. Programmable fields for any Application. Has Six Seperate Field Sets All Programmable. Build Time One Second, (Auto Creates DB). Setup Time: Instantly, Just Enter DB Name. Ultra Cheap Price, Special $20, Paypal Accepted. Application Mailed Instantly (file Attached Email). http://w...

Database Database Database Database Software Cheap
Database Database Database Database Software Cheap Great Datase Software See Website Below. Ultra Easy to Learn (Typically 30 Seconds) Professional Programmable Database Ver. 2.3 2.1 Million Record Capacity, (New cond). Search Rate: 2000 / Records / Second. DataBase Type: Random Access. Can Create Unlimited Databases. Programmable fields for any Application. Has Six Seperate Field Sets All Programmable. Build Time One Second, (Auto Creates DB). Setup Time: Instantly, Just Enter DB Name. Ultra Cheap Price, Special $20, Paypal Accepted. Application Mailed Instantly (file Attached Em...

a database, is a database, is a err database
How many times can we see the same request from someone who wants to access data from a 'pick' database through what has come to be 'standard' practices (odbc, oledb) and still get the same old sloppy ' buy this proprietary utility (and above all, my services)' answer. I think most of these pick flavors should have some sort of layer (by now!) to handle this; If someone needs to do this, the service is really 'education' i.e to show them how. Lets cut the shit now and stop with this tired and silly BS and sad marketing schlock. Regards, -Jim Jim wrote: > How many times can we see the same request from someone who wants to > access data from a 'pick' database through what has come to be > 'standard' practices (odbc, oledb) > and still get the same old sloppy ' buy this proprietary utility (and > above all, my services)' answer. I think most of these pick flavors > should have some sort of layer (by now!) to handle this; If someone > needs to do this, the service is really 'education' i.e to show them > how. Lets cut the shit now and stop with this tired and silly BS and > sad marketing schlock. > > Regards, > > -Jim Jim who? I wonder? What is this? An attack on capitalism? Providing services for those who perhaps lack the time, skill, or knowledge to perform such tasks is hardly a crime. Maybe "standard" odbc and...

Database Database Database Database Software Cheap #2
Database Database Database Database Software Cheap Great Datase Software See Website Below. Ultra Easy to Learn (Typically 30 Seconds) Professional Programmable Database Ver. 2.3 2.1 Million Record Capacity, (New cond). Search Rate: 2000 / Records / Second. DataBase Type: Random Access. Can Create Unlimited Databases. Programmable fields for any Application. Has Six Seperate Field Sets All Programmable. Build Time One Second, (Auto Creates DB). Setup Time: Instantly, Just Enter DB Name. Ultra Cheap Price, Special $20, Paypal Accepted. Application Mailed Instantly (file Attached Em...

Database Database Database Software Cheap
Database Database Database Database Software Cheap Great Datase Software See Website Below. Ultra Easy to Learn (Typically 30 Seconds) Professional Programmable Database Ver. 2.3 2.1 Million Record Capacity, (New cond). Search Rate: 2000 / Records / Second. DataBase Type: Random Access. Can Create Unlimited Databases. Programmable fields for any Application. Has Six Seperate Field Sets All Programmable. Build Time One Second, (Auto Creates DB). Setup Time: Instantly, Just Enter DB Name. Ultra Cheap Price, Special $20, Paypal Accepted. Application Mailed Instantly (file Attached Em...

How to copy a sun-database in one informix database to another informix database?
Hi, Sorry I am not an informix dba, and I was faced to copy a sub-database(sorry I don't know the clear name of such concept, as informix is like sql-server, which used multiple database) from one informix database system to another informix database. I know in oracle, we can use transportable tablespace, copy the datafile and transport the metadata, and do something else. How can I do it in informix then? Is there document which talk about the detail step? Thanks It would really help if you knew the versions of the Informix databases. Assuming Informix IDS 7.x or IDS 9.x If the two systems are binary compatible the fastest method is to use onunload/onload. If the systems are not binary compatible the easiest way is to use dbexport/dbimport. Everything is well documented in the manual "IBM Informix Migration Guide". This manual covers all Informix databases from Standard Engine and Online to IDS and XPS. See http://www.ibm.com/informix/pubs zhu chao wrote: > Hi, > Sorry I am not an informix dba, and I was faced to copy a > sub-database(sorry I don't know the clear name of such concept, as > informix is like sql-server, which used multiple database) from one > informix database system to another informix database. > I know in oracle, we can use transportable tablespace, copy the > datafile and transport the metadata, and do something else. How can I > do it in informix then? Is there...

starting another Access-Database with database-password by Code
Hello! Since days I'm looking for a solution for the following problem for Access 2000: Can I starting by Code a database B.mdb (protected only with a simple database-passwort) from a database A.mdb by Code. The database-password must be a part in this Code. - Database: c:\ablage\test.mdb - Datapase password: 1234 Thank You very much! Greetings from Switzerland Thomas Ruf wrote: > Hello! > > Since days I'm looking for a solution for the following problem > for Access 2000: > > Can I starting by Code a database B.mdb (protected only with a > simple dat...

Convert SAP Oracle Database to IBM DB2 Database??
Hello, I would like to hear from anyone here who has converted their SAP Oracle database to IBM DB2 database? Did you realize greater disk saving via DB2 compression? Did you run the latest version of DB2 rather than allow SAP to keep your Oracle version back-leveled? Please, DB2 Bashers need not apply, looking for the business case anyone used to convert to DB2. Thank you. Charles On 6 Feb, 01:52, "Charles Davis" <cdavis10...@comcast.net> wrote: > Hello, > > I would like to hear from anyone here who has converted their SAP Oracle > database to IBM DB2 d...

open database from another database
I'm struggling with this, and I'm sure there's a way to do it. I would like to automate the back-up of an Access application to a writeable CD drive. I've got the process of creating a folder on the CD with the back-up date done, and I can copy the database objects (there are four MDB files in total) to the CD. All of that works. Here's my problem: because Access databases cannot be copied when they are open, I need to have my CD writing code in a new MDB, and will need to launch the new CD writing MDB from within one of the existing databases. I've done this kind of thing before, but I don't have the slightest recollection on how I did it (used to be you had to do that kind of thing in order to compact/repair through automation). So, I give up. How do you launch Access from within Access??? Well this will do it: Dim i As Variant i = Shell("msaccess d:\persprop\CSCPP.mdb") Just put in your own db path. But this does come up with the warning that requires you to click to get into to the db (in 2003). If you know how to get by that I'd like to know. You could put the function in a macro and then close the db stat started the new one. Good luck Ira Solomon On Tue, 25 Apr 2006 20:17:10 -0500, Mike Easter <username@domain.com> wrote: >I'm struggling with this, and I'm sure there's a way to do it. I would like >to automate the back-up of an Access application to a wri...

Open Access Database Form from within Access database
I have included the following code to open an Access database form from within an exsisting Access database. But when I run the code, it appears that it opens the database because in windows explorer I can see the database has the .ldb file extension. So it appears that it's open, but I can't see the database or the form that I've tried to open. What am I doing wrong. The following is the code: 'This is in the declaration part of the module Dim appAccess As Access.Application ' Initialize string to database path. Const strConPathToSamples = "C:\Documents a...

Open a database from a database
I want to be able to open and run an Access database from within an already running one. The OpenDatabase command simply opens it but does not run the startup routine. Interestingly opening from Windows Explorer has a different meaning in that it opens and runs! What command enables me to open another database and get it to run its AutoExec macro, from code? Jim I don't know the answer, but I do know that when you use OpenDatabase the code in a startup form of that database does work. Martin "Jim Devenish" schreef in bericht news:0b4510ac-d415-4c2c-b200-7546aae178a4@gu8...

Opening Another Database from WITHIN a Database
I have a database (2000.mdb) which links to my data tables (Data2000.mdb). The database has a Main Menu screen (not a switchboard - a custom one). I need to import records from 5 text files into the 5 different Tables in Data2000.mdb. Here was my plan: Create various Import specs in Data2000.mdb Create a Macro (in Data2000.mdb) which calls each of the specs sequentially. Place a button on the Main Menu (2000.mdb), which closes the current database (optional), opens Data2000.mdb, runs the Macro (Import Reg), then returns the user to the original Menu in the original database (200...

Database toolbox and connection to access database
Hi I have installed 64bit matlab and have problems to setup the connection to a acccess 2007 database. First I did setup my databasebase by using the 32-bit version of ODBC: c:\windows\sysWOW64\odbcad32.exe. Then I did try to connect to my database: conn = database('Test', '', '') %Test is name of database I got: >> conn = database('Test', '', '') conn = Instance: 'Test' UserName: '' Driver: [] URL: [] Constructor: [1x1 com.mathworks.toolbox.database.datab...

Check if a database is available from another database
Hello, i'm new, so i want to ask you if you know how can i check if a database is available before i connect to it. I am using Oracle 7.3.4 on a UNIX machine, and i am using Oracle Forms 4.5. The situation goes as follows: I'm using Oracle Forms and i want at some point to chande my database connection to do some job. What i want is to check if the database is available before i connect to it. If it is available i continue, else a message will tell me that the database is not available. Can this be done using PL/SQL? If you have anything please tell me. Thanks. Marios Varna...

Establishing connection from Oracle Database to DB2 database
Hi, Can any one help me in connecting oracle database to DB2 database oracle is on unix and DB2 is on AS400. Please guide me step by step on the same. Waiting for reply. Its critical umeshchoudhary@gmail.com (U C) wrote in news:d06590c8.0504252348.71a5c6f8@posting.google.com: > Hi, > Can any one help me in connecting oracle database to DB2 database > oracle is on unix and DB2 is on AS400. Please guide me step by step on > the same. > > Waiting for reply. Its critical > use PERL between the two DBs. >Hi, > Can any one help me in connecting oracle database...

how to move user database from systems database folder
Some how user database is now in the systems database folder. I need to move it back to the user databases folder.Any ideas how? On Fri, 28 Aug 2009 11:53:49 -0700 (PDT), hayko98 wrote: >Some how user database is now in the systems database folder. I need >to move it back to the user databases folder.Any ideas how? http://msdn.microsoft.com/en-us/library/ms345483.aspx -- Hugo Kornelis, SQL Server MVP My SQL Server blog: http://sqlblog.com/blogs/hugo_kornelis On Aug 28, 3:13=A0pm, Hugo Kornelis <h...@perFact.REMOVETHIS.info.INVALID> wrote: > On Fri, 28 Aug 2009 11:53:49 -...

Relationship between users, database applications, DBMS, and database
Hi, I need to explain in one paragraph relationship between users, database applications, DBMS, and database. It is not so easy to summarize all important things in one paragraph. Can somebody help me? Thank you in advance I'm sure some more technically minded participant of this group will provide a more in depth description. Here it is in layman's terms. A database is information that resides in a disk. The database management system (DBMS) is a set of programs, middleware if you will, which allow read and write access to the database. A database application is a set of programs that utilize the DBMS in order to store, retrieve, manipulate, and report the data in the database. Enhanced DBMS's, such as D3, offer much more than just read/write capabilities. They provide a full featured operating environment for the applications to run in. A programmer is an application developer who creates the applications for the benefit of the end users. And the end user is one who sits in front a keyboard and exercises the application. And I am the guy who just did your homework for you. -- Jeffrey Kaufman Key Data Systems Group www.keydata.us 559-432-3832 559-432-4657 fax Western Pacific Supply www.westpacsupply.com 888-WestPac "emeded" <erni@yeayea.com> wrote in message news:ea4c128b.0311151549.7b1a28ed@posting.google.com... > Hi, > I need to explain in one paragraph relationship between users, > databas...

Appending data to a master database from another database
How can I, without using Replication technology, append a table in my master database from data in another database? I have several field offices with sales data that I want, on demand, to append up to my home office Master database... any ideas? Thanks!!!! Dav On 17 Nov 2006 08:02:28 -0800, "Parasyke" <kress1963nov22@yahoo.com> wrote: Attach tables from the Child database to the Master, and run Append queries. Or forego the table attachments and use the IN clause to specify the Child database. Off the top of my head: insert into MyTable select * from MyTable IN 'c...

Web resources about - Prevent database user to access another database - comp.databases.ibm-db2

Database - Wikipedia, the free encyclopedia
A database is an organized collection of data . The data are typically organized to model aspects of reality in a way that supports processes ...

Database - Wikipedia, the free encyclopedia
... requiring information. For example, modelling the availability of rooms in hotels in a way that supports finding a hotel with vacancies. Database ...

Oracle: Fear Not, ’12c’ Database Nearing Its Breakout, Says Credit Suisse
... from cloud computing applications in 2016, along with the adoption by customers of the its “ 12c ” version of its flagship relational database ...

Enterprises want to run databases in containers
More than three out of four IT decision makers are interested in running stateful applications like databases within containers, according to ...

NFL mock draft database 2016: Tracking Giants picks from around the Internet
Let's keep track of mock drafts from around the Internet as the 2016 NFL Draft approaches. Can we find a consensus for the New York Giants?

NTTC's Liquid Products Database making steady progress
NTTC's Liquid Products Database making steady progress Modern Bulk Transporter NTTC is asking carriers to suggest “proprietary blends” for ...

Herbalife sinks on database error report
Herbalife said it had overstated growth in the number of "active new members" in some instances in the past three quarters due to database errors. ...

Consumer Group Sues DOT For Failure To Create Searchable Database Of Safety Defects
... about safety defects. One safety group says this hasn’t happened, and is suing DOT Secretary Anthony Foxx in an effort to make this database ...

TSA Will Finally Be Given Access To Counterterrorism Database To Screen Airport Workers
TSA Will Finally Be Given Access To Counterterrorism Database To Screen Airport Workers

Architizer raises $7 million to launch a new products database
US media company Architizer has received $7 million in venture capital to help launch an online products database for architects and designers ...

Resources last updated: 3/7/2016 2:26:34 AM