Last active
August 29, 2015 14:18
-
-
Save greenkey/816d39418a0859a0edea to your computer and use it in GitHub Desktop.
Export Oracle Schema
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set long 10000000 | |
set head off | |
set echo off | |
set pagesize 0 | |
set verify off | |
set feedback off | |
SET LINESIZE 32000 | |
COL ddl FORMAT A32000 | |
spool schema.sql | |
SELECT DBMS_METADATA.GET_DDL( | |
replace(decode(object_type, | |
'JOB','PROCOBJ', | |
object_type),' ','_'), | |
object_name) | |
FROM user_OBJECTS | |
where object_type not in ('LOB','QUEUE') | |
order by object_type, NLSSORT(object_name, 'NLS_SORT=generic_m'); | |
exit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment