Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Export the specification and body in a single file

I am using SQL Developer 3.0.04 and am trying to export a package. I have 2 questions:

  1. Can I export both package specification and body in a single export (resulting in 1 export.sql file)?

  2. The export.sql file is somewhat compressed, any way I can have it in text format with linefeeds etc so I can read it better?

like image 253
HY. Avatar asked Jun 08 '12 17:06

HY.


People also ask

How do I export a package in Oracle SQL Developer?

Using the main menu, select Tools->Database Export. An Export wizard will open. At the top of the screen, enter a directory and file name.

How do I get a package body in SQL Developer?

Go to VIEW menu, click on find DB objects option. In the find db object pane put the name of the package and select the DB. Both, the spec and body will appear, double click to open.

How do I export DDL from SQL Developer?

SELECT DBMS_METADATA. GET_DDL('TABLE', TABLE_NAME) FROM USER_TABLES; Next way to get separate DDL scripts is to : Go to FILE -> DATA MODELLER -> EXPORT -> DDL FILE.


2 Answers

In SQL-Developer right click the Package Specification and select Save Package Spec and Body... This will generate one file with both the spec and body.

like image 133
JWK Avatar answered Nov 14 '22 05:11

JWK


Instead of navigating to the package object and doing export there, use \Tools\Database Export to generate a single file.

like image 21
HY. Avatar answered Nov 14 '22 06:11

HY.