How to set sysdba password in Oracle 11G - oracle

I tried to connect to database using sqlplus using below command :
sqlplus / as sysdba
I have used the same password that I had set while creating database and setting password for sys and sysdba. But it shows below error :
ORA-01017: invalid username/password; logon denied
How to connect to the database?
I have installed Oracle DB in local PC with Windows 10 as Operating System and administrator privileges.

Log on to your Windows server as a member of the Administrators group or a member of the ORA_DBA group.
Try the below steps
sqlplus /nolog
connect / as sysdba
Once connected, you can change the SYS password to something you know:
ALTER USER sys IDENTIFIED BY new_password;

Related

Why is the command conn / as sysdba throwing an error in sqlplus?

Enter user-name: conn / as sysdba
Enter password:
ERROR:
ORA-01017: invalid username/password; logon denied
The special string / as sysdba tells Oracle to use OS Authentication instead of a username/password. Your OS (looks like Windows) is not authorizing you to connect to Oracle as sysdba.
Make sure your Windows user is a member of the ORA_DBA local group on that computer.

How to connect to oracle with sys and sysdba correctly?

I want to connect to oracle as sys user with sysdba privil..
How can I do it using easy connection
I am doing so:
sqlplus sys/password#server:1521/orcl as sysdba
and getting error:
ORA-01017: invalid username/password; logon denied
Is it correct syntax?
Thanks.
You are trying to connect remotely as sysdba (port 1521 in your case). Connecting as sysdba from a remote location (over tcp or tcps) requires some extra steps:
Set the database parameter REMOTE_LOGIN_PASSWORDFILE = { shared | exclusive | none }.It should be set tp shared/exclusive.
Check your password file under $ORACLE_HOME/dbs/, which is being used for authentication when users login to the database as a sysdba. If the password file does not exist then create a new one (using orapwd) and set the password.

Unable to log in to database as SYS with Oracle SQL Developer

I've worked with Oracle for some time but very much a noob with the Admin side of things and am learning, so bear with me.
I cannot log on to my database (orcl_test) with SQL Developer with the SYS username. I can log on just fine in SQLPlus with SYS as SYSDBA - when I try with SQL Developer I get an error:
ORA-01017: invalid username/password; logon denied.
Logging on as SYS as SYSDBA in SQLPlus, I created a test table within the database and granted the test user SCOTT with SELECT permissions. The Scott user can log on through SQL Developer w/o problem and access the allowed tables.
I have checked that the Scott user and SYS are logging in using the same settings -
Hostname: (ip address)
Port: 1521
SID: orcl_test
For SYS I flag the role SYSDBA - but otherwise the settings are the same.
Any thoughts on why I can't log on using SYS? Am I just overlooking something or have I configured my db incorrectly?
Not sure if this is relevant but I cannot use 'localhost' for the hostname, I have to enter the IP address. Where do I configure Oracle to recognize localhost?
This is a new installation of Oracle 11.2.0.1.0 on a standalone test box running Windows XP. Running Oracle SQL Developer 1.5.5.
From the The SYSDBA System Privilege and (Logging In and Connecting to the Database as SYSDBA:
1--Connecting AS SYSDBA invokes the SYSDBA privilege. If you omit the AS
SYSDBA clause when logging in as user SYS, the SQL Command Line
rejects the login attempt.
2--Using SQL Developer, open a database connection to the SYS user AS SYSDBA.
So - if this works for you:
sqlplus sys/Oracle_1#pdborcl as sysdba;
Try: "SYS AS SYSDBA" as below:
Alternatively:
you can type in: "SYS" and select from dropdown-menu ROLE: SYSDBA.
If I understand correctly the database is on the same host as the SQL Developer installation? Are you fully qualifying the connection when testing with SQLPlus:
sqlplus "sys/password#database as sysdba"
It may be the case that the error is correct. Make sure you've created a password file.
The sys password that you are using is not valid.
But because you are connecting to oracle by command on an Oracle machine, Oracle does not check your password even though your password is not right.
Just change the sys password and try again.
su - oracle
orapwd file=$ORACLE_HOME/dbs/orapw$ORACLE_SID password=Euro2016 entries=5
which means: write to a file $ORACLE_HOME/dbs/orapw$ORACLE_SID a password Euro2016 which is used by SYSDBA
Now you can connect with sqldeveloper: username sys, password Euro2016 with chosen SYSDBA , hostname, port, sid from $ORACLE_SID

cant connect to oracle - ora-01017

i installed Oracle 11.2.0 64bit & Oracle SQL developer 2.1.1.64 on Windows-7 64bit
i try to connect to database like this:
username: scott
password: tiger
role : sysdba
hostname: localhost
port : 1521
sid : ORCL
and i got this error: ora-01017 invalid username/password; logon denied
what can be the problem ? what to check ?
thanks in advance
11g allows for case-sensitive passwords, so firstly check the password TIGER (and maybe Tiger)
since the database is on your local machine, easiest is to connect to it using os authentication and reset the password to a known value and then use that to connect using the tool you want. On windows you can do this in the *nix style. First find where your oracle rdbms installation is located and assign that value to the ORACLE_HOME environment variable. Use the commandline tool.
ORACLE_HOME=d:\somwehere\on\your\disk
PATH=%ORACLE_HOME%\bin
ORACLE_SID=ORCL
sqlplus "/ as sysdba"
alter user scott identified by koffie;
(make sure you remember the password this time, including case as since 11g passwords are case sensitive.) sqlplus should be in %ORACLE_HOME%\bin. Check this before.
I hope this helps.
Is the account unlocked? As a privileged (SYS account) try running:
SELECT USERNAME, ACCOUNT_STATUS
FROM DBA_USERS
WHERE USERNAME = 'SCOTT';
If the account is locked, try:
ALTER USER SCOTT ACCOUNT UNLOCK;
Also it appears you are trying to connect to the database as SYSDBA using the SCOTT account. I believe by default this schema lacks the necessary account privileges. Try logging in as SCOTT/TIGER connecting as "normal", not "sysdba".
-CJ
Use:
orapwd file=$ORACLE_HOME/dbs/orapw$ORACLE_SID password=Euro2016 entries=5
grant sysdba to scott;
Now you can connect...

ORA-12638 Credential retrieval failed and ORA-01031: insufficient privileges

in sqlnet.ora file:
when i have SQLNET.AUTHENTICATION_SERVICES= (NTS)
i can't connect by PL/SQL developer arises "ORA-12638 Credential retrieval failed"
,but can connect by command line
when i have SQLNET.AUTHENTICATION_SERVICES= (NONE)
i can't connect
>sqlplus / as sysdba
arises "ORA-01031: insufficient privileges"
,but can connect by PL/SQL developer and command line when i supply username and password
I was facing the exact same issue.
When I made the change to
SQLNET.AUTHENTICATION_SERVICES= (NONE) to resolve the ORA-12638 Credential retrieval failed.
I was then unable to connect with the sysdba privilege.
ORA-01031: insufficient privileges when sqlplus / as sysdba
The Solution:
I was able to find out, I could still connect as sysdba with the following command:
From within sqlplus:
connect sys as sysdba
From command line:
sqlplus sys as sysdba
In both cases, you will be prompted for your password. The password will be the same as your password that you setup for the SYSTEM user during the windows Oracle install.
Now you are connected with the sysdba rights you were trying to get with sqlplus / as sysdba.
The server administrator may not have setup NTS authentication on the database. You can't simply ask for your credentials to be authenticated by NTS in your client SQLNET.ORA file without agreement on the server side.

Resources