Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • Running some SQL on multiple databases connecting using monitoring userid and password Linux/Unix
  • Database link password in user_db_links Oracle
  • Changing unix system clock when Oracle database is running. Oracle
  • Good Site for Oracle Internals Oracle
  • create PLAN_TABLE command. Oracle
  • Check Oracle installed products using one command Oracle
  • Read CSV File using Python Python/PySpark
  • VIvek Encryption Package and Its Usage Oracle
  • initUOCIOTTO.ora Oracle
  • Oracle Internal Good Websites 1 Oracle
  • Some useful Unix Commands Linux/Unix
  • upload.html PHP/MYSQL/Wordpress
  • login.sql Oracle
  • Rman Notes -1 Oracle
  • Proc code Oracle

Roles and Stored Procs II

Posted on 31-Jan-2006 By Admin No Comments on Roles and Stored Procs II

Problem Resolution For roles and Stored Procedures.

http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:961430030094

http://asktom.oracle.com/~tkyte/Misc/RolesAndProcedures.html

As per http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:961430030094 with tom kyte, he has mentioned that we cannot compile this unless we give direct object privs to Owner of procedure, as at compile time AUTHID DEFINER and AUTHID CURRENT_USERS behave same. They both compile as per the definers privs.

We can resolve this issue by using NDS, as NDS does not validate object existance.. As following..

execute immediate ‘SELECT max(EFF_DATE) FROM CORPORATE.DIRECT_CAD’ INTO DtCurr_RepDate;

This will bypass compile time object validations. See following work-around.

12:16:57 WEBP18FSCRIPTS@WEBP18F:-> create or replace procedure pvm_1

12:16:57 2 AUTHID CURRENT_USER

12:16:57 3 as

12:16:57 4 Myint number;

12:16:57 5 begin

12:16:57 6 execute immediate ‘select count(1) from browse_channel’ into myint;

12:16:57 7 dbms_output.put_line (‘myint = ‘ || myint);

12:16:57 8 end;

12:16:57 9 /

Procedure created.

Elapsed: 00:00:00.05

12:16:57 WEBP18FSCRIPTS@WEBP18F:-> exec pvm_1

myint = 19

PL/SQL procedure successfully completed.

Elapsed: 00:00:00.01

12:16:59 WEBP18FSCRIPTS@WEBP18F:->

http://www.adp-gmbh.ch/ora/plsql/authid.html

Oracle, SQL scripts

Post navigation

Previous Post: Identical Dblink Issue…
Next Post: sid_wise_sql.sql Further explaination

Related Posts

  • ORA-8031 issue and solution if it is occuring due to truncate. Oracle
  • USER_TABLES.Freelists Oracle
  • Parallel DML Oracle
  • SQLPLUS COPY command Precautions. Oracle
  • Ports used by Oracle Software Oracle
  • Order by with ROWNUM Oracle

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Categories

  • AWS (2)
  • Azure (1)
  • Linux/Unix (149)
  • Oracle (392)
  • PHP/MYSQL/Wordpress (10)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (17)
  • rman-dataguard (26)
  • shell (149)
  • SQL scripts (341)
  • Uncategorized (0)
  • Videos (0)

Recent Posts

  • load SPM baseline from cursor cache05-Jun-2025
  • Drop all SPM baselines for SQL handle05-Jun-2025
  • Load SPM baseline from AWR05-Jun-2025
  • Drop specific SQL plan baseline – spm05-Jun-2025
  • findinfo.sql (SQL for getting CPU and Active session info)27-May-2025
  • SQL Tracker by SID sqltrackerbysid.sql22-Apr-2025
  • How to connect to Oracle Database with Wallet with Python.21-Mar-2025
  • JSON/XML Types in Oracle18-Mar-2025
  • CPU Core related projections12-Mar-2025
  • Exadata Basics10-Dec-2024

Archives

  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • To find all disk io ( EMC as well as local) Linux/Unix
  • Updated LCK.SQL file. Oracle
  • Unix command for system configuration Linux/Unix
  • TRUNCATE table and disabling referential constraints. Oracle
  • FRA Information. Oracle
  • Single character replacement in Unix Linux/Unix
  • mutex in Oracle 10.2.0.2 or Oracle 10g Oracle
  • Directory wise folder wise space usage Linux/Unix

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme