Home » Other » General » Procedure & Function
Procedure & Function [message #104519] Wed, 10 November 2004 05:46 Go to next message
Tarique Khan
Messages: 1
Registered: November 2004
Junior Member
Please let me know the command to copy the procedure and funciton from one schema to other or from one database to other.
Re: Procedure & Function [message #104520 is a reply to message #104519] Thu, 11 November 2004 03:59 Go to previous message
Frank Naude
Messages: 4587
Registered: April 1998
Senior Member
Hi,

Extract the source code for the procedure of function from the source database and execute it on the target database.

If you run on Oracle 9i and above, you can use DBMS_METADATA to extract the source code. Example:

SQL> SELECT dbms_metadata.get_ddl('PROCEDURE', 'HI', 'SCOTT') FROM dual;

DBMS_METADATA.GET_DDL('PROCEDURE','HI','SCOTT')
--------------------------------------------------------------------------------

CREATE OR REPLACE PROCEDURE "SCOTT"."HI" AS
BEGIN
  dbms_output.put_line('Hello world');
END;


Best regards.

Frank
Previous Topic: Materialized views in 10g
Next Topic: rna in oracle payable
Goto Forum:
  


Current Time: Sat Dec 28 13:01:00 CST 2024