- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- oracle - copy index from one schema to another
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-07-2007 05:23 AM
тАО09-07-2007 05:23 AM
this is what I have done so far ...
create table <<
I need know how to copy the indexes over from my old schema to the new one (in a script)
thank you
Steve
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-07-2007 07:56 AM
тАО09-07-2007 07:56 AM
Solution- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-07-2007 08:16 AM
тАО09-07-2007 08:16 AM
Re: oracle - copy index from one schema to another
Idealy you simply have the defintion script handy.
You could have copied data + index using an export + import.
You can still use export with parameters ROWS=N, INDEXES=Y, to just get index definitions to a file.
I believe the official way it to use GET_DDL from the metadata package.
Something like
select DBMS_METADATA.GET_DDL('INDEX','DEPT_INDEX_1') from DUAL;
:
CREATE INDEX "schema".DEPT_INDEX_1" ON "schema"."DEPT" ...
One you have the text... execute it!
Hope this helps some,
Hein van den Heuvel (at gmail dot com)
HvdH Performance Consulting
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-07-2007 11:24 AM
тАО09-07-2007 11:24 AM
Re: oracle - copy index from one schema to another
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-08-2007 11:17 PM
тАО09-08-2007 11:17 PM
Re: oracle - copy index from one schema to another
no a RE-Create (or rebuild) will do this for the index on the old table.
You need to create a new index that indexes the new table!
It is psooible to create an index in the new schema, that indexes the old table, so use Heins approach an change the schema-user for the index AND the table to do the copy!
Volker
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-10-2007 04:09 AM
тАО09-10-2007 04:09 AM