Skip to main content
deleted 250 characters in body
Source Link
ArtOfWarfare
  • 21.7k
  • 19
  • 150
  • 203

None of these suggestions were working for me. I finally found something else I could do - dbms_output.put_line. For example:

SET SERVEROUTPUT ON begin for i in (select dbms_metadata.get_ddl('INDEX', index_name, owner) as ddl from all_indexes where owner = 'MYUSER') loop dbms_output.put_line(i.ddl); end loop; end; / 

Boom. It printed out everything I wanted - no truncating or anything like that. And that works straight in sqlplus - no need to put it in a separate file or anything.

I may have left off a line for turning on output at the start. Not sure if that was necessary or not. I'll edit this answer to include that if it is (and remove this comment when I'm sure one way or the other...) Or someone else can edit my answer - feel free to do that.

None of these suggestions were working for me. I finally found something else I could do - dbms_output.put_line. For example:

begin for i in (select dbms_metadata.get_ddl('INDEX', index_name, owner) as ddl from all_indexes where owner = 'MYUSER') loop dbms_output.put_line(i.ddl); end loop; end; / 

Boom. It printed out everything I wanted - no truncating or anything like that. And that works straight in sqlplus - no need to put it in a separate file or anything.

I may have left off a line for turning on output at the start. Not sure if that was necessary or not. I'll edit this answer to include that if it is (and remove this comment when I'm sure one way or the other...) Or someone else can edit my answer - feel free to do that.

None of these suggestions were working for me. I finally found something else I could do - dbms_output.put_line. For example:

SET SERVEROUTPUT ON begin for i in (select dbms_metadata.get_ddl('INDEX', index_name, owner) as ddl from all_indexes where owner = 'MYUSER') loop dbms_output.put_line(i.ddl); end loop; end; / 

Boom. It printed out everything I wanted - no truncating or anything like that. And that works straight in sqlplus - no need to put it in a separate file or anything.

Source Link
ArtOfWarfare
  • 21.7k
  • 19
  • 150
  • 203

None of these suggestions were working for me. I finally found something else I could do - dbms_output.put_line. For example:

begin for i in (select dbms_metadata.get_ddl('INDEX', index_name, owner) as ddl from all_indexes where owner = 'MYUSER') loop dbms_output.put_line(i.ddl); end loop; end; / 

Boom. It printed out everything I wanted - no truncating or anything like that. And that works straight in sqlplus - no need to put it in a separate file or anything.

I may have left off a line for turning on output at the start. Not sure if that was necessary or not. I'll edit this answer to include that if it is (and remove this comment when I'm sure one way or the other...) Or someone else can edit my answer - feel free to do that.