Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • How to set Processes Parameter Oracle
  • DBMS_PROFILER for tuning PLSQL programs. Oracle
  • Find total file sizes Linux/Unix
  • sess1.sql Oracle
  • secure crt settings Linux/Unix
  • To see only files and/or folders using LS command Linux/Unix
  • Finding last recovered file on DR and remove all chanracters before any “/” Linux/Unix
  • move_arch_files.ksh /* Good One */ Linux/Unix
  • Jai Shree Ram Linux/Unix
  • purge_trc.sh Linux/Unix
  • Adding or Dropping Online Redo Log Files When Physical Standby in place Oracle
  • Rman Notes -1 Oracle
  • Directory wise folder wise space usage Linux/Unix
  • find_err.sql for finding errors from dba_errors. Oracle
  • How to change hostname in Linux Linux/Unix

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

  • Adding Datafile on Primary Server and Impact on Standby Server Oracle
  • oracle Dba site Oracle
  • TRUNCATE table and disabling referential constraints. Oracle
  • exp syntax in oracle 10g Oracle
  • CTAS with LONG Column for 9i and higher Oracle
  • Implementing Listener Security Oracle

Leave a Reply Cancel reply

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

Categories

  • Ansible (0)
  • AWS (2)
  • Azure (1)
  • Django (0)
  • GIT (1)
  • Linux/Unix (149)
  • MYSQL (5)
  • Oracle (393)
  • PHP/MYSQL/Wordpress (10)
  • POSTGRESQL (1)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (17)
  • rman-dataguard (26)
  • shell (149)
  • SQL scripts (342)
  • SQL Server (6)
  • Uncategorized (0)
  • Videos (0)

Recent Posts

  • Complete Git Tutorial for Beginners25-Dec-2025
  • Postgres DB user and OS user.25-Dec-2025
  • Trace a SQL session from another session using ORADEBUG30-Sep-2025
  • SQL Server Vs Oracle Architecture difference25-Jul-2025
  • SQL Server: How to see historical transactions25-Jul-2025
  • SQL Server: How to see current transactions or requests25-Jul-2025
  • T-SQL Vs PL/SQL Syntax25-Jul-2025
  • Check SQL Server edition25-Jul-2025
  • Checking SQL Server Version25-Jul-2025
  • Oracle vs MYSQL Architecture differences (For DBAs)24-Jul-2025

Archives

  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • Insert cause enqueue locks Oracle
  • TRUNCATE Privs Oracle
  • Convert multiple rows to single column Oracle
  • to see when crontab is changed. Linux/Unix
  • Reclaim temp tablespace for oracle 8, 8i Oracle
  • How does one overcome the Unix 2 Gig file limit? Linux/Unix
  • rm_backup_arch_file.ksh Linux/Unix
  • Configure ssh authentications for RAC Oracle

Copyright © 2026 pvmehta.com.

Powered by PressBook News WordPress theme