Database Administration (MOSC)

MOSC Banner

Script to generate DDL for indexes?

edited Dec 12, 2013 10:36AM in Database Administration (MOSC) 16 commentsAnswered
11.2.0.2

Hi,

I tried this:

running as the index owner:

set pagesize 0
set long 90000
set feedback off
set echo off 

spool index_dd.slq

SELECT DBMS_METADATA.GET_DDL('INDEX',u.index_name)
     FROM USER_INDEXES u;

spool off

But the output lacks a / or ; at the end of every index. How to fix that?

Regards

S

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center