473,785 Members | 3,137 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Granting privileges on table owned by different owner

Hi All
I am in a situation where I have to grant select privileges on tables
owned by a different owner to a specific role. I am logged in as
system/sysdba. I have created a new role FIN_READ_ONLY. I need to
grant SELECT privileges on all the existing and future tables owned by
FIN. I tried to grant SELECT on FIN.ACCT_REF to FIN_READ_ONLY. But was
not successful due to insufficient privileges since SYSTEM does not
own the table or dont have grantable on the tables. What will be the
best way to grant select on all the existing and future tables not
owned by me/system? Do I have to login as the tables owner? Or does
all the future tables created by FIN will have to granted individuall?
I dont know the password for FIN user. I dont want to change the
password because of some application problem.
Your help / suggestion will be highly appreciated.
TIA

Wade Chy
Jul 19 '05 #1
4 19864
Wade Chy wrote:
Hi All
I am in a situation where I have to grant select privileges on tables
owned by a different owner to a specific role. I am logged in as
system/sysdba. I have created a new role FIN_READ_ONLY. I need to
grant SELECT privileges on all the existing and future tables owned by
FIN. I tried to grant SELECT on FIN.ACCT_REF to FIN_READ_ONLY. But was
not successful due to insufficient privileges since SYSTEM does not
own the table or dont have grantable on the tables. What will be the
best way to grant select on all the existing and future tables not
owned by me/system? Do I have to login as the tables owner? Or does
all the future tables created by FIN will have to granted individuall?
I dont know the password for FIN user. I dont want to change the
password because of some application problem.
Your help / suggestion will be highly appreciated.
TIA

Wade Chy


There are subtle differences based on database version and significant
possibilities and implications to the command - to the extent I recommend
you spend some time in the documentation.

All the doc is available at http://docs.oracle.com. For Oracle9i R2, the
shortcut is
http://www.oracle.com/pls/db92/db92.homepage
SQL, PL/SQL, and SQL*Plus syntax and examples
G
GR
Grant: Definition or List of Books
Reference (and look up Grant in the Table of Contents)


One way to do what you want is to use a 'chain of responsibility' method ...

preferrably as owner (but a DBA like SYSTEM will do)
GRANT {privilege list} TO {app admin} WITH GRANT OPTION;

then as the {app admin} user
GRANT {privilege sublist} TO {user and role list};

I don't know what's happening in your environment - I just successfully
tested the following:

connect system/{password}
create user test identified by test;
grant connect, resource to test;
connect test/test
create table a ( b number );
connect system/{password}
grant select on test.a to oe with grant option;
connect oe/oe
grant select on test.a to hr;
connect hr/hr
select count(*) from test.a;
Hans
Jul 19 '05 #2
I am using oracle 8.1.7.4
I am logged on as system. I cant grant SELECT on FIN.ACCT_REF to
FIN_READ_ONLY because I am not the owner of ACCT_REF. The FIN schema
is already existing and it's for an accounting application. I dont
know the password for FIN. Thats what the problem is. Otherwise I
could login as FIN and grant the privs to the role. I dont want to
change the password for FIN because the application may not work.
I am in a tricky situation. TIA for your help.

Hans Forbrich <fo******@yahoo .net> wrote in message news:<oT62d.328 13$KU5.7479@edt nps89>...
Wade Chy wrote:
Hi All
I am in a situation where I have to grant select privileges on tables
owned by a different owner to a specific role. I am logged in as
system/sysdba. I have created a new role FIN_READ_ONLY. I need to
grant SELECT privileges on all the existing and future tables owned by
FIN. I tried to grant SELECT on FIN.ACCT_REF to FIN_READ_ONLY. But was
not successful due to insufficient privileges since SYSTEM does not
own the table or dont have grantable on the tables. What will be the
best way to grant select on all the existing and future tables not
owned by me/system? Do I have to login as the tables owner? Or does
all the future tables created by FIN will have to granted individuall?
I dont know the password for FIN user. I dont want to change the
password because of some application problem.
Your help / suggestion will be highly appreciated.
TIA

Wade Chy


There are subtle differences based on database version and significant
possibilities and implications to the command - to the extent I recommend
you spend some time in the documentation.

All the doc is available at http://docs.oracle.com. For Oracle9i R2, the
shortcut is
http://www.oracle.com/pls/db92/db92.homepage
>> SQL, PL/SQL, and SQL*Plus syntax and examples
>> G
>> GR
>> Grant: Definition or >> List of Books
>> Reference (and look up Grant in the Table of Contents)


One way to do what you want is to use a 'chain of responsibility' method ...

preferrably as owner (but a DBA like SYSTEM will do)
GRANT {privilege list} TO {app admin} WITH GRANT OPTION;

then as the {app admin} user
GRANT {privilege sublist} TO {user and role list};

