search
HomeDatabaseMysql TutorialORA-12547经典错误处理

ORA-12547错误处理 今天,领导告知我,让我帮一同事将Oracle安装下,他在安装的过程中出现了问题,报错,无法继续安装。 一

ORA-12547错误处理

今天,领导告知我,让我帮一同事将Oracle安装下,他在安装的过程中出现了问题,报错,无法继续安装。
     
一、由于NLS_LANG设置错误,导致ora-12547错误
我过去看了看,发现在AIX5.3系统中使用DBCA建库到最后一步点完成后立即就出现了ORA-12547 tns lost connect  这个错误,当时感觉挺蹊跷的,随后对系统的环境做了详细检查,异步IO是开启来的,HOST文件也是正常的,参数文件貌似也没有太大的问题,ulimit限制也都改成了-1; 也没有发现有明显的问题,安装日志里面是已经告诉说是操作系统环境不满足。当时实在是查不出来到底是什么原因导致就把之前安装的DBSOFT给删除了,重新进行DBSOFT的安装和建库,DBSOFT的安装中没有报任何错,到最好还是一样的问题,只好再次进行再次的检查,发现了在oracle用户环境配置文件里[db:oracle]$cat~/.profile里发现了NLS_LANG=ZHS16GBK这个参数,后面想想看这个参数并不是必须的,而且有可能会导致安装的时候报错,随即将其禁用掉,参数文件如下:$ cat .profile

PATH=/usr/bin:/etc:/usr/sbin:/usr/ucb:$HOME/bin:/usr/bin/X11:/sbin:.
export PATH
if [ -s "$MAIL" ]           # This is at Shell startup.  In normal
then echo "$MAILMSG"        # operation, the Shell checks
fi                          # periodically.
ORACLE_BASE=/oracle
ORACLE_SID=orcl
ORACLE_HOME=$ORACLE_BASE/app/10.2.0/db_1
#NLS_LANG=ZHS16GBK
PATH=$ORACLE_HOME/bin:$PATH:
export  ORACLE_BASE ORACLE_SID ORACLE_HOME  PATH
$
   将其禁用后,再次DBCA建库,故障没有再重现,成功建库。
  
二、dbca建库出现这个问题,后面在网上搜索了下,基本上是由如下四种原因导致:
  1、异步IO导致dbca报ORA-12547
解决办法:
  AIX:
  a、smitty chaio  (只有AIX 5系列支持)
  b、把STATE to be configured at system restart 设置成available
  c、再次运行DBCA创建成功
  HP-UNIX 可以参考(Metalink Note:139272.1)
 
  a. 创建aio字符设备
   # /sbin/mknod /dev/async c 101 0x0
   # chown oracle:dba /dev/async
   # chmod 660 /dev/async
 
  b.用sam调整内核参数
     -> Kernel Configuration
        -> Drivers
           -> 选择'asyncdsk'
           -> Actions>Add Driver to Kernel. (此时pending state由out变为in状态)
      -> Kernel Configuration
        -> Configurable Parameters
           -> max_async_ports
              设置为初始化文件中的'processes'值+oracle后台进程数 (根据v$bgprocess,单实例后台进程数最多为78个)
 
  c. 用sam设置aio_max_ops
     -> Kernel Configuration
        -> Configurable Parameters
           -> aio_max_ops
           -> 可设置为默认值2048
       
  以上配置,主机需重构核心,,重启.   
  d. 设置oracle用户必须有MLOCK权限。
   a. 设定dba组的MLOCK的权限
      roolt#setprivgrp dba MLOCK
 
    b. 避免重启后失效,需要设置:
       vi /etc/privgroup 添加如下行:
       dba MLOCK
  e.检查一下aio是否生效了
   #fuser /dev/async
   有进程列出来说明aio已经生效了。
 
 
 
  2、ulimit默认值没有修改
解决办法:
  Linux
  a、修改limits参数文件,添加如下内容
  vi /etc/security/limits.conf
  oracle soft nproc 2047
  oracle hard nproc 16384
  oracle soft nofile 1024
  oracle hard nofile 65536

  AIX
  a、修改limits参数文件,在最后如下添加如下内容:(注:-1为无限制使用)
  vi /etc/security/limits
default:     
fsize = -1   
core = 2097151
cpu = -1     
data = 262144
rss = 65536  
stack = 65536
nofiles = 2000
root: 
daemon:
bin:  
sys:  
adm:  
uucp: 
guest:
nobody:
lpd:  
oracle:  
data = -1
stack = -1


  3、Linux 下SELinux配置不正确,解决办法
  a、用root用户登录系统执行 setenforce 0   (不需要重启)
  b、修改/etc/selinux/config文件中的SELINUX="" 为 disabled ,需要重启

   4、libaio(x86_64) is not installed(同AIX一样,是开启异步IO,在Linux下打这个包)
