473,625 Members | 2,668 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

What privilege needs to be granted?

Hello,

Have a wonderful new year!

I have oracle 9.2 on XP.

There is a table T1 created by user U1 in U1's schema,
a synonym S1 created also by U1 to point to T1 in U1's schema,
U1 granted S1 to public for select.
Procedure P2 created by user U2 in U2's schema,
in P2, the S1 is referenced for select in a cursor.
Problem and question:
when P2 is compiled, got an error message saying that not sufficient
privilege. I tried a set of privileges which worked on oracle 8.1.6,
but not
on oracle 9.2 I memtioned above.
What is the privilege needed to be granted or something else needs to
be done other than just granting privileges?

Thanks in advance.

Ping
Jul 19 '05 #1
9 20972
Ping wrote:

Hello,

Have a wonderful new year!

I have oracle 9.2 on XP.

There is a table T1 created by user U1 in U1's schema,
a synonym S1 created also by U1 to point to T1 in U1's schema,
U1 granted S1 to public for select.

Procedure P2 created by user U2 in U2's schema,
in P2, the S1 is referenced for select in a cursor.

Problem and question:
when P2 is compiled, got an error message saying that not sufficient
privilege. I tried a set of privileges which worked on oracle 8.1.6,
but not
on oracle 9.2 I memtioned above.

What is the privilege needed to be granted or something else needs to
be done other than just granting privileges?

Thanks in advance.

Ping


What other tests have you performed? Can U2 select data from S1? How
about from U1.T1?

Please post the exact message, especially the error number.

First thought is that perhaps U2 does not have capability to compile.
However, insufficient info provided to verify.
/Pong
Jul 19 '05 #2
Hans Forbrich <fo******@yahoo .net> wrote in message news:<3F******* ********@yahoo. net>...
Ping wrote:

Hello,

Have a wonderful new year!

I have oracle 9.2 on XP.

There is a table T1 created by user U1 in U1's schema,
a synonym S1 created also by U1 to point to T1 in U1's schema,
U1 granted S1 to public for select.

Procedure P2 created by user U2 in U2's schema,
in P2, the S1 is referenced for select in a cursor.

Problem and question:
when P2 is compiled, got an error message saying that not sufficient
privilege. I tried a set of privileges which worked on oracle 8.1.6,
but not
on oracle 9.2 I memtioned above.

What is the privilege needed to be granted or something else needs to
be done other than just granting privileges?

Thanks in advance.

Ping


What other tests have you performed? Can U2 select data from S1? How
about from U1.T1?

Please post the exact message, especially the error number.

First thought is that perhaps U2 does not have capability to compile.
However, insufficient info provided to verify.
/Pong

Thanks Hans.

Sorry, some modification to the problem description: the T1 in fact is
a view and T1's base tables are all owned by sys. The T1 is
successfully compiled in U1's schema.

U2 has 'create procedure' privilege granted in addition to some other
privileges.

I also have U1 granted select specifically to U2, still got same error
message as below when compiled:

PL/SQL: Declaration ignored
PLS-00904: insufficient privilege to access object U1.T1

Any thoughts and help would be appreciated.

Ping
Jul 19 '05 #3
Ping wrote:

Sorry, some modification to the problem description: the T1 in fact is
a view and T1's base tables are all owned by sys. The T1 is
successfully compiled in U1's schema.

U2 has 'create procedure' privilege granted in addition to some other
privileges.

I also have U1 granted select specifically to U2, still got same error
message as below when compiled:

PL/SQL: Declaration ignored
PLS-00904: insufficient privilege to access object U1.T1

Any thoughts and help would be appreciated.


I'm still wondering whether U2 can do a plain and simple 'SELECT
COUNT(*) FROM U1.T1' and 'SELECT COUNT(*) FROM S1' in SQL*Plus.

I wouldn't even worry about the PL/SQL part of it until the basic access
for the SELECT is set up properly.

/Hans
Jul 19 '05 #4
Ping wrote:
Hello,

Have a wonderful new year!

I have oracle 9.2 on XP.

There is a table T1 created by user U1 in U1's schema,
a synonym S1 created also by U1 to point to T1 in U1's schema,
U1 granted S1 to public for select.
Procedure P2 created by user U2 in U2's schema,
in P2, the S1 is referenced for select in a cursor.
Problem and question:
when P2 is compiled, got an error message saying that not sufficient
privilege. I tried a set of privileges which worked on oracle 8.1.6,
but not
on oracle 9.2 I memtioned above.
What is the privilege needed to be granted or something else needs to
be done other than just granting privileges?

