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 于南昌

ACID attributes include atomicity, consistency, isolation and durability, and are the cornerstone of database design. 1. Atomicity ensures that the transaction is either completely successful or completely failed. 2. Consistency ensures that the database remains consistent before and after a transaction. 3. Isolation ensures that transactions do not interfere with each other. 4. Persistence ensures that data is permanently saved after transaction submission.

MySQL is not only a database management system (DBMS) but also closely related to programming languages. 1) As a DBMS, MySQL is used to store, organize and retrieve data, and optimizing indexes can improve query performance. 2) Combining SQL with programming languages, embedded in Python, using ORM tools such as SQLAlchemy can simplify operations. 3) Performance optimization includes indexing, querying, caching, library and table division and transaction management.

MySQL uses SQL commands to manage data. 1. Basic commands include SELECT, INSERT, UPDATE and DELETE. 2. Advanced usage involves JOIN, subquery and aggregate functions. 3. Common errors include syntax, logic and performance issues. 4. Optimization tips include using indexes, avoiding SELECT* and using LIMIT.

MySQL is an efficient relational database management system suitable for storing and managing data. Its advantages include high-performance queries, flexible transaction processing and rich data types. In practical applications, MySQL is often used in e-commerce platforms, social networks and content management systems, but attention should be paid to performance optimization, data security and scalability.

The relationship between SQL and MySQL is the relationship between standard languages and specific implementations. 1.SQL is a standard language used to manage and operate relational databases, allowing data addition, deletion, modification and query. 2.MySQL is a specific database management system that uses SQL as its operating language and provides efficient data storage and management.

InnoDB uses redologs and undologs to ensure data consistency and reliability. 1.redologs record data page modification to ensure crash recovery and transaction persistence. 2.undologs records the original data value and supports transaction rollback and MVCC.

Key metrics for EXPLAIN commands include type, key, rows, and Extra. 1) The type reflects the access type of the query. The higher the value, the higher the efficiency, such as const is better than ALL. 2) The key displays the index used, and NULL indicates no index. 3) rows estimates the number of scanned rows, affecting query performance. 4) Extra provides additional information, such as Usingfilesort prompts that it needs to be optimized.

Usingtemporary indicates that the need to create temporary tables in MySQL queries, which are commonly found in ORDERBY using DISTINCT, GROUPBY, or non-indexed columns. You can avoid the occurrence of indexes and rewrite queries and improve query performance. Specifically, when Usingtemporary appears in EXPLAIN output, it means that MySQL needs to create temporary tables to handle queries. This usually occurs when: 1) deduplication or grouping when using DISTINCT or GROUPBY; 2) sort when ORDERBY contains non-index columns; 3) use complex subquery or join operations. Optimization methods include: 1) ORDERBY and GROUPB


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

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

Dreamweaver Mac version
Visual web development tools

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.