Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 808
  • Last Modified:

SQLPlus Spool Incomplete

I'm trying to run this script to output index rebuild commands for some of the indexes.
 spool rebuild_index_list

select 'alter index '||owner||'.'||index_name ||' rebuild parallel 4 compute statistics;'
  from dba_indexes
    where (dba_indexes.owner = 'BBS'
    and dba_indexes.num_rows >= 3000000 );
select 'alter index '||owner||'.'||index_name ||' rebuild parallel 4 compute statistics;'
  from dba_indexes
    where (dba_indexes.owner like '%CMS%'
    and dba_indexes.num_rows >= 3000000 );
rebuild_index_list
All the returned rows show up on the display, but when i look in the spool file ,rebuild_index_list, only part of the first query in included and none of the second, CMS,
shows.
What do I need to do to get all the result set into the spool file?
~
~
~
~
0
xoxomos
Asked:
xoxomos
1 Solution
 
slightwv (䄆 Netminder) Commented:
Did you issue the 'spool off' command at the end?

If not, it may not have all been flushed.

If you did, can you post the complete script?

What is the "rebuild_index_list" after the end of the second select?

...
and dba_indexes.num_rows >= 3000000 );
rebuild_index_list
...
0
 
xoxomosAuthor Commented:
Nopes.  Sure didn't :-)
Thanks.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now