Indexes Difference [message #142761] |
Mon, 17 October 2005 10:30 |
feroze
Messages: 144 Registered: September 2005 Location: chicago
|
Senior Member |
|
|
Hi All
I have 2 databases TEST and QA, list of tables are same in both the databases,I want to compare the indexes in these 2 databases and send the output to excel file,
Let's say index1 is present in database TEST and not in QA..
Some good approach or script is requested.
Regards
|
|
|
|
Re: Indexes Difference [message #142768 is a reply to message #142766] |
Mon, 17 October 2005 11:28 |
feroze
Messages: 144 Registered: September 2005 Location: chicago
|
Senior Member |
|
|
Hi Mahesh
Thanks for your response.
You want me to create a link between Test and QA databases to run your code,Thing is Sir i don't have permission to create a link, another thing is as you said assuming indexes names should be same, Well that's what i want to compare between databases is which indexes are there in TEST and Not in QA and vice versa.. Hope i am able clear the question..
Thanks
|
|
|
|
Re: Indexes Difference [message #143177 is a reply to message #142772] |
Wed, 19 October 2005 07:05 |
ziggy
Messages: 27 Registered: July 2005 Location: Moscow, Russia
|
Junior Member |
|
|
As far as I know there are a lot of high level tools such as ErWin which would compare two database's physical model.
If such way is not enough easy for you then try such algorithm as follows.
1. First database and etalon schema
create table my_indexes
as
select *
from user_indexes;
Then export table my_indexes from etalon schema.
2. Second database and compared schema
Import given table my_indexes into compared schema.
Then use queries like Mahesh offers:
prompt Compare current schema with etalon
select table_name, index_name
from user_indexes
minus
select table_name, index_name
from my_indexes;
prompt And vice versa as you'll want
select table_name, index_name
from user_indexes
minus
select table_name, index_name
from my_indexes;
Regards,
Ziggy.
|
|
|