I don't know what's happening in your environment - I just successfully
tested the following:

connect system/{password}
create user test identified by test;
grant connect, resource to test;
connect test/test
create table a ( b number );
connect system/{password}
grant select on test.a to oe with grant option;
connect oe/oe
grant select on test.a to hr;
connect hr/hr
select count(*) from test.a;
Hans

Jul 19 '05 #3
Wade Chy wrote:
I am using oracle 8.1.7.4
I am logged on as system. I cant grant SELECT on FIN.ACCT_REF to
FIN_READ_ONLY because I am not the owner of ACCT_REF. The FIN schema
is already existing and it's for an accounting application. I dont
know the password for FIN. Thats what the problem is. Otherwise I
could login as FIN and grant the privs to the role. I dont want to
change the password for FIN because the application may not work.
I am in a tricky situation. TIA for your help.


Is this a 3rd party product?
Jul 19 '05 #4
Wade Chy wrote:
I am using oracle 8.1.7.4
I am logged on as system. I cant grant SELECT on FIN.ACCT_REF to
FIN_READ_ONLY because I am not the owner of ACCT_REF. The FIN schema
is already existing and it's for an accounting application. I dont
know the password for FIN. Thats what the problem is. Otherwise I
could login as FIN and grant the privs to the role. I dont want to
change the password for FIN because the application may not work.
I am in a tricky situation. TIA for your help.


You may wish to browse through Chapter 23 of the 8.1.7 Administrator's
Guide. There are a couple of ideas, but you'll need to dig into the
environment a lot deeper.

http://download-east.oracle.com/docs...6956/privs.htm

While this may not be (probably is not) the case: if you haven't been given
the password to FIN, we need to consider the possibility of internal
security breach. Therefore, the best thing I could suggest is to open an
iTAR - this kind of question is well within the purpose of iTAR.
Jul 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
34075
by: DC_DBA | last post by:
I want to 'grant sysdba to a user' for an application. (At least that is what I believe so far after having had this problem dumped on me 2 days ago.) The support we get from the application vendor is lame, to say the least. Our application users dont know anything. 1. The Oracle 9i server is installed on a Sun Solaris system. 2. I work with Sybase and hence don't know any Oracle. 3. I can start sqlplus but dont know where to go after...
2
8569
by: Ted | last post by:
How do I grant all privileges for a schema that has a large number of existing tables, procedures, functions, etc to a newly created role, without having to issue a grant statement for each object and each privilege? I want the role to have all of the rights of the schema owner. Is there any kind of blanket granting of all privileges to a role?
1
3274
by: erin | last post by:
When I run: select * from testtable I get this error message: Invalid object name 'testtable'. However, if I run: select * from testuser.testtable
3
81155
by: Manning | last post by:
Hi- apologies for asking a stupid newbie question, but I'm really stuck at the moment. I need to change table ownership. I've got an asp script which is looking for a table owned by the dbo role, however the table was created under a different ownership. I understand the problem, and almost understand the solution, but I can't seem to get all the way. THE PROBLEM (using ...) ...
2
2234
by: Federica T | last post by:
Another question about SQL Server tables and access grants. I've created an user 'user1' as Access account, ad also as db_owner of a selected database. Then, I've created a table as user1.table1. When I try to access the data of the table, with the account name of user1, I must specify the owner ('select * from user1.table1') even if I've logged as user1 (I need to access the data just with 'select * from table1'). What's the problem? ...
2
10131
by: LazyAnt | last post by:
Hello, I have DB2 v8.1 for Linux for a class environment; each user has his/her own database as dbadm and they are suppose to study queries from another database. They have the right permissions to this database so they can do the SELECTS but they cannot alter the tables. Now I want them to be able to study the query plans.
3
1973
by: CAD Fiend | last post by:
Hello, I have a land development project that has a many-to-many relationship. I have ONE question regarding table structures, and ONE question on how to make a Form with two Subforms, below. TABLE STRUCTURE QUESTION: There are two parts to this preface.
3
4678
by: Rahul B | last post by:
Hi, I want to grant only the connect, select, insert, update privileges on all the tables of a schema to a particular user/group Initially, i had revoked all the privileges from public. It seems that the privileges Select, Insert, Update can be given only on a table level and not on the schema level. I can iterate and get the script for the select privileges for all the tables and execute it.
4
490
by: Wade Chy | last post by:
Hi All I am in a situation where I have to grant select privileges on tables owned by a different owner to a specific role. I am logged in as system/sysdba. I have created a new role FIN_READ_ONLY. I need to grant SELECT privileges on all the existing and future tables owned by FIN. I tried to grant SELECT on FIN.ACCT_REF to FIN_READ_ONLY. But was not successful due to insufficient privileges since SYSTEM does not own the table or dont...
0
9643
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9480
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10315
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10147
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9947
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4045
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3645
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2877
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.