Thanks in advance.

Ping


Sigh... Roles are *not* active during PL/SQL execution, as mentioned
many times in this ng.
For you to search the archives (or the documentation) for the solution
--
A prosperous 2004,
Regards,
Frank van Bortel

Jul 19 '05 #5
In schema U2, the select count(*) from U1.T1 gives following error message:

ERROR at line 1:
ORA-01031: insufficient privileges
Jul 19 '05 #6
Ping wrote:

In schema U2, the select count(*) from U1.T1 gives following error message:

ERROR at line 1:
ORA-01031: insufficient privileges


Have you done a 'grant select' from U1 on T1 to U2?

What ROLES do U1 and U2 have?
Jul 19 '05 #7
Ping wrote:

In schema U2, the select count(*) from U1.T1 gives following error message:

ERROR at line 1:
ORA-01031: insufficient privileges


Your problem is therefore NOT in the PL/SQL routine. It is a basic
accessibility problem.

Now might be a good time to reread the following documentation:

Oracle9i Database Concepts: Chapter 23
Oracle9i Database Administrator's Guide: Chapters 25, 23 & 24

both being available at http://docs.oracle.com
(http://otn.oracle.com/pls/db92/db92....emark=homepage)
Jul 19 '05 #8
Hans Forbrich wrote:
Ping wrote:
In schema U2, the select count(*) from U1.T1 gives following error message:

ERROR at line 1:
ORA-01031: insufficient privileges

Your problem is therefore NOT in the PL/SQL routine. It is a basic
accessibility problem.

Now might be a good time to reread the following documentation:

Oracle9i Database Concepts: Chapter 23
Oracle9i Database Administrator's Guide: Chapters 25, 23 & 24

both being available at http://docs.oracle.com
(http://otn.oracle.com/pls/db92/db92....emark=homepage)


Even worse, then - wonder what the "set of privileges which worked on
oracle 8.1.6" were?
--
A prosperous 2004,
Regards,
Frank van Bortel

Jul 19 '05 #9
> Even worse, then - wonder what the "set of privileges which worked on
oracle 8.1.6" were?


Frank, I have the following set for the schema U2 as mentioned in the
above conversation:

ALTER ANY PROCEDURE
ALTER ANY TRIGGER
ALTER SYSTEM
CREATE ANY PROCEDURE
CREATE ANY TRIGGER
CREATE PUBLIC SYNONYM
DROP ANY PROCEDURE
DROP ANY TRIGGER
DROP PUBLIC SYNONYM
EXECUTE ANY PROCEDURE
GRANT ANY PRIVILEGE
SELECT ANY TABLE
UNLIMITED TABLESPACE
Just got oracle 9.2 on XP working after granting the basetables of T1
with grant option, as stated in the Oracle 9i concept:

Additionally, in order to grant other users access to your view, you
must have received object privileges to the base objects with the
GRANT OPTION clause or appropriate system privileges with the ADMIN
OPTION clause. If you have not, grantees cannot access your view.

Thanks, Hans, for pointing out the excact chapters in the documents.

Ping
Jul 19 '05 #10

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

Similar topics

46
4194
by: Keith K | last post by:
Having developed with VB since 1992, I am now VERY interested in C#. I've written several applications with C# and I do enjoy the language. What C# Needs: There are a few things that I do believe MSFT should do to improve C#, however. I know that in the "Whidbey" release of VS.NET currently
0
1965
by: David Greenberg | last post by:
Hi We use Sql 2000. I have a user that I want to be able to run a bat file with the DTSRUN command in it on a remote computer. What happens now is that she runs the bat file , reads the DTSRUN command but doesn't do anything with it and continues in the bat file. What privilege do I need to give her so that she can run DTSRUN ? Right now she has no server role and is defined with the database role
8
259
by: Ping | last post by:
Hello, Have a wonderful new year! I have oracle 9.2 on XP. There is a table T1 created by user U1 in U1's schema, a synonym S1 created also by U1 to point to T1 in U1's schema, U1 granted S1 to public for select.
0
8182
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
8494
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
7178
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6115
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5570
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4085
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2614
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
1
1800
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1496
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.