Saturday, January 4, 2014

Oracle: connect as sysdba without db user password

Oracle allows you connect as SYSDBA, if your Windows user is a member of  'ORA_sid_DBA' or 'ORA_DBA' group. Below are steps to do that:

1. Log in Windows as administrator

2. Check if your Windows has 'ORA_DBA' group. If not, let create it

3. Add your Windows user to 'ORA_DBA' group

4. Run TNSPING tool to check where SQLNET.ORA file is located, like the following:

C:\>tnsping orcl
 
TNS Ping Utility for 32-bit Windows: Version 10.2.0.4.0 - Production on 09-JUN-2009 14:50:20
 
Copyright (c) 1997,  2007, Oracle.  All rights reserved.
 
Used parameter files:
C:\oracle\product\10.2.0\db_1\NETWORK\ADMIN\sqlnet.ora


5. Add or remove comment for the following line:
SQLNET.AUTHENTICATION_SERVICES = (NTS)
6. Re-login Windows with the user mentioned above, try this line:
C:\>sqlplus / as sysdba
7. Then see if you can login successfully


Subscribe to RSS Feed Follow me on Twitter!