Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • Committing distributed transaction using commit force Oracle
  • 556976.1 Oracle Clusterware: Components installed Oracle
  • proc.sql Oracle
  • pvmehta.com SQL scripts
    Find which sessions is accessing object that prevent your session to have exclusive locks in Oracle Oracle
  • GSQ.sql Oracle
  • RAC 11g with vmware Oracle
  • tblwopk.sql tablewopk.sql Oracle
  • Create type and Grant on it. Oracle
  • Specify the Rollback segment to use in Transaction Oracle
  • Good Link from metalink 1 Oracle
  • find_du.ksh to find # of files, their sizes in current folder and its subdolder Linux/Unix
  • Goldengate Tutorial Oracle
  • db_status.sql Oracle
  • Drop all SPM baselines for SQL handle Oracle
  • Temporary tablespace explaination 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

  • find_longsql.sql Oracle
  • DBMS_PROFILER for tuning PLSQL programs. Oracle
  • True Session Wait Activity in Oracle 10g Verygood Oracle
  • Another Tuning Article for subheap of shared pool Oracle
  • normal maintenance for exp-imp and renaming table Oracle
  • find_log_switch.sql Find log switches in graphical manner 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
  • lck.sql Oracle
  • scripts to take listener.log backup Linux/Unix
  • Proc Compilation Oracle
  • scripts to take listener.log backup Linux/Unix
  • When error comes for temporary tablespace with version <= 9i Oracle
  • Running select from V$ views from remote server Linux/Unix
  • Establishing trusted relationship between dbmonitor( central monitoring) and monitoring targets. Linux/Unix
  • ext#.sql Oracle

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme