【oracle案例】oracle EM和isqlplus 无法打开, JDK冲突
背景: 前些天安装了JDK,并设置了相应的环境变量。 JDK安装路径 C:/Program Files/Java/jdk1.6.0_25 JDK环境变量如下: JAVA_HOME=C:/Program Files/Java/jdk1.6.0_25 CLASSPATH=.;%JAVA_HOME%/lib/dt.jar;%JAVA_HOME%/lib/tools.jar PATH中添加java.exe,jav
背景:
前些天安装了JDK,并设置了相应的环境变量。
JDK安装路径 C:/Program Files/Java/jdk1.6.0_25
JDK环境变量如下:
JAVA_HOME=C:/Program Files/Java/jdk1.6.0_25
CLASSPATH=.;%JAVA_HOME%/lib/dt.jar;%JAVA_HOME%/lib/tools.jar
PATH中添加java.exe,javac.exe的路径,加入;%JAVA_HOME%/bin
预备知识
oracle自己也带有一个JDK,目录D:/oracle/product/10.2.0/db_1/jdk,在PATH环境变量中有这么一条路径D:/oracle/java/bin/ 这个是oracle自带的JDK路径
问题
Oracle的服务都可以正常启动,在用浏览器打开OracleEM和isqlplus的WEB界面时连接失败,在命令提示符下查看emctl状态,输入命令emctl status dbconsole ,结果失败,提示查看oracle日志。进入oracle日志文件夹,路径D:/oracle/product/10.2.0/db_1/主机名_SID/sysman/log文件夹,打开emdctl(oracle enterprise manager 10g database control)日志文件提示如下
2011-05-28 20:43:49 Thread-2544 WARN http: snmehl_connect: connect failed to (SUN-PC:3938): No connection could be made because the target machine actively refused it.
(error = 10061)
查看了日志文件知道是:目标主机主动拒绝连接。同时考虑到环境变量PATH含有oracle自带的JDK路径,而我却在环境变量中设置了JAVA_HOME=C:/Program Files/Java/jdk1.6.0_25,这将导致oracleEM和iSQLPLUS在读取配置文件的时候出现错误,即错误的去读取JAVA的JDK环境变量,而不是oracle自带的JDK的路径。 就是JAVA_HOME误导oracle读取错误的JDK路径。因此我们需要更改环境变量设置,让oracle能够正确的读取。
解决办法是更改JAVA的JDK环境变量设置,删掉JAVA_HOME,更改CLASSPATH=.;C:/Program Files/Java/jdk1.6.0_25/lib/dt.jar;C:/Program Files/Java/jdk1.6.0_25/lib/tools.jar 更改PATH中JDK路径为C:/Program Files/Java/jdk1.6.0_25/bin
经过这样的更改,oracleEM和iSQLPLUS就可以在浏览器上正常打开了。
参考文章 http://topic.csdn.net/u/20090222/20/0ff645fb-5a3f-430f-b0d0-f7519286c6f3.html 回帖里面lpc19598188提出了一种解决方法,试了一下,有一个设置提示错误,是因为文件路径问题,呵呵,这个没搞懂,电脑里面安装的东西有点乱……
PS:oracle自己带有一个JDK环境,在设置Java语言开发环境的JDK的时候,设置的JAVA_HOME导致oracle错误地读取了Java的JDK,即
读取了错误的路径导致EM无法正常打开。
解决并总结一个问题用了2个多小时,天啊!!!我要提高效率

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics











Solutions to Oracle cannot be opened include: 1. Start the database service; 2. Start the listener; 3. Check port conflicts; 4. Set environment variables correctly; 5. Make sure the firewall or antivirus software does not block the connection; 6. Check whether the server is closed; 7. Use RMAN to recover corrupt files; 8. Check whether the TNS service name is correct; 9. Check network connection; 10. Reinstall Oracle software.

The method to solve the Oracle cursor closure problem includes: explicitly closing the cursor using the CLOSE statement. Declare the cursor in the FOR UPDATE clause so that it automatically closes after the scope is ended. Declare the cursor in the USING clause so that it automatically closes when the associated PL/SQL variable is closed. Use exception handling to ensure that the cursor is closed in any exception situation. Use the connection pool to automatically close the cursor. Disable automatic submission and delay cursor closing.

In Oracle, the FOR LOOP loop can create cursors dynamically. The steps are: 1. Define the cursor type; 2. Create the loop; 3. Create the cursor dynamically; 4. Execute the cursor; 5. Close the cursor. Example: A cursor can be created cycle-by-circuit to display the names and salaries of the top 10 employees.

Oracle views can be exported through the EXP utility: Log in to the Oracle database. Start the EXP utility, specifying the view name and export directory. Enter export parameters, including target mode, file format, and tablespace. Start exporting. Verify the export using the impdp utility.

When Oracle log files are full, the following solutions can be adopted: 1) Clean old log files; 2) Increase the log file size; 3) Increase the log file group; 4) Set up automatic log management; 5) Reinitialize the database. Before implementing any solution, it is recommended to back up the database to prevent data loss.

Oracle is not only a database company, but also a leader in cloud computing and ERP systems. 1. Oracle provides comprehensive solutions from database to cloud services and ERP systems. 2. OracleCloud challenges AWS and Azure, providing IaaS, PaaS and SaaS services. 3. Oracle's ERP systems such as E-BusinessSuite and FusionApplications help enterprises optimize operations.

Building a Hadoop Distributed File System (HDFS) on a CentOS system requires multiple steps. This article provides a brief configuration guide. 1. Prepare to install JDK in the early stage: Install JavaDevelopmentKit (JDK) on all nodes, and the version must be compatible with Hadoop. The installation package can be downloaded from the Oracle official website. Environment variable configuration: Edit /etc/profile file, set Java and Hadoop environment variables, so that the system can find the installation path of JDK and Hadoop. 2. Security configuration: SSH password-free login to generate SSH key: Use the ssh-keygen command on each node

To stop an Oracle database, perform the following steps: 1. Connect to the database; 2. Shutdown immediately; 3. Shutdown abort completely.
