Unanswered: Extracting ddl's for multiple instances on a Server
I have the following code, which will extract the ddl's on a separate .sql files on a file server at one location for one database instance.
1) Create the script called getObject.sql:
select dbms_metadata.get_ddl('&3','&1','&2' ) from dual;
Then, Ran this Code:
set pagesize 0 verify off feedback off
SELECT '@getobject ' || OBJECT_NAME || ' ' || OWNER || ' ' || OBJECT_TYPE
WHERE OBJECT_TYPE IN ('PROCEDURE','FUNCTION','TRIGGER',’PACKAGE’) AND OWNER NOT IN (‘SYS’,’SYSTEM’);
Now, I want to have databasename in that spool file name to differentiate for multiple database instances.
I have to extract the files on the server at some location,