在安装Oracle数据库的PL/SQL工具时候,电脑名称是重装系统后自动生成的用户名名称,作为程序员,有很强的强迫症,就想利用自己的英文名称作为自己电脑的名称,所以就修改了电脑的名称;结果PL/SQL数据库可视化工具就不能打开了;下面是修改电脑用户名后需要修改Oracle数据库相关数据的步骤:
修改过后出现这样的问题:
Windows不能在本地计算机启动OracleDBConsoleorcl
解决的步骤:
1、开始-》运行cmd
2、执行 emctl start dbconsole
C:Documents and Settingsxcl>emctl start dbconsole
Environment variable ORACLE_SID not defined. Please define it.
提示:环境变量 ORACLE_SID 未定义,请定义。
3、设置 ORACLE_SID =ORCL (orcl是我的实例名,也是服务名)
C:Documents and Settingsxcl>set oracle_sid=orcl
4、再次执行emctl start dbconsole
C:Documents and Settingsxcl>emctl start dbconsole
OC4J Configuration issue. E:oracleproduct10.2.0db_1/oc4j/j2ee/OC4J_DBConsole_china-d9e3f7d07_orcl not found.
提示:无法找到"E:oracleproduct10.2.0db_1/oc4j/j2ee/OC4J_DBConsole_china-d9e3f7d07_orcl "
注:china-d9e3f7d07 是我的计算机名
复制该目录下的"OC4J_DBConsole_localhost_orcl"文件夹放在同一目录下,且把名称改成"OC4J_DBConsole_china-d9e3f7d07_orcl"。
5、再次执行emctl start dbconsole
C:Documents and Settingsxcl>emctl start dbconsole
EM Configuration issue. E:oracleproduct10.2.0db_1/china-d9e3f7d07_orcl not found.
提示:无法找到 "E:oracleproduct10.2.0db_1/china-d9e3f7d07_orcl "
复制该目录下的"localhost_orcl"文件夹放在同一目录下,且把名称改成"china-d9e3f7d07_orcl"。
6、再次执行emctl start dbconsole
C:Documents and Settingsxcl>emctl start dbconsole
Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0
Copyright (c) 1996, 2006 Oracle Corporation. All rights reserved.
http://localhost:1158/em/
Starting Oracle Enterprise Manager 10g Database Control ...OracleDBConsoleorcl
服务正在启动
..............................
OracleDBConsoleorcl 服务已经启动成功