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

The article discusses using MySQL's ALTER TABLE statement to modify tables, including adding/dropping columns, renaming tables/columns, and changing column data types.

Article discusses configuring SSL/TLS encryption for MySQL, including certificate generation and verification. Main issue is using self-signed certificates' security implications.[Character count: 159]

Article discusses strategies for handling large datasets in MySQL, including partitioning, sharding, indexing, and query optimization.

Article discusses popular MySQL GUI tools like MySQL Workbench and phpMyAdmin, comparing their features and suitability for beginners and advanced users.[159 characters]

The article discusses dropping tables in MySQL using the DROP TABLE statement, emphasizing precautions and risks. It highlights that the action is irreversible without backups, detailing recovery methods and potential production environment hazards.

Article discusses using foreign keys to represent relationships in databases, focusing on best practices, data integrity, and common pitfalls to avoid.

The article discusses creating indexes on JSON columns in various databases like PostgreSQL, MySQL, and MongoDB to enhance query performance. It explains the syntax and benefits of indexing specific JSON paths, and lists supported database systems.

Article discusses securing MySQL against SQL injection and brute-force attacks using prepared statements, input validation, and strong password policies.(159 characters)


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

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft

WebStorm Mac version
Useful JavaScript development tools

Dreamweaver CS6
Visual web development tools

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