Wednesday, September 19, 2012

Connect as sys - When you use just " / "


When connecting as sys, you can use just " / " when:

- Your user account in Windows  belong to ora-dba group, and
-  On your sqlnet.ora, it should be setup:
 SQLNET.AUTHENTICATION_SERVICES = (NTS)
Now you can do:
C:\ SET ORACLE_SID=<My_Instance> 
C:\ sqlplus /nolog

SQL> connect / as sysdba

Archived Redo Logs - Who is making too many

Query to determine what user, suddenly, is making too many archived redo logs:
  SELECT s.sid, s.serial#, s.username, s.program, i.block_changes 
  FROM v$session s, v$sess_io i
      WHERE s.sid = i.sid   
      ORDER BY 5 desc, 1, 2, 3, 4
The one(s) that is(are) on top, are the guilty user(s).

Tuesday, September 18, 2012