搜索
首页数据库mysql教程OracleStudy之案例--OracleSqlplus错误

Oracle Study之案例--Oracle Sqlplus错误 系统环境: 操作系统:AIX5.3 数据库: Oracle 10gR2 650) this.width=650;" src="http://www.68idc.cn/help/uploads/allimg/151111/12142C928-0.jpg" title="ax1.png" alt="wKiom1S3elTR8RPtAAIs2ex0EMc791.jpg" />

Oracle Study之案例--Oracle Sqlplus错误

系统环境:

操作系统:AIX5.3

数据库:  Oracle 10gR2


wKiom1S3elTR8RPtAAIs2ex0EMc791.jpg

    案例分析:

1、查看空间信息
[oracle@aix220 ~]$df -m
Filesystem    MB blocks      Free %Used    Iused %Iused Mounted on
/dev/hd4       17408.00   1238.15   93%    37699    12% /
/dev/hd2        8192.00   6310.39   23%    46534     4% /usr
/dev/hd9var     2048.00   1725.55   16%     1704     1% /var
/dev/hd3        2048.00   1902.58    8%      420     1% /tmp
/dev/fwdump     3072.00   3071.21    1%        4     1% /var/adm/ras/platform
/dev/hd1        2048.00   1821.98   12%       74     1% /home
/proc                 -         -    -         -     -  /proc
/dev/hd10opt    2048.00   1374.77   33%     8934     3% /opt
/dev/lv00       1024.00    991.80    4%       18     1% /var/adm/csd
/dev/arch      10240.00   8347.63   19%  
/dev/lv02      15360.00  10097.80   35%   123693     4% /u01

2、查看文件权限
[oracle@aix220 ~]$ls -ld /u01/app/oracle/admin/master/
drwxr-x---    8 oracle   dba             512 Feb 17 16:40 /u01/app/oracle/admin/master/
[oracle@aix220 ~]$ls -ld /u01/app/oracle/admin/master/adump/
drwxr-x---    2 oracle   dba            1536 Feb 17 19:48 /u01/app/oracle/admin/master/adump/

3、查看文件系统信息
[oracle@aix220 dbs]$cat /etc/filesystems

/u01:
        dev             = /dev/lv02
        vfs             = jfs
        log             = /dev/loglv00
        mount           = true
        options         = rw
        account         = false

[root@aix220 /]#lsvg -l oraclevg
oraclevg:
LV NAME             TYPE       LPs     PPs     PVs  LV STATE      MOUNT POINT
loglv00             jfslog     1       1       1    closed/syncd  N/A
lv02                jfs        120     120     1    closed/syncd  /u01

[root@aix220 /]#df -m
Filesystem    MB blocks      Free %Used    Iused %Iused Mounted on
/dev/hd4       17408.00   1238.18   93%    37700    12% /
/dev/hd2        8192.00   6310.39   23%    46534     4% /usr
/dev/hd9var     2048.00   1725.56   16%     1704     1% /var
/dev/hd3        2048.00   1902.58    8%      420     1% /tmp
/dev/fwdump     3072.00   3071.21    1%        4     1% /var/adm/ras/platform
/dev/hd1        2048.00   1821.98   12%       74     1% /home
/proc                 -         -    -         -     -  /proc
/dev/hd10opt    2048.00   1374.77   33%     8934     3% /opt
/dev/lv00       1024.00    991.80    4%       18     1% /var/adm/csd
/dev/arch      10240.00   8347.63   19%       52     1% /arch
/dev/lv01       5120.00   4959.25    4%       16     1% /flash
/dev/lv03      25600.00  24796.43    4%       17     1% /home/oracle/arch_master
rhel152:/backup/cuug15/storage30  14111.05  13052.23    8%       31     1% /backup

mount文件系统失败:
[root@aix220 /]#mount /u01
Replaying log for /dev/lv02.
mount: /dev/lv02 on /u01: Unformatted or incompatible media
The superblock on /dev/lv02 is dirty.  Run a full fsck to fix.

修复文件系统:
[root@aix220 /]#fsck -y  /dev/lv02 
......
** Phase 5 - Check Inode Map
** Phase 6 - Check Block Map
Bad Block Map (SALVAGED)
** Phase 6b - Salvage Block Map
Superblock is marked dirty (FIXED)
123665 files 10749336 blocks 20707944 free
***** Filesystem was modified *****

