In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
Today, I will talk to you about how to get the index creation statement in ORACLE, which may not be well understood by many people. In order to make you understand better, the editor has summarized the following content for you. I hope you can get something according to this article.
Set pagesize 0
Set long 90000
Set feedback off
Set echo off
Spool all_index.sql
SELECT DBMS_METADATA.GET_DDL ('INDEX',u.index_name)
FROM USER_INDEXES UtterSpool off; finally find an editor to replace the table space name, adding a
Then let ORACLE execute it slowly.
In fact, you can get a lot of things by calling the external procedure DBMS_METADATA.GET_DDL to create a DLL statement.
This is the creation DLL of all users.
SELECT DBMS_METADATA.GET_DDL ('USER',U.username)
FROM DBA_USERS U
This is the DLL of all the watches.
SELECT DBMS_METADATA.GET_DDL ('TABLE',u.table_name)
FROM USER_TABLES u
DLL for all tablespaces
SELECT DBMS_METADATA.GET_DDL ('TABLESPACE', TS.tablespace_name)
FROM DBA_TABLESPACES TS
Combine all the table and index stored procedures
SELECT DBMS_METADATA.GET_DDL (U.OBJECT_TYPE, u.object_name)
FROM USER_OBJECTS u
Where U.OBJECT_TYPE IN ('TABLE','INDEX','PROCEDURE'); another related statement generates a statement that deletes all indexes of a user
After reading the above, do you have any further understanding of how to get the index creation statement in ORACLE? If you want to know more knowledge or related content, please follow the industry information channel, thank you for your support.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.