以下文章是针对想用Windows2000建设网站,Oracle 9i/10g安装搭建数据库后台的新手,高手可绕开。具体安装步骤如下: 操作系统:windows2000 server 软件oracle9i+oracle10G102 步骤:(先装9i再装10g) 1、先安装oracle9i,完成后关闭所有服务。 2、安装oracle10G,安装的路径与9i路径不一致,完成。 3、重启系统(个人行为),修改oracle9i监听程序端口listener.ora(1522)并修改tnsnames.ora、snmp_ro.ora文件中的相关端口。
安装完9i后发现可以登录,但点击时出现“ORACLE不可用” 方法:sqlplus /nolog conn sys/sys as sysdba startup 执行以上命令后,就可以登入了
装完10G且修改好9i的监听程序端口后,进入9i同样出现“ORACLE不可用”,用一中的方法不行,执行tnsping orcl9i发现指向的10G的目录
方法一:我的电脑->属性->高级->环境变量->path;修改path值将”oracle9i\…\bin”放到”oracle10g\…\bin”前,重启系统再使用问题一的方法就可以了。
方法二:不修改path值,修改10g下的tnsnames.ora文件,将9i中的配置拷入10的tnsnames.ora,同样修改9i的tnsnames.ora文件。再使用命令启动9i数据库(修改后的tnsnames.ora文件见下面) sqlplus /nolog connsys/sys@orcl9ias sysdba startup
10G的tnsnames.ora ====================================================
ORCL10G = (DEscrīptION = (ADDRESS = (PROTOCOL = TCP)(HOST = xt-b271dac81b07)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl10g) ) ) ORCL9I = (DEscrīptION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = xt-b271dac81b07)(PORT = 1522)) ) (CONNECT_DATA = (SERVICE_NAME = ORCL9I) ) ) EXTPROC_CONNECTION_DATA = (DEscrīptION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1)) ) (CONNECT_DATA = (SID = PLSExtProc) (PRESENTATION = RO) ) )
====================================================
9i的tnsnames.ora ====================================================
ORCL10G = (DEscrīptION = (ADDRESS = (PROTOCOL = TCP)(HOST = xt-b271dac81b07)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl10g) ) ) ORCL9I = (DEscrīptION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = xt-b271dac81b07)(PORT = 1522)) ) (CONNECT_DATA = (SERVICE_NAME = ORCL9I) ) ) INST1_HTTP = (DEscrīptION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = xt-b271dac81b07)(PORT = 1522)) ) (CONNECT_DATA = (SERVER = SHARED) (SERVICE_NAME = MODOSE) (PRESENTATION =http://HRService) ) ) EXTPROC_CONNECTION_DATA = (DEscrīptION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0)) ) (CONNECT_DATA = (SID = PLSExtProc) (PRESENTATION = RO) ) )
如果感兴趣可以留意网站上相关的文章。