I have installed Oracle 12c (software only in Linux) and created a non-CDB database (single tenant) database. Following is my listener.ora.
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = ora12cl)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)
SID_LIST_LISTENER=
(SID_LIST=
(SID_DESC=
(SID_NAME=orcl)
(GLOBAL_DBNAME=orcl)
)
)
This is my tnsnames.ora
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = ora12cl)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SID = orcl)
)
)
Here is my initorcl.ora
db_name=orcl
db_block_size=8192
memory_target=300M
memory_max_target=300M
processes=200
job_queue_processes=10
open_cursors=500
fast_start_mttr_target=500
undo_management=AUTO
undo_tablespace=UNDOTBS1
I am able to startup and mount the database successfully. I can connect to it
[oracle@ora12cl dbs]$ sqlplus sys/***** as sysdba
SQL*Plus: Release 12.1.0.2.0 Production on Tue May 10 23:53:18 2016
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
SQL>
But if I try to connect using the instance (as I should from a remote system such as my Windows host):
[oracle@ora12cl dbs]$ sqlplus sys/dolan123 as sysdba
SQL*Plus: Release 12.1.0.2.0 Production on Tue May 10 23:53:18 2016
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
[oracle@ora12cl dbs]$ sqlplus sys/******@orcl as sysdba
SQL*Plus: Release 12.1.0.2.0 Production on Tue May 10 23:54:47 2016
Copyright (c) 1982, 2014, Oracle. All rights reserved.
ERROR:
ORA-01017: invalid username/password; logon denied
I am getting ORA-01017.
I see no reason why should not able to login using the instance name. Note it's a non-CDB database.
[oracle@ora12cl dbs]$ sqlplus / as sysdba
SQL*Plus: Release 12.1.0.2.0 Production on Tue May 10 23:56:43 2016
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
SQL> select name, cdb from v$database;
NAME CDB
--------- ---
ORCL NO
Can anyone help on this please?
Best Answer
Remote (through listener) SYSDBA authentication requies a passwordfile.
Make sure
remote_login_passwordfile
is set toEXCLUSIVE
orSHARED
.Create the password file at
${ORACLE_HOME}/dbs/orapw${ORACLE_SID}
as:orapwd file=${ORACLE_HOME}/dbs/orapw${ORACLE_SID}
This will prompt for a password, then it will create the password file. After that, you can log in remotely as SYSDBA.
PS:
This version uses OS authentication:
As long as you try connecting locally as SYSDBA with a user that is member of the
OSDBA
group (defined at install time, typicallydba
), you can type any password, because you will be authenticated based on your group membership, not the password. Successfully logging in with the above does not necessarily means that the SYS password is dolan123.