解决办法:
a、插入操作系统安装光盘
b、root用户登录系统挂载操作系统安装光盘:
   #mount -t iso9660 /dev/cdrom /mnt
   #cd /mnt/Server
c、检查并安装libaio包,执行如下命令
   #rpm -qa| grep -i ^libaio
   #rpm -ivh libaio-*.i386.rpm
   #rpm -ivh libaio-*.x86_64.rpm
d、检查刚才安装的包是否成功
   #rpm -qa | grep ^libaio
e、再次执行安装,问题解决

更多Oracle相关信息见Oracle 专题页面 ?tid=12

linux

Statement
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
How do you handle database upgrades in MySQL?How do you handle database upgrades in MySQL?Apr 30, 2025 am 12:28 AM

The steps for upgrading MySQL database include: 1. Backup the database, 2. Stop the current MySQL service, 3. Install the new version of MySQL, 4. Start the new version of MySQL service, 5. Recover the database. Compatibility issues are required during the upgrade process, and advanced tools such as PerconaToolkit can be used for testing and optimization.

What are the different backup strategies you can use for MySQL?What are the different backup strategies you can use for MySQL?Apr 30, 2025 am 12:28 AM

MySQL backup policies include logical backup, physical backup, incremental backup, replication-based backup, and cloud backup. 1. Logical backup uses mysqldump to export database structure and data, which is suitable for small databases and version migrations. 2. Physical backups are fast and comprehensive by copying data files, but require database consistency. 3. Incremental backup uses binary logging to record changes, which is suitable for large databases. 4. Replication-based backup reduces the impact on the production system by backing up from the server. 5. Cloud backups such as AmazonRDS provide automation solutions, but costs and control need to be considered. When selecting a policy, database size, downtime tolerance, recovery time, and recovery point goals should be considered.

What is MySQL clustering?What is MySQL clustering?Apr 30, 2025 am 12:28 AM

MySQLclusteringenhancesdatabaserobustnessandscalabilitybydistributingdataacrossmultiplenodes.ItusestheNDBenginefordatareplicationandfaulttolerance,ensuringhighavailability.Setupinvolvesconfiguringmanagement,data,andSQLnodes,withcarefulmonitoringandpe

How do you optimize database schema design for performance in MySQL?How do you optimize database schema design for performance in MySQL?Apr 30, 2025 am 12:27 AM

Optimizing database schema design in MySQL can improve performance through the following steps: 1. Index optimization: Create indexes on common query columns, balancing the overhead of query and inserting updates. 2. Table structure optimization: Reduce data redundancy through normalization or anti-normalization and improve access efficiency. 3. Data type selection: Use appropriate data types, such as INT instead of VARCHAR, to reduce storage space. 4. Partitioning and sub-table: For large data volumes, use partitioning and sub-table to disperse data to improve query and maintenance efficiency.

How can you optimize MySQL performance?How can you optimize MySQL performance?Apr 30, 2025 am 12:26 AM

TooptimizeMySQLperformance,followthesesteps:1)Implementproperindexingtospeedupqueries,2)UseEXPLAINtoanalyzeandoptimizequeryperformance,3)Adjustserverconfigurationsettingslikeinnodb_buffer_pool_sizeandmax_connections,4)Usepartitioningforlargetablestoi

How to use MySQL functions for data processing and calculationHow to use MySQL functions for data processing and calculationApr 29, 2025 pm 04:21 PM

MySQL functions can be used for data processing and calculation. 1. Basic usage includes string processing, date calculation and mathematical operations. 2. Advanced usage involves combining multiple functions to implement complex operations. 3. Performance optimization requires avoiding the use of functions in the WHERE clause and using GROUPBY and temporary tables.

An efficient way to batch insert data in MySQLAn efficient way to batch insert data in MySQLApr 29, 2025 pm 04:18 PM

Efficient methods for batch inserting data in MySQL include: 1. Using INSERTINTO...VALUES syntax, 2. Using LOADDATAINFILE command, 3. Using transaction processing, 4. Adjust batch size, 5. Disable indexing, 6. Using INSERTIGNORE or INSERT...ONDUPLICATEKEYUPDATE, these methods can significantly improve database operation efficiency.

Steps to add and delete fields to MySQL tablesSteps to add and delete fields to MySQL tablesApr 29, 2025 pm 04:15 PM

In MySQL, add fields using ALTERTABLEtable_nameADDCOLUMNnew_columnVARCHAR(255)AFTERexisting_column, delete fields using ALTERTABLEtable_nameDROPCOLUMNcolumn_to_drop. When adding fields, you need to specify a location to optimize query performance and data structure; before deleting fields, you need to confirm that the operation is irreversible; modifying table structure using online DDL, backup data, test environment, and low-load time periods is performance optimization and best practice.

See all articles

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

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

DVWA

DVWA

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software