Script: is the index in the TS it should be?
Date: 24 Aug 2001 01:28:43 -0700
Message-ID: <6407a841.0108240028.fec8fde_at_posting.google.com>
db: Oracle 8/8i, a SAP-environment
I got some new db's to administrate. Normally the indexes are in the
same
Please make a CC to spoele_at_commit.nl
Thanks,
Script I use:
set pagesize 200
spool SAP_indexTS_ne_dataTS.log
tablespace as the tables, except for the last letter ( z.b. a table is
in the TS PSAPBTABD and the indexes on this table are in PSAPBTABI).
However this is not the case in my new db's.
Does anyone have a SQL-script that can check if the indexes on a table
are
in the indextablespace the should be?
If have written a sql-sript myself wich runs for hours and with no
result. So
thats why this question.
Eric van der Spoel
rem Run by user SYSTEM or SYS
rem
Column index_name Format A15
Column tablespace_name Format A15
Column table_name Format A15
SELECT a.index_name ,
a.tablespace_name,
a.table_name ,
b.tablespace_name
FROM
DBA_INDEXES a,
DBA_TABLES b
WHERE a.owner = 'SAPR3'
AND a.table_name = b.table_name
AND (SUBSTR(a.tablespace_name,1,length(a.tablespace_name)-1) <>
SUBSTR(b.tablespace_name,1,length(b.tablespace_name)-1)) ORDER BY a.index_name;
spool off
exit Received on Fri Aug 24 2001 - 10:28:43 CEST