Skip to Main Content
  • Questions
  • ORAPWD file usage and its not using properly

Breadcrumb

Question and Answer

Connor McDonald

Thanks for the question, Hariharan.

Asked: October 21, 2016 - 1:07 pm UTC

Last updated: October 24, 2016 - 12:43 am UTC

Version: 11.2.0.3

Viewed 1000+ times

You Asked

Hi Tom,

I dont know below is fault or am i missing something in the architecture. Iam using orapwd file ,

-- When connecting from OS level password will be taken from this file
-- once i change / recreate the ORAPWD file its not working as expected.
-- Even if i use some different password also connecting which is not in orapwd file.


Test Case:

[dbs> ls -ltr orap*
-rw-r----- 1 grdbms grdbms 2560 Oct 4 16:21 orapwsb24Sb
-rw-r----- 1 grdbms grdbms 2560 Oct 12 12:24 orapwsb24Sc
-rw-r----- 1 grdbms grdbms 2560 Oct 18 11:28 orapwsb24Sa


[dbs> echo $ORACLE_SID
sb24Sc
[/dbs> sqlplus sys/change_on_install as sysdba


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options


SQL> exit



[celclnx1]/grdbms/64bit/app/oracle/product/c11204/dbs> sqlplus sys as sysdba


SQL*Plus: Release 11.2.0.4.0 Production on Thu Oct 20 19:05:19 2016


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


Enter password: >>>>>> Press Enter ( as a OS user of Oracle Binaries you can connect )


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options


SQL>


[celclnx1]/grdbms/64bit/app/oracle/product/c11204/dbs> mv orapwsb24Sc orapwsb24Sc_bkp
[celclnx1]/grdbms/64bit/app/oracle/product/c11204/dbs> orapwd FILE=orapwsb24Sc entries=5 password=welcome
[celclnx1]/grdbms/64bit/app/oracle/product/c11204/dbs> ls -ltr orap*
-rw-r----- 1 grdbms grdbms 2560 Oct 4 16:21 orapwsb24Sb
-rw-r----- 1 grdbms grdbms 2560 Oct 12 12:24 orapwsb24Sc_bkp
-rw-r----- 1 grdbms grdbms 2560 Oct 18 11:28 orapwsb24Sa
-rw-r----- 1 grdbms grdbms 2048 Oct 20 2016 orapwsb24Sc
[celclnx1]/grdbms/64bit/app/oracle/product/c11204/dbs>



[celclnx1]/grdbms/64bit/app/oracle/product/c11204/dbs> sqlplus sys/change_on_install as sysdba

QL*Plus: Release 11.2.0.4.0 Production on Thu Oct 20 19:08:06 2016
Copyright (c) 1982, 2013, Oracle. All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options


SQL>


[celclnx1]/grdbms/64bit/app/oracle/product/c11204/dbs> sqlplus sys/welcome as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Thu Oct 20 19:08:45 2016

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


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options


SQL>


[celclnx1]/grdbms/64bit/app/oracle/product/c11204/dbs> sqlplus sys/wwwwwwwww as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Thu Oct 20 19:09:09 2016

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


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options


[celclnx1]/grdbms/64bit/app/oracle/product/c11204/dbs> sqlplus sys/shekar as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Thu Oct 20 19:10:54 2016

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


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options


SQL>




12c:
+++++


[celclnx1]/grdbms/64bit/app/oracle/product/c12102/dbs> echo $ORACLE_SID
sc12Sa
[celclnx1]/grdbms/64bit/app/oracle/product/c12102/dbs> sqlplus sys/shekar as sysdba ------------------- Just give any password it will connect

SQL*Plus: Release 12.1.0.2.0 Production on Thu Oct 20 19:15:54 2016


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


Connected to an idle instance.


SQL> startup
ORACLE instance started.


Total System Global Area 612368384 bytes
Fixed Size 2927336 bytes
Variable Size 306185496 bytes
Database Buffers 297795584 bytes
Redo Buffers 5459968 bytes
Database mounted.
Database opened.
SQL>





Thanks,

and Connor said...

sysdba is special, because (on the database server) it will respect OS accounts that are in the appropriate group (eg dba). OS user accounts *not* in that group will need to get the password correct.

Some older asktom posts show some good examples of how this works:

https://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:52261686418590

https://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:1792735500346727875

https://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:670117794561

Hope this helps.

Rating

  (1 rating)

Is this answer out of date? If it is, please let us know via a Comment

Comments

Thanks,

Hariharan Senthil pandiyan, October 22, 2016 - 5:41 pm UTC

Useful Links. Thanks for Sharing
Connor McDonald
October 24, 2016 - 12:43 am UTC

glad we could help

More to Explore

VLDB

If you are new to partitioning, check out Connor McDonald's introduction series here.

VLDB

Documentation set on VLDB and Partitioning.