我在Windows 2008 R2 Server上安装了Oracle 11G。我还使用单独的安装介质安装了Oracle Client Libraries。客户端安装后,当我尝试使用以下方法登录数据库时:
C:\>sqlplus / as sysdba
我收到以下错误:
ORA-01031:权限不足
这在客户端安装之前有效。我的帐户在ORA_DBA
群组中。我的帐户也位于管理员组中。ORACLE_SID
我的环境变量列表中没有设置。一定要吗?这在客户端安装之前有效,当时我也没有该变量。
UAC处于最低级别,我始终cmd
以管理员身份运行。
我sqlnet.ora
在文件夹中有一个像这样的文件:
C:\app\myaccount\product\11.2.0\dbhome_1\NETWORK\ADMIN
sqlnet.ora
# sqlnet.ora Network Configuration File: C:\app\myaccount\product\11.2.0\dbhome_1\network\admin\sqlnet.ora
# Generated by Oracle configuration tools.
# This file is actually generated by netca. But if customers choose to
# install "Software Only", this file wont exist and without the native
# authentication, they will not be able to connect to the database on NT.
SQLNET.AUTHENTICATION_SERVICES= (NTS)
NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
tnsnames.ora
# tnsnames.ora Network Configuration File: C:\app\myaccount\product\11.2.0\dbhome_1\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.
LISTENER_ORCL =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
)
)
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl.mydb.com)
)
)
listener.ora
# listener.ora Network Configuration File: C:\app\myaccount\product\11.2.0\dbhome_1\network\admin\listener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = C:\app\myaccount\product\11.2.0\dbhome_1)
(PROGRAM = extproc)
(ENVS = "EXTPROC_DLLS=ONLY:C:\app\myaccount\product\11.2.0\dbhome_1\bin\oraclr11.dll")
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
)
)
ADR_BASE_LISTENER = C:\app\myaccount
从Windows注册表(使用regedit),从路径中,Computer > HKEY_LOCAL_MACHINE > SOFTWARE > Wow6432Node > ORACLE
我可以找到两个键:
KEY_OraClient11g_home1
KEY_OraDb11g_home1
在这些键下,我可以找到ORACLE_HOME
变量。因此,似乎也生成了客户端安装,ORACLE_HOME
因此我现在有两个ORACLE_HOME
。我不知道这是否与这个问题有关?
如何在Windows计算机上解决此错误?