mount文件系统成功:
[root@aix220 /]#mount /u01
[root@aix220 /]#df -m
Filesystem    MB blocks      Free %Used    Iused %Iused Mounted on
/dev/hd4       17408.00   1238.16   93%    37699    12% /
/dev/hd2        8192.00   6310.39   23%    46534     4% /usr
/dev/hd9var     2048.00   1725.55   16%     1704     1% /var
/dev/hd3        2048.00   1902.58    8%      420     1% /tmp
/dev/fwdump     3072.00   3071.21    1%        4     1% /var/adm/ras/platform
/dev/hd1        2048.00   1821.98   12%       74     1% /home
/proc                 -         -    -         -     -  /proc
/dev/hd10opt    2048.00   1374.77   33%     8934     3% /opt
/dev/lv00       1024.00    991.80    4%       18     1% /var/adm/csd
/dev/lv02      15360.00  10111.30   35%   123674     4% /u01

执行sqlplus命令成功:
[root@aix220 /]#su - oracle
[oracle@aix220 ~]$sqlplus '/as sysdba'

SQL*Plus: Release 10.2.0.1.0 - Production on Tue Feb 17 19:46:03 2015

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

Connected to an idle instance.

SQL>

   数据库库报ORA-09925: Unable to create audit trail file,当时查 df -h有可用空间,目录的权限也正确,未df -i查看Inodes使用情况,审计目录下有将近24W个文件,初步猜测是因为审计生成文件过多导致目录所在分区的Inodes用光了,当时删除部分审计TRACE文件后正常未查看 Inodes使用情况。

汇总了下:ORA-09925的原因大致有以下三种:--其实可以根据报错判断是权限问题还是磁盘空间问题

原因一:目录权限问题--目录权限被改,无权限向目录写审计数据
Oracle bin目录(实际是整个oracle目录)的属主被更改: --ls -al bin
解决方法
chown -R oracle.oinstall /opt/orace
原因二确实磁盘没空间了 --df -h
原因三:磁盘Inodes用光--df -i 

参考:模拟Linux磁盘分区有可用空间无可用Inodes时报错:No space left on device

报错示例:--部分网络

示例1:可以根据报错信息判断是目录权限问题导致不能写入

ORA-09925: Unable to create audit trail file
Linux Error: 13: Permission denied
Additional information: 9925
ORA-09925: Unable to create audit trail file
Linux Error: 13: Permission denied
Additional information: 9925

示例2:--只读文件系统--没有写权限(可能是文件系统出问题)

ORA-09925: Unable to create audit trail file 
Linux-x86_64 Error: 30: Read-only file system 
Additional information: 9925 
ORA-01075: you are currently logged on

示例3:--没有可用空间

wKiom1S4dWTwKcNbAAG6a2Edp1Y833.jpg##############################
MOS上的一段描述及解决:
Problem Description ------------------- 
Problem occurs when: $ORACLE_HOME/rdbms/audit directory is full or $ORACLE_HOME/rdbms/audit directory doesn't exist as a side effect of this problem oracle asks for password after connect internal

Solution Description -------------------- 
Make space available in $ORACLE_HOME/rdbms/audit by removing files that are not needed or Make sure the directory exists and is readable by oracle or Change init.ora audit_file_dest to an existing directory. Change init.ora parameter means restart instance as workaround kill pmon. 

Explanation ----------- 
The behavior on Unix is to write a file named ora_.aud into the directory specified by audit_file_dest. The default directory is /rdbms/audit. The file will contain an entry for the audited action, which would be internal logins or startup. On ports which support an OS audit trail, these records will be written there. This feature is not affected by the settings of the audit_trail parameter. 

ORA-09925: "Unable to create audit trail file"

Cause: ORACLE was not able to create the file being used to hold audit trail records.

Action: Check the UNIX error number for a possible operating system error. 
If there is no error, contact ORACLE customer support. 

References ----------

[NOTE:1018924.102] ORA-09925 ON DATABASE STARTUP [NOTE:1056988.6] ORA-09925 DURING HOT BACKUPS [NOTE:21073.1]

OERR: ORA-9925 "Unable to create audit trail [BUG:723955] SQLPLUS ALLOWS DB STARTUP (BUT NOT SHUTDOWN)

IF AUDIT_FILE_DEST DOESN'T EXIST

Search Words ------------ ORA-09925 audit trail audit_file_dest


声明
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
减少在Docker中使用MySQL内存的使用减少在Docker中使用MySQL内存的使用Mar 04, 2025 pm 03:52 PM

本文探讨了Docker中的优化MySQL内存使用量。 它讨论了监视技术(Docker统计,性能架构,外部工具)和配置策略。 其中包括Docker内存限制,交换和cgroups

