In the Oracle database system, if you want to log on to the Oracle database as a privileged user (SYSDBA/SYSOPER), there are two authentication methods: use and operation.
In the Oracle database system, if you want to log on to the Oracle database as a privileged user (SYSDBA/SYSOPER), there are two authentication methods: use and operation.
Symptom:
[Root @ db1 ~] # Id root
Uid = 0 (root) gid = 0 (root) groups = 0 (root), 1 (bin), 2 (daemon), 3 (sys), 4 (adm ), 6 (disk), 10 (wheel)
// The Oralce user permission belongs to the dba group and can be logged into the database as an OS.
[Root @ db1 ~] # Id Oracle
Uid = 110 (oracle) gid = 110 (oinstall) groups = 110 (oinstall), 111 (dba)
// The root user permission belongs to the dba group and cannot log on to the database as the OS.
[Oracle @ db1 ~] $ Sqlplus sys @ zddb1 as sysdba
SQL * Plus: Release 10.2.0.4.0-Production on Fri May 29 10:18:17 2009
Copyright (c) 1982,200 7, Oracle. All Rights Reserved.
Enter password:
Connected:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0-Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
And Real Application Testing options
SQL> show parameter instance_name
NAME TYPE VALUE
-----------------------------------------------------------------------------
Instance_name string zddb1
SQL>
[Oracle @ db1 ~] $ Ps-ef | grep ora _
Oracle 11821 1 0? 00:00:00 ora_q002_zddb1
Oracle 17047 1 0 May27? 00:00:13 ora_j002_zddb1
Oracle 17935 1 0 May28? 00:00:01 ora_j0020.zddb1
Oracle 18755 1 0 May28? 00:00:00 ora_pz98_zddb1
Oracle 20089 1 0 May27? 00:00:01 ora_pmon_zddb1
Oracle 20091 1 0 May27? 00:00:00 ora_diag_zddb1
Oracle 20093 1 0 May27? 00:00:00 ora_psp0_zddb1
Oracle 20095 1 0 May27? 00:00:03 ora_lmon_zddb1
Oracle 20097 1 0 May27? 00:00:09 ora_lmd0_zddb1
Oracle 20100 1 0 May27? 00:00:11 ora_lms0_zddb1
Oracle 20104 1 0 May27? 00:00:13 ora_lms1_zddb1
Oracle 20108 1 0 May27? 00:00:00 ora_mman_zddb1
Oracle 20110 1 0 May27? 00:00:04 ora_dbw0_zddb1
Oracle 20112 1 0 May27? 00:00:06 ora_lgwr_zddb1
Oracle 20114 1 0 May27? 00:00:16 ora_ckpt_zddb1
Oracle 20116 1 0 May27? 00:00:05 ora_smon_zddb1
Oracle 20118 1 0 May27? 00:00:00 ora_reco_zddb1
Oracle 20120 1 0 May27? 00:00:41 ora_cjq0_zddb1
Oracle 20122 1 0 May27? 00:00:10 ora_mmon_zddb1
Oracle 20124 1 0 May27? 00:00:11 ora_mmnl_zddb1
Oracle 20126 1 0 May27? 00:00:00 ora_d000_zddb1
Oracle 20128 1 0 May27? 00:00:00 ora_s000_zddb1
Oracle 20137 1 0 May27? 00:00:09 ora_lck0_zddb1
Oracle 20201 1 0 May27? 00:00:00 ora_arc0_zddb1
Oracle 20203 1 0 May27? 00:00:01 ora_arcw.zddb1
Oracle 20229 1 0 May27? 00:00:22 ora_pz99_zddb1
Oracle 20265 1 0 May27? 00:00:00 ora_qmnc_zddb1
Oracle 20301 1 0 May27? 00:00:47 ora_j000_zddb1
Oracle 20404 1 0 May27? 00:00:06 ora_q000_zddb1
Oracle 24015 23925 0 00:00:00 pts/5 grep ora _
[Oracle @ db1 ~] $
// The database runs normally and can be normally connected through Listeners.
[Root @ db1 ~] # Export ORACLE_HOME =/u01/app/oracle/product/10.2.0/db_1/
[Root @ db1 ~] # Export ORACLE_SID = zddb1
[Root @ db1 ~] # Sqlplus
-Bash: sqlplus: command not found
[Root @ db1 ~] #/U01/app/oracle/product/10.2.0/db_1/bin/sqlplus "/as sysdba"
SQL * Plus: Release 10.2.0.4.0-Production on Fri May 29 09:58:12 2009
Copyright (c) 1982,200 7, Oracle. All Rights Reserved.
ERROR:
ORA-01031: insufficient privileges
Enter user-name:
ERROR:
ORA-01017: invalid username/password; logon denied
// The Connection result of the root user is normal.
[Root @ db1 ~] # Su-oracle
[Oracle @ db1 ~] $ Export ORACLE_SID = zddb1
[Oracle @ db1 ~] $ Export ORACLE_HOME =/u01/app/oracle/product/10.2.0/db_1/
[Oracle @ db1 ~] $/U01/app/oracle/product/10.2.0/db_1/bin/sqlplus "/as sysdba"
SQL * Plus: Release 10.2.0.4.0-Production on Fri May 29 09:59:03 2009
Copyright (c) 1982,200 7, Oracle. All Rights Reserved.
Connected to an idle instance.
SQL>
// The Oracle user connection result is incorrect.
Problem Analysis:
In the Oracle database system, if you want to log on to the Oracle database as a privileged user (SYSDBA/SYSOPER), there are two authentication methods: that is, authentication is performed using the Integrated Identity Authentication with the operating system or using the password file of the Oracle database. Because the root user is not in the dba group and has insufficient permissions, the result is normal. However, Oracle users should be able to log on to the database as sysdba, but the result is: "Connected to an idle instance. you cannot log on to the database. However, from the operating system, you can use the network connection method to connect. It is strange that the tnsnames. ora configuration error is ruled out.
An error occurred while setting the environment variables.
[Oracle @ db1 ~] $ Cat. bash_profile
#. Bash_profile # Get the aliases and functions
If [-f ~ /. Bashrc]; then
.~ /. Bashrc
Fi
# User specific environment and startup programs
PATH = $ PATH: $ HOME/bin
Export ORACLE_BASE =/u01/app/oracle/
Export ORACLE_HOME = $ ORACLE_BASE/product/10.2.0/db_1
Export ORA_CRS_HOME = $ ORACLE_BASE/product/10.2.0/crs_1
Export ORACLE_SID = zddb1export PATH = $ ORACLE_HOME/bin: $ ORA_CRS_HOME/bin: $ PATH: $ HOME/bin
Processing process and result:
If "/" is added after the ORACLE_BASE environment variable, will it be caused by this problem? Reset this variable to "export ORACLE_BASE =/u01/app/oracle", delete "/", log on to the database, and the connection is normal.
I hope this article will help you.
Thank you .
Question:
Although the problem has been solved, I don't understand why the "/" symbol affects the database connection, because he cannot find the database initialization parameter? Or database bug?