Oracle9i2 Enterprise Manager Console 无法连接数据库,提示信息:oracle.net.config.servicealiasexception: 10
很久没有使用OEM,今天启动了但是连接不上数据库。
cd>oemapp dbastudio
虽然启动了OEM,但是无法连接到数据库,提示错误:oracle.net.config.servicealiasexception: 10
这是由于修改了tnsnames.ora文件,在oracle安装目录下(D:\oracle\network\admin),找到:tnsnames.ora文件。
我拷贝了一个能启动的OEM的:tnsnames.ora文件,逐一对照,发现我的tnsnames.ora文件,在以前配置数据库的时候修改过。
参考了网上的文章(This indicates that there is an error in your tnsnames.ora file. If you open the file in a hex editor, you may see some invalid characters floating around-- deleting those might help. If that doesn't solve the problem, you can either grab a valid tnsnames.ora file from someone you
work with or you can recreate the file with the Net Configuration Assistant.
On Windows machines, I've seen this sort of thing happen with some regularity when people copy tnsnames entries from email into their tnsnames.ora files. Windows likes to use characters that look like spaces but aren't spaces, for example, which confuses the Oracle tnsnames.ora parser.
)
修改为正确的格式后,就能启动OEM