Skip to Main Content

SQL & PL/SQL

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!

DBMS_METADATA.get_ddl for a CONSTRAINT

Greg BeckOct 6 2016 — edited Oct 6 2016

I am on Oracle 12c.

When we use DBMS_METADATA.get_ddl('CONSTRAINT', 'CONSTRAINT_NAME', ORACLE_OWNER, 'COMPATIBLE')

we are getting

using index (Create Index...

  ALTER TABLE "OWNER"."CUSTOMER_DIM" ADD CONSTRAINT "EFDA_CIS_CUSTOMER_DIM_PK" PRIMARY KEY ("CUSTOMER_KEY")

  USING INDEX (CREATE UNIQUE INDEX "EFDAREP"."EFDA_CIS_CUSTOMER_DIM_PK_IX" ON "EFDAREP"."EFDA_CIS_CUSTOMER_DIM" ("CUSTOMER_KEY")

  )  ENABLE NOVALIDATE;

We don't want the CREATE UNIQUE INDEX

part.

We only want using index and enable no validate.

This worked in 11g but is doing this by default in 12c.

Any ideas on how to get what we need besides replacing part of the returned data?

thanks

greG

This post has been answered by Solomon Yakobson on Oct 6 2016
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 3 2016
Added on Oct 6 2016
12 comments
15,312 views