- 论坛徽章:
- 0
|
s -s <<!
set term off verify off feedback off echo off
set head off
spool index.tmp1
select INDEX_NAME from dba_indexes where OWNER='HDARUN';
spool off
!
sleep 1
cat index.tmp1 | grep -v "SQL> " | grep -v spool | grep -v "^$" index.tmp1 | grep -v 'SQL>' > index.tmp
cat /dev/null > createindex.sql
while read LINE
do
s -s <<! >>createindex.sql
set term off verify off feedback off echo off
set head off
set long 999999
set linesize 200
select dbms_metadata.get_ddl('INDEX','$LINE','HDARUN') from dual;
!
done < index.tmp
SQL*Plus: Release 10.2.0.4.0 - Production on Fri Jul 22 09:43:22 2011
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> SQL> SQL> SQL> SQL>
CREATE INDEX "HDARUN"."IND_INFO_IND" ON "HDARUN"."IND_INFO" ("CUSTOMERID")
PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
TABLESPACE "INDX"
怎么把
SQL*Plus: Release 10.2.0.4.0 - Production on Fri Jul 22 09:43:22 2011
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> SQL> SQL> SQL> SQL
这些东西过滤掉 谢谢!!!!!! |
|