read only user

pts.
Tags:
Database
IBM DB2
Oracle
SQL
I've got an Oracle 9.2.0.5 database and I need to create a read only user that can view any table, view, package, etc. I've created the user but I can't figure out how to give it read only access to packages, procedures and functions. The only option seems to be granting execute any procedure. I don't want the user to be able to execute the procedure just view the code. Any suggestions? Thanks, Sharon

Answer Wiki

Thanks. We'll let you know when a new response is added.

Try granting select on dba_source.

Discuss This Question: 5  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • DaveInAZ
    This may not be read only, but you could try grant debug any procedure to UserX; I'm not entirely sure whether debug privs include the right to execute or not. I've never run across a situation where I wanted that combination but, since they're separate privileges, I'd think not. You could easily test it. The obvious question for you is, why do you want to let a user view the code of procs they can't execute?
    0 pointsBadges:
    report
  • OraDBAUnix
    Hi, debug grant will give access to functions and procedures and package spec but not to package body. Regards Avadhani.
    0 pointsBadges:
    report
  • Arierobb
    select grant on sys.dba_source is sufficient.
    0 pointsBadges:
    report
  • RJLyders
    All packages/functions/procedures run as the owner/creator and thus the owner's privileges control what is accessible. This is considered a feature rather than a limitation since this allows you to control what data is made available to your users at a more granular level than normally available via granting of user privileges. You are given the ability to control the records and even columns that are made available via the output result of the package/procedure/function. This is designed to be a way to give the developer a method to give users access to the owner's data even if the user doesn't have read/write access to this data via database privileges. You could... 1) If this is your procedure and/or you have access to change the code, then your best option is to just build intelligence into the package that controls R/W access via the user?s login 2) if you don't control the code in this package, then you could also restrict execute privileges to users on that package that should not have write access and then create a separate READ-ONLY version of that package and give execution privileges to the users that should not be given write access. Good luck. -RJLyders
    0 pointsBadges:
    report
  • Skovac
    [...] Address: http://itknowledgeexchange.techtarget.com/itanswers/read-only-user/ (0) Comments Read [...]
    0 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following