by http://webgeektutorials.blogspot.com

Monday, May 14, 2012

Oracle DBA Script : Find out duplicate records in a Table

Code: 

SELECT primary_key FROM table_name
MINUS
(
SELECT DISTINCT primary_key
FROM table_name
)

You can also use * instead of the primary_key.
18. Description: This Script will help you to find out which Database you are presently
Connected to? If You are working on multiple Databases on different Servers using SQL*Net or Net8.
Code:
select distinct A.name DATABASE,
B.machine SERVER
from V$database A, V$session B
where b.username is null
/

No comments:

Post a Comment