Home Database Mysql Tutorial 红旗Asianux3下Oracle 10g无法启动解决

红旗Asianux3下Oracle 10g无法启动解决

Jun 07, 2016 pm 04:57 PM
oracle

1. 上午接到咨询电话:Linux下Oracle无法启动。约定下午到现场尝试解决问题。2. 到现场后,了解基本情况如下:*.操作系统:Asian

关键词:红旗Asianux3 +Oracle 10g R2 for Linux x86-64

1. 上午接到咨询电话:Linux下Oracle无法启动。约定下午到现场尝试解决问题。

2. 到现场后,了解基本情况如下:

*.操作系统:Asianux3

*.数据库:Oracle 10g R2 for Linux x86-64

*.问题表现:服务器搬到新机房后,之前已装好的Oracle数据库无法正常使用,客户端连接时报监听错误。

3. 问题在前几天已经发现。

待到现场后,,发现服务器上listener.ora、sqlnet.ora、tnsnames.ora这三个文件已被修改的面目全非。

尝试一个一个还原。

4. 上述文件修改还原后,Oracle的dbconsole仍无法启动。

使用emctl status dbconsole 或e mctl start dbconsole命令,均有报错:

-----------

OC4J Configuration issue.

/opt/app/oracle/product/10.2.0/db_1/oc4j/j2ee/OC4J_DBConsole_localhost_orcl not found.

-----------

5. 因是正在装修的新办公大楼,新机房还未连上外界网络。无法使用笔记本上网查询问题,只好用手机代劳。

一般是因修改Oracle绑定的服务器的机器名,造成无法启动Oracle服务。

但此服务器在搬迁后只做了IP地址修改,并未对机器名做修改。

一时困惑,无解。

6. 系统目前正在测试部署中,数据库中还无任何数据。

征得同意后,决定重装Oracle。

7. 卸载Oracle后,使用Oranavi做全新安装。

前段安装比较顺利。在环境检测阶段网络设备报了一个“未执行”,忽略,继续。

当创建数据库实例进行到74%时,出现异常:

-----------

参数PORT的值null无效

请参阅/opt/app/oracle/product/10.2.0/db_1/cfgtoollogs/dbca/orcl/emConfig.log中的日志文件。

-----------

此数据库实例安装失败。确定后,继续完成Oracle的安装。

安装完毕后,发现tnsnames.ora中原本应是1521的端口,写着“null”:PORT = null。

8. 怀疑1521端口被占用。或者某配置文件或Oracle用户的环境变量中未明确指定1521端口。

折腾。

一圈下来后,没有发现任何有价值线索。

无奈,用dbca单独建立第二个数据库实例,做测试安装。

同样的问题,在创建数据库实例到74%时,抛出异常:参数PORT的值null无效。

9. 囿于环境。继续用手机上网搜索查找问题。

终于发现2个多月前,有人遇到相似问题。提到在/etc/hosts文件中主机IP配置可能有问题。

于是,打开/etc/hosts文件中查看。

果然,除了127.0.0.1的IP外,在/etc/hosts文件中还设置绑定了一个在服务器搬迁之前的旧主机IP。

10. 修改为现在的正确IP后,卸载已安装的Oracle数据库。

重新安装至完毕,一切OK!

在环境检测阶段也无任何异常,全部通过。

11. 这是第一次使用Asianux操作系统。不知/etc/hosts在系统安装时,默认的主机配置是如何写的。

打开RedFlag Linux,发现默认情况下,/etc/hosts中只有一行:

-----------

127.0.0.1   localhost.localdomain localhost

-----------

此配置使用设置127.0.0.1为HostIP,并无与系统真实的IP做任何绑定,可修改IP地址而Oracle服务器不会受任何影响。

而在Asianux中,/etc/hosts中出现了多个主机IP。

显然,是因修改了服务器的IP而导致Oralce服务受到影响。修改服务器IP的同时,也需同步修改/etc/hosts文件中所使用的主机IP。

(还未得知此前该主机的旧IP是否为系统安装后手工添加的,或与Asianux操作系统有关?需待确认和验证。)

12. 在linux下,/etc/host是是主机名和IP配置文件。

/etc/hosts文件中可配置如下类似内容:

-----------

127.0.0.1 localhost.localdomain localhost

192.168.1.100 linuxserver.com linuxserver

192.168.1.120 ftpserver ftp120

-----------

通常,hosts文件中每行文字代表一个主机配置信息。

每行文字由三部份组成,每部份由空格隔开:

第一部份:网络IP地址

第二部份:主机名或域名

第三部份:主机名别名

另,每行文字也可为两部份,即主机IP地址和主机名,如:192.168.1.100 linuxServer。

显示主机名和主机IP的命令:

# hostname

# hostname -i

By JRQ

2010/07/10 于南昌

linux

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

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

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Hot Topics

Java Tutorial
1658
14
PHP Tutorial
1257
29
C# Tutorial
1231
24
What to do if the oracle can't be opened What to do if the oracle can't be opened Apr 11, 2025 pm 10:06 PM

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.

How to solve the problem of closing oracle cursor How to solve the problem of closing oracle cursor Apr 11, 2025 pm 10:18 PM

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.

How to create cursors in oracle loop How to create cursors in oracle loop Apr 12, 2025 am 06:18 AM

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.

What to do if the oracle log is full What to do if the oracle log is full Apr 12, 2025 am 06:09 AM

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's Role in the Business World Oracle's Role in the Business World Apr 23, 2025 am 12:01 AM

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.

What steps are required to configure CentOS in HDFS What steps are required to configure CentOS in HDFS Apr 14, 2025 pm 06:42 PM

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

How to stop oracle database How to stop oracle database Apr 12, 2025 am 06:12 AM

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

How to create oracle dynamic sql How to create oracle dynamic sql Apr 12, 2025 am 06:06 AM

SQL statements can be created and executed based on runtime input by using Oracle's dynamic SQL. The steps include: preparing an empty string variable to store dynamically generated SQL statements. Use the EXECUTE IMMEDIATE or PREPARE statement to compile and execute dynamic SQL statements. Use bind variable to pass user input or other dynamic values ​​to dynamic SQL. Use EXECUTE IMMEDIATE or EXECUTE to execute dynamic SQL statements.

See all articles