Toad World® Forums

Extract DDL preferences


#1

Hi

It seems to me that the Extract DDL preference schema.object filename prefix is not working

Regards
Filipe


#2

Hi Filipe,

Actually it adds the schema prefix before an underscore _. For instance, HR_EMPLOYEES. The caption of this preference is misleading. I think we’d better change this later.

Could you please check this again and let me know if you can see the schema prefix with underscore?

Thanks,
Vincent


#3

Hi

The way it works now (if the Preference ON):
if extracted DDL via DB explorer or DB Navigator or Find Objects
<schema_name>_<object_name>_ddl.sql
if extracted DDL via Code Editor
<object_name>_ddl.sql
:frowning:

I think the caption should change to (at least)
<schema_name>_<object_name> prefix

I think _ddl is not necessary in the file name.Maybe a preference for that?
If the Preference if OFF all give
<object_name>_ddl.sql

BTW in http://sqlnavigator.inside.quest.com/thread.jspa?threadID=15610&tstart=0 an user asked for a way to export the ddl directly to files and not to the editor

Regards
Filipe


#4

Thanks Filipe for the feedback and reminding about the other thread :).

I opened package/procedure/function into code editor, and used menu Object -> Extract DDL. The preference . File Name Prefix was ON. After the DDL was extracted into code editor, the caption was fine for me. I could see the schema prefix. What were your steps that made the schema prefix didn’t appear?

The _ddl in the caption/filename indicates the script is the DDL extracted from object(s). It doesn’t bother anything except making the caption longer, does it? :slight_smile:


#5

Hi Vincent

the _ddl doesn’t bother to much (its just redundant)

In Code Editor press the button extract DDL and then try to save (to check the file name).

Regards
Filipe


#6

Hi Filipe,

I think you’re talking about the “Generate DDL script” button in code editor toolbar. It’s not actually working like Extract DDL. The preferences for Extract DDL will be not applied for this action. So it’s not suitable to use the file name prefix preference here.

Thanks,
Vincent


#7

Hi Vincent

Ok, but then a request.
I think the naming should be consistent with the saving of the other tabs.
What I mean is that when saving the code tab of a procedure, function, package spec or body we get an .. file
Because its generated I think that an ._ddl.sql would be nice.

Thanks
Filipe


#8

Request accepted, Filipe :slight_smile:
I will create an enhancement CR for this.