Solved

SQLPlus Spool Incomplete

Posted on 2013-12-11
2
685 Views
Last Modified: 2013-12-11
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
Comment
Question by:xoxomos
2 Comments
 
LVL 76

Accepted Solution

by:
slightwv (䄆 Netminder) earned 300 total points
ID: 39713017
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
 

Author Closing Comment

by:xoxomos
ID: 39713024
Nopes.  Sure didn't :-)
Thanks.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
This post first appeared at Oracleinaction  (http://oracleinaction.com/undo-and-redo-in-oracle/)by Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now