Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

When loging in to sqlplus as SYSTEM, why does the login fail with an invalid username/password error if I do not include "AS SYSDBA"

C:\Windows\System32>sqlplus /nolog

SQL*Plus: Release 11.2.0.1.0 Production on Mon Dec 16 01:00:13 2013

Copyright (c) 1982, 2010, Oracle.  All rights reserved.

SQL> conn system/password
ERROR: ORA-01017: invalid username/password; logon denied


SQL> conn system/password as sysdba
Connected.
SQL>

I have a script that I need to run locally. This script runs fine on other machines, but fails with the error above for me.

share|improve this question

1 Answer 1

up vote 4 down vote accepted

Because you are not logged in as the user system. When you execute conn system/password as sysdba, Oracle won't even check the user and password (--> from the local systeem where the db is running on). If you enter the system/password as sysdba and then execute 'show user', you'll notice you are logged in as user 'SYS'. So you are actually entering the wrong password when you execute the conn system/password, Oracle doest not lie.

Check http://docs.oracle.com/cd/B28359_01/server.111/b28310/dba006.htm#ADMIN11046 for more information. Because what I told you is not the whole story.

share|improve this answer
    
Thanks! This was very helpful and the link provided much insight into the problem. –  BamaPookie Dec 16 '13 at 16:00

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.