Login   Search
Skip Navigation Links
Home
Application Security Tips
Oracle , PL/SQL
IT Product Reviews
Project Management
Forum
Contact Us
Links & References
Avoid SQL Injection attack
Threats and Countermeasures: S.T.R.I.D.E
Input Validation
Session Management
Authentication Mechanism
Cross Site Scripting Vulnerabilities
Configuration Management
Scroll up
Scroll down
Oracle 9i - Programming basics PL/SQL
PL/SQL - Conditional Statements – IF
PL/SQL -Nested Block
LOOPS in PL/SQL
PL/SQL Records
Cursors in PL/SQL
PL/SQL Tables
PL/SQL Exceptions
PL/SQL Procedures
PL/SQL Functions
Oracle supplied packages
Packages
PL/SQL Ref Cursors
Types in Oracle PL/SQL
Varrays
Nested Table
Bfile and LOBs
Bulk Binding
Know Depandencies
PL/SQL Wrapper
Triggers
Scroll up
Scroll down
DBMS_SQL package
DBMS_DDL Package
DBMS_JOB Package
UTL_FILE Package
DBMS_METADATA Package
DBMS_PIPE Package
DBMS_SESSION Package
Scroll up
Scroll down

 

Blog

  • Imperativeness of agile methodology in software development
  • Get list of installed softwares on machines in your network
  • VMWare - Error - the vmware authorization service is not running
  • Add chart / graphs in ASP.net application / website
  • Microsoft Ramp Up

Blog

  • Review: uCertify.com: PrepKit for: 70-529 (C#)
  • Bird eye Review: uCertify.com: PrepKit for: 70-529 (C#)
Skip Navigation Links>Oracle , PL/SQL>Oracle supplied packages>DBMS_DDL Package

Oracle supplied packages -DBMS_DDL Package

Below is self explanatory example

Scenario of recompilation for a procedure –

drop table tx1;
create table tx1(a number);
insert into tx1 values(1);

create or replace procedure px1
is
s number;
begin
select a into s
from tx1;
end;

select status from user_objects
where object_name='PX1';

alter table tx1
add b number;

select status from user_objects
where object_name='PX1';

alter procedure px1 compile;             OR                   Exec px1;
select status from user_objects
where object_name='PX1';

DBMS_DDL.ALTER_COMPILE(‘object_type’, ‘owner name’, object_name)
Object_type can be a procedure, function, package specification, package body or a trigger only.

create or replace procedure compile_procedure(procedure_name varchar2)
as
begin
 DBMS_DDL.ALTER_COMPILE('PROCEDURE','SCOTT', procedure_name);
 dbms_output.put_line('The procedure ' || procedure_name || ' is recompiled');
end;
 
exec compile_procedure('PX1');

select status from user_objects
where object_name='PX1';

 

Discussion about this article

AuthorBody
admin
8/24/2009 2:50 PM
Please provide feedback about this article here.
To participate in this discussion Sign up for free membership of 24x7code.
To Signup click on Login , Use create user link & the follow the instructions.
Thank you



Designed & Developed by Rahul Bagal