mysql无法打开共享库怎么解决mysql无法打开共享库怎么解决Mar 04, 2025 pm 04:01 PM

本文介绍了MySQL的“无法打开共享库”错误。 该问题源于MySQL无法找到必要的共享库(.SO/.DLL文件)。解决方案涉及通过系统软件包M验证库安装

如何使用Alter Table语句在MySQL中更改表?如何使用Alter Table语句在MySQL中更改表?Mar 19, 2025 pm 03:51 PM

本文讨论了使用MySQL的Alter Table语句修改表,包括添加/删除列,重命名表/列以及更改列数据类型。

在 Linux 中运行 MySQl(有/没有带有 phpmyadmin 的 podman 容器)在 Linux 中运行 MySQl(有/没有带有 phpmyadmin 的 podman 容器)Mar 04, 2025 pm 03:54 PM

本文比较使用/不使用PhpMyAdmin的Podman容器直接在Linux上安装MySQL。 它详细介绍了每种方法的安装步骤,强调了Podman在孤立,可移植性和可重复性方面的优势,还

什么是 SQLite?全面概述什么是 SQLite?全面概述Mar 04, 2025 pm 03:55 PM

本文提供了SQLite的全面概述,SQLite是一个独立的,无服务器的关系数据库。 它详细介绍了SQLite的优势(简单,可移植性,易用性)和缺点(并发限制,可伸缩性挑战)。 c

在MacOS上运行多个MySQL版本:逐步指南在MacOS上运行多个MySQL版本:逐步指南Mar 04, 2025 pm 03:49 PM

本指南展示了使用自制在MacOS上安装和管理多个MySQL版本。 它强调使用自制装置隔离安装,以防止冲突。 本文详细详细介绍了安装,起始/停止服务和最佳PRA

如何为MySQL连接配置SSL/TLS加密?如何为MySQL连接配置SSL/TLS加密?Mar 18, 2025 pm 12:01 PM

文章讨论了为MySQL配置SSL/TLS加密,包括证书生成和验证。主要问题是使用自签名证书的安全含义。[角色计数:159]

哪些流行的MySQL GUI工具(例如MySQL Workbench,PhpMyAdmin)是什么?哪些流行的MySQL GUI工具(例如MySQL Workbench,PhpMyAdmin)是什么?Mar 21, 2025 pm 06:28 PM

文章讨论了流行的MySQL GUI工具,例如MySQL Workbench和PhpMyAdmin,比较了它们对初学者和高级用户的功能和适合性。[159个字符]

See all articles

热AI工具

Undresser.AI Undress

Undresser.AI Undress

人工智能驱动的应用程序,用于创建逼真的裸体照片

AI Clothes Remover

AI Clothes Remover

用于从照片中去除衣服的在线人工智能工具。

Undress AI Tool

Undress AI Tool

免费脱衣服图片

Clothoff.io

Clothoff.io

AI脱衣机

AI Hentai Generator

AI Hentai Generator

免费生成ai无尽的。

热门文章

R.E.P.O.能量晶体解释及其做什么(黄色晶体)
2 周前By尊渡假赌尊渡假赌尊渡假赌
仓库:如何复兴队友
4 周前By尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island冒险:如何获得巨型种子
4 周前By尊渡假赌尊渡假赌尊渡假赌

热工具

螳螂BT

螳螂BT

Mantis是一个易于部署的基于Web的缺陷跟踪工具,用于帮助产品缺陷跟踪。它需要PHP、MySQL和一个Web服务器。请查看我们的演示和托管服务。

DVWA

DVWA

Damn Vulnerable Web App (DVWA) 是一个PHP/MySQL的Web应用程序,非常容易受到攻击。它的主要目标是成为安全专业人员在合法环境中测试自己的技能和工具的辅助工具,帮助Web开发人员更好地理解保护Web应用程序的过程,并帮助教师/学生在课堂环境中教授/学习Web应用程序安全。DVWA的目标是通过简单直接的界面练习一些最常见的Web漏洞,难度各不相同。请注意,该软件中

SublimeText3 英文版

SublimeText3 英文版

推荐:为Win版本,支持代码提示!

适用于 Eclipse 的 SAP NetWeaver 服务器适配器

适用于 Eclipse 的 SAP NetWeaver 服务器适配器

将Eclipse与SAP NetWeaver应用服务器集成。

Dreamweaver Mac版

Dreamweaver Mac版

视觉化网页开发工具