请大虾看看我的LISNTNER与TNS文件配置是否正确,谢谢!
还有就是各项服务的启动都没有问题. ORACLE又做服务器又做客户端,出现错误后,不能用ALTER DATABASE OPEN打开,只能先
关闭数据库后再挂载后,才能用ALTER DATABASE OPEN打开,之后就可以阅读表了!
SQL> select * from tab;
select * from tab
*
ERROR at line 1:
ORA-01219: database not open: queries allowed on fixed tables/views
SQL> alter database open;
alter database open
*
ERROR at line 1:
ORA-01507: database not mounted
tnsnames.ora:
# tnsnames.ora Network Configuration File: D:\oracle\product\10.1.0\Db_1\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.
ZHEN =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = suselove)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = zhen)
)
)
TEST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = suselove)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = test)
)
)
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)
lisntner.ora文件:
# listener.ora Network Configuration File: D:\oracle\product\10.1.0\Db_1\network\admin\listener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = D:\oracle\product\10.1.0\Db_1)
(PROGRAM = extproc)
)
(SID_DESC =
(SID_NAME = test)
(ORACLE_HOME = D:\oracle\product\10.1.0\Db_1)
(GLOBAL_DBNAME= test)
)
(SID_DESC =
(SID_NAME = zhen)
(ORACLE_HOME = D:\oracle\product\10.1.0\Db_1)
(GLOBAL_DBNAME= zhen)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = suselove)(PORT = 1521))
)
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = suselove)(PORT = 1521))
)
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = suselove))
)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = suselove)(PORT = 1521))
)
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = suselove))
)
)
)
麻烦了,多谢!