Tuesday, December 8, 2020

Generate Backup of Store Procedure on Oracle

	follwoing 2 ways to get the Procedure details in oracle

Way 1:

Select OBJECT_NAME As ProcName,
   dbms_metadata.GET_DDL('PROCEDURE',u.object_name) As Details
From user_objects u
Where object_type = 'PROCEDURE'; 
   
Way 2:
   
Select OBJECT_NAME As ProcName,
 dbms_metadata.GET_DDL('PROCEDURE',OBJECT_NAME) As Details  
From ALL_OBJECTS  
Where  object_type = 'PROCEDURE' and OWNER = 'SYSTEM' 
Order by Object_Name