When using the Database | Export | Export DLL function, or when going into the Schema Browser, the user's constraint scripts do not contain the "using index" and "tablespace" clauses. The Script Options do not have any further settings for this.
For example, when you get the script for the table BONUSES, you get the following as part fo the table script as desired::
ALTER TABLE BONUSES ADD (
CONSTRAINT BONUSES_R01
UNIQUE (EMPLOYEE_ID)
USING INDEX
TABLESPACE SYSTEM
PCTFREE 10
INITRANS 2
MAXTRANS 255
STORAGE (
INITIAL 64K
MINEXTENTS 1
MAXEXTENTS 2147483645
PCTINCREASE 0
FREELISTS 1
FREELIST GROUPS 1
));
But when you get the script for the constraint BONUSES_R1, you only get the following:
ALTER TABLE MATHEW.BONUSES
DROP CONSTRAINT BONUSES_R01;
ALTER TABLE MATHEW.BONUSES ADD (
CONSTRAINT BONUSES_R01
UNIQUE (EMPLOYEE_ID));
WORKAROUND:
Use the Generate Schema Script tool
1. Launch Toad, connect to your database.
2. Go to the menu Database | Export | Generate Schema Script
3. In the Sources and Output tab | On the left hand side, check the Schema you want. On the right side enable "View DLL when complete" and enable "Create Individual Object DLL Files." Select a directory to store your script files.
4. Go to the Objects Types tab | Enable "Constraints, check, primary key, foreign key, unique." Enable Indexes and Tables. Disable everything else for now.
5. Go to the Filters tab | Enable any filters you feel might be helpful. For myself, I filtered only my table that start with BONUSES.
6. Go to the Script Option tab | Go to Objects with Storage. Enable "Storage Clauses."
7. Go to the Script Option tab | Go to Constraints. Enable "Individual Alter Table Commands."
8. Once these options are set, click on the green triangle button to Execute.
RESOLUTION:
This issue has been submitted to the developers as an enhancement request to be considered in a future release of Toad for Oracle
© ALL RIGHTS RESERVED. Terms of Use Privacy Cookie Preference Center