Skip to Main Content

SQL Developer

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Issue with running DDL creaed by SQLDeveloper

654275Aug 8 2008 — edited Jul 12 2010
Hi,

I have been using SQL developer to create tables, constraints sequences, packages etc. I find it a great tool. Now I want to generate DDL for what I have created so that I can pass on the scripts to others on my team.

I can generate the DDL fine. However I try to open the DDL in a SQL worksheet window and run it, I get heaps of errors. Anybody got any suggestions as to what I am doing wrong. I would have guessed that the DDL generated would be exactly what I need to recreate the database.

Thanks

For example the DDL might look like (excerpt):

--------------------------------------------------------
-- File created - Friday-August-08-2008
--------------------------------------------------------

----------------------------
-- DROP SEQUENCE "CP_ACCESSREQUEST_SEQ";
----------------------------
DROP SEQUENCE "CIRCUITPORTALUSER"."CP_ACCESSREQUEST_SEQ";

--------------------------------------------------------
-- DDL for Sequence CP_ACCESSREQUEST_SEQ
--------------------------------------------------------

CREATE SEQUENCE "CIRCUITPORTALUSER"."CP_ACCESSREQUEST_SEQ" MINVALUE 1 MAXVALUE 999999999999999999999999999 INCREMENT BY 1 START WITH 21 CACHE 20 NOORDER NOCYCLE ;


and the script output will be :

Error starting at line 5 in command:
----------------------------
-- DROP SEQUENCE "CP_ACCESSREQUEST_SEQ";
Error report:
Unknown Command

Error starting at line 7 in command:
----------------------------
DROP SEQUENCE "CIRCUITPORTALUSER"."CP_ACCESSREQUEST_SEQ";
Error report:
Unknown Command

Error starting at line 14 in command:
CREATE SEQUENCE "CIRCUITPORTALUSER"."CP_ACCESSREQUEST_SEQ" MINVALUE 1 MAXVALUE 999999999999999999999999999 INCREMENT BY 1 START WITH 21 CACHE 20 NOORDER NOCYCLE
Error at Command Line:14 Column:41
Error report:
SQL Error: ORA-00955: name is already used by an existing object
00955. 00000 - "name is already used by an existing object"
*Cause:
*Action:
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 9 2010
Added on Aug 8 2008
5 comments
2,123 views