Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • Privilege to describe the table. Oracle
  • segment_wise_space.sql segspace.sql Segment wise space usage (allocated and used) Oracle
  • tab.sql Oracle
  • cp_filesystem.sql Oracle
  • 272332.1 CRS 10g Diagnostic Collection Guide Oracle
  • Implementing Listener Security Oracle
  • Nice notes on wait events Oracle
  • restarting network in linux Linux/Unix
  • replacing ^M character when passing files from Windows to Unix Linux/Unix
  • fdisk -l explaination about Primary-Logical-Extended Partitions Linux/Unix
  • Giving Grant on v$DATABASE Oracle
  • Oracle Standby Database Library Index from Metalink Oracle
  • get_vmstat_solaris Oracle
  • good note for shared pool tunnig Oracle
  • scripts to take listener.log backup 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

  • Find execution plan from dba_hist_sql_plan for a specific SQL_ID and PLAN_HASH_VALUE fplan.sql Oracle
  • Handling LOB data in Oracle Oracle
  • Oracle Recommended Patches — Oracle Database ID 756671.1 Oracle
  • RAC with RHEL4 and 11g Oracle
  • Changing the Global Database Name Oracle
  • Export With Query Another Example. Oracle

Leave a Reply Cancel reply

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

Categories

  • Ansible (0)
  • AWS (2)
  • Azure (1)
  • Linux/Unix (149)
  • MYSQL (5)
  • Oracle (393)
  • PHP/MYSQL/Wordpress (10)
  • POSTGRESQL (0)
  • 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

  • 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
  • V$INSTANCE of Oracle in MYSQL24-Jul-2025
  • Day to day MYSQL DBA operations (Compared with Oracle DBA)24-Jul-2025

Archives

  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • Nice notes on wait events Oracle
  • How to set Processes Parameter Oracle
  • Rownum with Order by Oracle
  • Useful Solaris Commands on 28-SEP-2005 Linux/Unix
  • Find total file sizes Linux/Unix
  • Does DBMS_JOB recompute the NEXT_DATE interval after or before Oracle
  • On solaris 10, “S” link is not part of $ORACLE_HOME/bin/oracle as default. ( For 9.2.0.8) Oracle
  • database trigger failing Oracle

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme