bibi92
asked on
script to compare number of lines on all tables between two schémas
Hello,
I search a script to compare number of lines on all tables between two schémas.
Thank you
Best regards
I search a script to compare number of lines on all tables between two schémas.
Thank you
Best regards
What do you mean by "number of lines"? Do you mean number of rows?
If you mean number of rows, you can use the SQL here:
https://www.experts-exchange.com/questions/24170132/List-tables-with-count-of-rows-in-Oracle-database.html?anchorAnswerId=23716743#a23716743
Just run it for each schema and diff the results.
https://www.experts-exchange.com/questions/24170132/List-tables-with-count-of-rows-in-Oracle-database.html?anchorAnswerId=23716743#a23716743
Just run it for each schema and diff the results.
Are your statistics up to date? If they are, the dictionary is an easy way to check.
SELECT owner1.table_name,
owner1.table,
owner1.num_rows,
owner2.num_rows
FROM dba_tables owner1
join dba_tables owner2
ON owner1.table_name = owner2.table_name
WHERE owner1.owner = 'USER1'
AND owner2.owner = 'USER2';
I just typed that free hand and didn't try it, but it should be close.
ASKER
Hello,
I mean number of rows. I try already the post of slightwv but the result is not correct formatted.
Thank you
Best regards
I mean number of rows. I try already the post of slightwv but the result is not correct formatted.
Thank you
Best regards
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.