1

I wanted to have DDL for the entire schema(tables,view,Index, Procedure, Function, Trigger etc..) of an Oracle DB. Is there a way to get the combined ddl rather than doing one by one for each table /function/ view.

user6751235
  • 59
  • 2
  • 12

1 Answers1

0

You need to use

dbms_metadata.get_ddl
BobC
  • 4,208
  • 1
  • 12
  • 15
  • Thank you for the reply. Do you mean executing the following query? SELECT DBMS_METADATA.get_ddl ('TABLE', table_name, owner) FROM all_tables WHERE owner ='username'; In this case we have to generate the DDL for each table/view one by one.. I would like to find some ways where I can get DDL for all the tables/views. – user6751235 Feb 20 '18 at 07:03
  • The thread indicated in the duplicate closure reason shows you how to do this. – APC Feb 20 '18 at 08:40