# Export DDL, options

**URL:** <https://forums.toadworld.com/t/export-ddl-options/60984>\
**Category:** Toad for Oracle & DevOps Toolkit\
**Created:** [May 15, 2025, 1:06pm UTC](https://forums.toadworld.com/t/export-ddl-options/60984 "2025-05-15T13:06:57Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![abraham.olsen](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/abraham.olsen/32/17212_2.png) [@abraham.olsen](https://forums.toadworld.com/u/abraham.olsen)\
**Post date:** [May 15, 2025, 1:06pm UTC](https://forums.toadworld.com/t/export-ddl-options/60984/1 "2025-05-15T13:06:57Z")

</div>

Toad for Oracle Base Edition (64-bit)  
Add-Ons:   
**25.1.20.5192**

Tables, Sequence: Any way of not having "start with..." or force it to "start with 1", rather than using the current in source database?

Tables, Storage and LOB storage: I specify LOB Parameters: "No Storage Clause", yet the storage including the tablespace is in the file.

Constraints:

- Any way of extracting only Foreign Keys, or filtering by name the only method?
- I get 2 files for each constraint. One has table\_name\_FK.sql and the second has the name of the constraint. Contents of files are identical. Any way around it?

---

<div class="post-metadata">

**Author:** ![JohnDorlon](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/johndorlon/32/9997_2.png) [@JohnDorlon](https://forums.toadworld.com/u/JohnDorlon)\
**Post date:** [May 15, 2025, 6:58pm UTC](https://forums.toadworld.com/t/export-ddl-options/60984/2 "2025-05-15T18:58:58Z")

</div>

Sequence: There is a "Start with minval" option, but I see that you can't get to it if exporting DDL for a table with an auto-increment column. Or a trigger that uses a sequence. I'll fix.

Lob storage. This is working as designed. It's not really intuitive, but "tablespace" is not part of the storage clause. According to Oracle, it's in the "Physical Attributes" clause. Try switching between "All Lob Parameters" and "No Storage Clause" and you'll see the difference. Maybe "No Lob Parameters" or "Tablespace only" would be more to your liking. If you need a new option here, let me know.

To export only a specific type of constraint, see below:

 ![image](https://global.discourse-cdn.com/quest/original/3X/c/d/cd1179f3909f891ac0425292d089b5941428de01.png)

I see tablename\_NonFK.sql and constraintname.sql, but constraintname.sql actually creates the index, not the constraint so this is as-designed. If you don't want that, check "no constraint indexes" (in the screen shot above). **Edit** : I see that creates an empty file if you do that. I'll fix. Another option is use "Combine" (on the Objects & Output tab) to not make separate files at all.

---

<div class="post-metadata">

**Author:** ![abraham.olsen](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/abraham.olsen/32/17212_2.png) [@abraham.olsen](https://forums.toadworld.com/u/abraham.olsen)\
**Post date:** [May 16, 2025, 7:53am UTC](https://forums.toadworld.com/t/export-ddl-options/60984/3 "2025-05-16T07:53:50Z")

</div>

**Loading Referential only** : I find the easiest way is to edit query:

 ![image](https://global.discourse-cdn.com/quest/original/3X/c/5/c52a3e148b0fc95345160399f524e504fb9a3b8e.png)

That's **very neat** and also is a nice way of filtering object names, such as:

 ![image](https://global.discourse-cdn.com/quest/original/3X/0/f/0f550e15d59205a569ae00b0ad49ead1b29f0e45.png)

Would be nice to be able to save it as some profile for easy reuse.

I cannot see the difference between the 2 files I get when exporting.

 ![image](https://global.discourse-cdn.com/quest/original/3X/8/9/892f3f4f210e522156dedc761fac3b0b59c55ad5.png)

Using a dos prompt, I can run del \*FK.sql in the library. No harm done 😉

**Lob storage**. I've been asked specifically to create a bunch of create table... where every reference to tablespace is removed, so that local default is used at install time. Be nice if I don't have to edit dozens files after export.

---

<div class="post-metadata">

**Author:** ![JohnDorlon](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/johndorlon/32/9997_2.png) [@JohnDorlon](https://forums.toadworld.com/u/JohnDorlon)\
**Post date:** [May 16, 2025, 1:29pm UTC](https://forums.toadworld.com/t/export-ddl-options/60984/4 "2025-05-16T13:29:59Z")

</div>

Re: Constraints - I don't really have a big picture of what you're doing here. Are you extracting DDL for only constraints? Constraints with tables? If only constraints, you can filter them in the schema browser, then select all, right-click -\> Export DDL. If constraints with tables, you don't need to specify constraints at all. Just specify the tables and check the options to include whatever kinds of constraints you want.

> I cannot see the difference between the 2 files I get when exporting.

Sounds like maybe you are specifying both the table names and constraint names in export ddl, and that's why constraints are being exported twice.

> [@abraham.olsen](#):
>
> **Lob storage**. I've been asked specifically to create a bunch of create table... where every reference to tablespace is removed, so that local default is used at install time. Be nice if I don't have to edit dozens files after export.

Ok, so why not use "no lob params"? Is it that you want everything **except** tablespace?

---

<div class="post-metadata">

**Author:** ![abraham.olsen](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/abraham.olsen/32/17212_2.png) [@abraham.olsen](https://forums.toadworld.com/u/abraham.olsen)\
**Post date:** [May 19, 2025, 7:17am UTC](https://forums.toadworld.com/t/export-ddl-options/60984/5 "2025-05-19T07:17:09Z")

</div>

They don't want the other lob params either. Oh well, no biggy.

I need the "R" constraints in a folder. Nothing more, nothing less.  
I go:

 ![image](https://global.discourse-cdn.com/quest/original/3X/a/b/abba0c17c88d6f24a255d6589419ee89c960ee52.png)

 ![image](https://global.discourse-cdn.com/quest/original/3X/4/8/484bd51c2c5bdfc3dd87129b8698697d5aba27f9.png)

I don't see my self either searching for, loading or extracting anything other than the R constraints of the schema.

I do, however, get 2 times the files, each pair with identical content:

 ![image](https://global.discourse-cdn.com/quest/original/3X/a/3/a3a3230bc4dca412f6d757002e359eac13e6bf49.png)

---

<div class="post-metadata">

**Author:** ![JohnDorlon](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/johndorlon/32/9997_2.png) [@JohnDorlon](https://forums.toadworld.com/u/JohnDorlon)\
**Post date:** [May 19, 2025, 1:10pm UTC](https://forums.toadworld.com/t/export-ddl-options/60984/6 "2025-05-19T13:10:53Z")

</div>

If you don't want any lob params at all, do this:

 ![image](https://global.discourse-cdn.com/quest/original/3X/0/1/01b5896802c4930a8e9b77a7fe1b338ed28f10cc.png)

Do this to filter the schema browser to show only R constraints:

 ![image](https://global.discourse-cdn.com/quest/original/3X/a/1/a198723e1c735933a2f1892c41acceb749b7780d.png)

Then CTRL+A in the Schema Browser to select all them, and click the "Create Script" button.

 ![image](https://global.discourse-cdn.com/quest/original/3X/e/1/e1641c76c8e566ddc0ecff41d7d13ce3db6b6203.png)

It's a lot easier than using the "Add" button in Export DDL.

I can now reproduce the duplicate FK file problem. Thanks. I will fix this.

---

<div class="post-metadata">

**Author:** ![JohnDorlon](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/johndorlon/32/9997_2.png) [@JohnDorlon](https://forums.toadworld.com/u/JohnDorlon)\
**Post date:** [May 21, 2025, 8:05pm UTC](https://forums.toadworld.com/t/export-ddl-options/60984/7 "2025-05-21T20:05:50Z")

</div>

> [@abraham.olsen](#):
>
> Would be nice to be able to save it as some profile for easy reuse.

This will be in beta for Toad 2025 R3, which will be out in June.
