Toad World® Forums

Check the names length


#1

In oracle an identifier used as a name for a table, column, index name etc. can have max 30 chars. Is there a way to run a command and display all the entities that have names with more than 30chars.

For instance, I use the generate index for foreign keys options and sometimes, unless the index name is specified, the names that are generated by default might have more than 30chars. Is there way to find these?

Thanks


#2

Hello Costa,

CR # on this issue has already been created - 41 025.

Concerning the script, my co-worker Mario will make some for you. However, he asks you for patience.

As soon as we have it for you, I’ll publish it here.

Thanks.

Vladka + Mario


#3

Hi Costa,

Good news! :slight_smile:

Please find attached the script for you.

Run the script in Scripting Wïndow (Tools menu, Expert Mode enabled).
The script will go through some objects of which it checks names length. If the length exceeds 30 chars, a message will be written in the Log area.

Note on the script:
see line:
var Model = app.Models.GetObject(0);
//The parameter in GetObject determines here with which model the script should work.
//0 is the first model listed in the Application View.
//1 is the second model listed in the Application View
//etc.

Regards,

Vladka + Mario
Check_Length_Names.zip (940 Bytes)