Thanks for the tips and scripts!


David Wagoner
Oracle DBA




-----Original Message-----
Sent: Thursday, September 06, 2001 1:33 PM
To: Multiple recipients of list ORACLE-L


David -

Use cron.  Nightly might be excessive.  Kick off a shell script (remember
that cron executes as root, so you need to set your environment) and create
your own script dynamically (following code is use for backups also) in a
manner like:

rebuild_index.sh

#!/bin/ksh

export PATH=$PATH:/u001/app/oracle/product/8.1.7/bin
export ORACLE_SID=ifas
export PATH=$PATH:/$ORACLE_HOME/bin
export ORACLE_HOME=/u001/app/oracle/product/8.1.7
export ORACLE_BASE=/u001/app/oracle

sqlplus <<either use a password protection scheme or hardcode your access
here> <<username>/<password>>>  @/usr/local/bin/rebuild_index

exit

rebuild_index.sql

spool rebuild_index.sql
Select 'Alter index ' || index_name || ' rebuild;' from dba_indexes;     #
add selection caveats if desired
spool off
!chmod 777 /u014/oradata/ifastrn/rebuild_index.sql
@/u014/oradata/ifastrn/rebuild_index

exit

Lots of variations possible.




David A. Barbour
Oracle DBA, OCP
AISD
512-414-1002


 

                    Kimberly Smith

                    <[EMAIL PROTECTED]       To:     Multiple recipients
of list ORACLE-L <[EMAIL PROTECTED]> 
                    jitsu.com>                   cc:

                    Sent by:                     Subject:     RE: Scripts
for Rebuilding Indexes Nightly on Solaris  
                    [EMAIL PROTECTED]

 

 

                    09/06/2001 11:57 AM

                    Please respond to

                    ORACLE-L

 

 





Nightly?  That is a lot.  Are you really entering that much data on a daily
basis?
     -----Original Message-----
     From: David Wagoner [mailto:[EMAIL PROTECTED]]
     Sent: Thursday, September 06, 2001 8:57 AM
     To: Multiple recipients of list ORACLE-L
     Subject: Scripts for Rebuilding Indexes Nightly on Solaris

     Does anyone have any good scripts for rebuilding indexes nightly on
     Solaris UNIX that they'd be willing to share?  Also, in your
     experience is it better to run this through UNIX cron jobs than using
     the Oracle OEM job scheduler?  I suspect the cron job will be the
     favorable answer.


     Thanks in advance,


     David Wagoner
     Oracle DBA



--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author:
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: David Wagoner
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

Reply via email to