AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / dba / 问题 / 231324
Accepted
Iris Catharina
Iris Catharina
Asked: 2019-03-06 02:03:50 +0800 CST2019-03-06 02:03:50 +0800 CST 2019-03-06 02:03:50 +0800 CST

ORA-48108 / ORA-48140 / ORA-48187 - 诊断目标值错误 - 初始化文件/控制文件

  • 772

这都是测试/培训 - 这些都与生产环境无关

在 VM 上使用 ORACLE DB 12c + UNIX/LINUX 64 位。

.

嗨,大家好!我在以下错误中运行并且似乎无法解决它。你能帮忙吗?

SQL> STARTUP NOMOUNT; 
ORA-48108: invalid value given for the diagnostic_dest init.ora parameter 
ORA-48140: the specified ADR Base directory does not exist [/u01/app/oracle/product/12.1.0.2/db_1/dbs/<ORACLE_BASE>] 
ORA-48187: specified directory does not exist Linux-x86_64 Error: 2: No such file or directory Additional information: 1

数据库详细信息:

[oracle@ol12c dbs]$ echo $ORACLE_BASE
/u01/app/oracle

echo $ORACLE_HOME
/u01/app/oracle/product/12.1.0.2/db_1

[oracle@ol12c dbs]$ ls -a
.   hc_cdb1.dat   init.ora       lkCDB1     spfilecdb1.ora   STARTUP
..  hc_pridb.dat  initpridb.ora  orapwcdb1  spfilepridb.ora
[oracle@ol12c dbs]$ pwd
/u01/app/oracle/product/12.1.0.2/db_1/dbs

[oracle@ol12c dbs]$ echo $DB_NAME
pridb

[oracle@ol12c dbs]$ env | grep ORA
ORACLE_UNQNAME=cdb1
ORACLE_SID=pridb
ORACLE_BASE=/u01/app/oracle
ORACLE_HOSTNAME=ol12c.localdomain
ORACLE_HOME=/u01/app/oracle/product/12.1.0.2/db_1

init.ora 包含: diagnostic_dest='<ORACLE_BASE>'

initpridb.ora 包含: diagnostic_dest='u01/app/oracle'

** 我已经将值更改为'<ORACLE_BASE>'// '/u01/app/oracle'/ '/u01/app/oracle/product/12.1.0.2/db_1','|ORACLE_BASE|'没有运气 - 都是一样的错误。

根据我之前的研究:

  • ORA-48108 和 ORA-01034
  • 如何在 Linux 上的 OracleDB 上正确设置 ADR Base 目录?

当我尝试像下面这样启动时:

SQL> startup nomount pfile=/u01/app/oracle/product/12.1.0.2/db_1/dbs/initpridb.ora;

我收到相同的错误,见下文:

ORA-01261: Parameter db_recovery_file_dest destination string cannot be translated
ORA-01262: Stat failed on a file destination directory
Linux-x86_64 Error: 2: No such file or directory

我注意到无论我将 diagnostic_dest 值更改为什么,它都会使用该值 + ORACLE_BASE 进行搜索。如果我翻转它们('<ORACLE_BASE>/product/12.1.0.2/db_1/dbs'),它将最终搜索'<ORACLE_BASE>/product/12.1.0.2/db_1/dbs/<ORACLE_BASE>'

我对数据库非常陌生,正在同一主机上创建一个新数据库。创建此数据库后,我将使用 Oracle Data Guard 创建另一个用作物理备用数据库。请在提出行动建议时,表现得像在与不知情的人交谈!:) :)

先感谢您!

.


.

更新

查看文件的详细信息:

[oracle@ol12c dbs]$ cat initpridb.ora
# 
# $Header: rdbms/admin/init.ora /main/24 2012/02/03 08:24:01 ysarig Exp $ 
# 
# Copyright (c) 1991, 1997, 1998 by Oracle Corporation
# NAME
#   init.ora
# FUNCTION
# NOTES
# MODIFIED
#     ysarig     02/01/12  - Renaming flash_recovery_area to
#                            fast_recovery_area
#     ysarig     05/14/09  - Updating compatible to 11.2
#     ysarig     08/13/07  - Fixing the sample for 11g
#     atsukerm   08/06/98 -  fix for 8.1.
#     hpiao      06/05/97 -  fix for 803
#     glavash    05/12/97 -  add oracle_trace_enable comment
#     hpiao      04/22/97 -  remove ifile=, events=, etc.
#     alingelb   09/19/94 -  remove vms-specific stuff
#     dpawson    07/07/93 -  add more comments regarded archive start
#     maporter   10/29/92 -  Add vms_sga_use_gblpagfile=TRUE 
#     jloaiza    03/07/92 -  change ALPHA to BETA 
#     danderso   02/26/92 -  change db_block_cache_protect to _db_block_cache_p
#     ghallmar   02/03/92 -  db_directory -> db_domain 
#     maporter   01/12/92 -  merge changes from branch 1.8.308.1 
#     maporter   12/21/91 -  bug 76493: Add control_files parameter 
#     wbridge    12/03/91 -  use of %c in archive format is discouraged 
#     ghallmar   12/02/91 -  add global_names=true, db_directory=us.acme.com 
#     thayes     11/27/91 -  Change default for cache_clone 
#     jloaiza    08/13/91 -         merge changes from branch 1.7.100.1 
#     jloaiza    07/31/91 -         add debug stuff 
#     rlim       04/29/91 -         removal of char_is_varchar2 
#   Bridge     03/12/91 - log_allocation no longer exists
#   Wijaya     02/05/91 - remove obsolete parameters
#
##############################################################################
# Example INIT.ORA file
#
# This file is provided by Oracle Corporation as a starting point for
# customizing the Oracle Database installation for your site.    
#
# NOTE: The values that are used in this file are example values only.
# You may want to adjust those values for your specific requirements. 
# You might also consider using the Database Configuration Assistant     
# tool (DBCA) to create a server-side initialization parameter file
# and to size your initial set of tablespaces. See the
# Oracle Database 2 Day DBA guide for more information.
###############################################################################

# Change '<ORACLE_BASE>' to point to the oracle base (the one you specify at
# install time)

db_name='ORCL'
memory_target=1G
processes = 150
audit_file_dest='<ORACLE_BASE>/admin/orcl/adump'
audit_trail ='db'
db_block_size=8192
db_domain=''
db_recovery_file_dest='<ORACLE_BASE>/fast_recovery_area'
db_recovery_file_dest_size=2G
diagnostic_dest='/u01/app/oracle'
dispatchers='(PROTOCOL=TCP) (SERVICE=ORCLXDB)'
open_cursors=300 
remote_login_passwordfile='EXCLUSIVE'
undo_tablespace='UNDOTBS1'
# You may want to ensure that control files are created on separate physical
# devices
control_files = (ora_control1, ora_control2)
compatible ='11.2.0'

和

[oracle@ol12c dbs]$ cat init.ora
# 
# $Header: rdbms/admin/init.ora /main/24 2012/02/03 08:24:01 ysarig Exp $ 
# 
# Copyright (c) 1991, 1997, 1998 by Oracle Corporation
# NAME
#   init.ora
# FUNCTION
# NOTES
# MODIFIED
#     ysarig     02/01/12  - Renaming flash_recovery_area to
#                            fast_recovery_area
#     ysarig     05/14/09  - Updating compatible to 11.2
#     ysarig     08/13/07  - Fixing the sample for 11g
#     atsukerm   08/06/98 -  fix for 8.1.
#     hpiao      06/05/97 -  fix for 803
#     glavash    05/12/97 -  add oracle_trace_enable comment
#     hpiao      04/22/97 -  remove ifile=, events=, etc.
#     alingelb   09/19/94 -  remove vms-specific stuff
#     dpawson    07/07/93 -  add more comments regarded archive start
#     maporter   10/29/92 -  Add vms_sga_use_gblpagfile=TRUE 
#     jloaiza    03/07/92 -  change ALPHA to BETA 
#     danderso   02/26/92 -  change db_block_cache_protect to _db_block_cache_p
#     ghallmar   02/03/92 -  db_directory -> db_domain 
#     maporter   01/12/92 -  merge changes from branch 1.8.308.1 
#     maporter   12/21/91 -  bug 76493: Add control_files parameter 
#     wbridge    12/03/91 -  use of %c in archive format is discouraged 
#     ghallmar   12/02/91 -  add global_names=true, db_directory=us.acme.com 
#     thayes     11/27/91 -  Change default for cache_clone 
#     jloaiza    08/13/91 -         merge changes from branch 1.7.100.1 
#     jloaiza    07/31/91 -         add debug stuff 
#     rlim       04/29/91 -         removal of char_is_varchar2 
#   Bridge     03/12/91 - log_allocation no longer exists
#   Wijaya     02/05/91 - remove obsolete parameters
#
##############################################################################
# Example INIT.ORA file
#
# This file is provided by Oracle Corporation as a starting point for
# customizing the Oracle Database installation for your site.    
#
# NOTE: The values that are used in this file are example values only.
# You may want to adjust those values for your specific requirements. 
# You might also consider using the Database Configuration Assistant     
# tool (DBCA) to create a server-side initialization parameter file
# and to size your initial set of tablespaces. See the
# Oracle Database 2 Day DBA guide for more information.
###############################################################################

# Change '<ORACLE_BASE>' to point to the oracle base (the one you specify at
# install time)

db_name='ORCL'
memory_target=1G
processes = 150
audit_file_dest='<ORACLE_BASE>/admin/orcl/adump'
audit_trail ='db'
db_block_size=8192
db_domain=''
db_recovery_file_dest='<ORACLE_BASE>/fast_recovery_area'
db_recovery_file_dest_size=2G
diagnostic_dest='<ORACLE_BASE>'
dispatchers='(PROTOCOL=TCP) (SERVICE=ORCLXDB)'
open_cursors=300 
remote_login_passwordfile='EXCLUSIVE'
undo_tablespace='UNDOTBS1'
# You may want to ensure that control files are created on separate physical
# devices
control_files = (ora_control1, ora_control2)
compatible ='11.2.0'

和

[oracle@ol12c dbs]$ echo $ORACLE_SID
pridb

[oracle@ol12c dbs]$ echo $ORACLE_HOME
/u01/app/oracle/product/12.1.0.2/db_1

[oracle@ol12c dbs]$ echo $ORACLE_BASE
/u01/app/oracle

[oracle@ol12c dbs]$ echo $DB_NAME
pridb

.


.

更新 2

我按照建议更新了初始化文件。更改<ORACLE_BASE>为实际路径:/u01/app/oracle/

[oracle@ol12c dbs]$ cat initpridb.ora
...
...
db_name='ORCL'
memory_target=1G
processes = 150
audit_file_dest='/u01/app/oracle/admin/orcl/adump'
audit_trail ='db'
db_block_size=8192
db_domain=''
db_recovery_file_dest='/u01/app/oracle/fast_recovery_area'
db_recovery_file_dest_size=2G
diagnostic_dest='/u01/app/oracle'
dispatchers='(PROTOCOL=TCP) (SERVICE=ORCLXDB)'
open_cursors=300 
remote_login_passwordfile='EXCLUSIVE'
undo_tablespace='UNDOTBS1'

和

[oracle@ol12c dbs]$ cat init.ora
...
...
db_name='ORCL'
memory_target=1G
processes = 150
audit_file_dest='/u01/app/oracle/admin/orcl/adump'
audit_trail ='db'
db_block_size=8192
db_domain=''
db_recovery_file_dest='/u01/app/oracle/fast_recovery_area'
db_recovery_file_dest_size=2G
diagnostic_dest='/u01/app/oracle'
dispatchers='(PROTOCOL=TCP) (SERVICE=ORCLXDB)'
open_cursors=300 
remote_login_passwordfile='EXCLUSIVE'
undo_tablespace='UNDOTBS1'

不手动选择 pfile 时出现错误:

SQL> STARTUP NOMOUNT;
ORA-48108: invalid value given for the diagnostic_dest init.ora parameter
ORA-48140: the specified ADR Base directory does not exist [/u01/app/oracle/product/12.1.0.2/db_1/dbs/<ORACLE_BASE>]
ORA-48187: specified directory does not exist
Linux-x86_64 Error: 2: No such file or directory
Additional information: 1

但它有效!:)(我刚刚遇到了一个新问题,但这可能与此无关)

SQL> startup nomount pfile=/u01/app/oracle/product/12.1.0.2/db_1/dbs/initpridb.ora;
ORA-09925: Unable to create audit trail file
Linux-x86_64 Error: 2: No such file or directory
Additional information: 9925

我还注意到两者的 db_name 都设置为 ORCL。不确定这是否会产生进一步的问题。

.


.

更新 3

为了:ORA-09925: Unable to create audit trail file

我查看了 Oracle 知识库文档:​​ORA-09925: Unable To Create Audit Trail File at Startup ( Doc ID 2267223.1 ) 我正在按照解决方案的步骤进行操作。b点的输出:

[oracle@ol12c ~]$ ps -ef|grep LOCAL
oracle    8211  8172  0 14:06 ?        00:00:00 oraclepridb (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
oracle    8448  8408  0 14:18 pts/1    00:00:00 grep --color=auto LOCAL

我试过了:

[oracle@ol12c ~]$ strace -frT -o /tmp/strace.1.log -p 8211
Process 8211 attached

但这似乎被卡住/加载,因此 - 我又被卡住了。

.


.

更新 4

都解决了。ORACLE 实例已启动。

最后一个错误 (ORA-09925) 已通过将audit_file_dest参数的原始值从更新到正确的路径来解决。从audit_file_dest='/u01/app/oracle/admin/orcl/adump'到 >>audit_file_dest='/u01/app/oracle/admin/pridb/adump'

SQL> startup nomount pfile=/u01/app/oracle/product/12.1.0.2/db_1/dbs/initpridb.ora;
ORACLE instance started.

Total System Global Area 1073741824 bytes
Fixed Size          2932632 bytes
Variable Size         671088744 bytes
Database Buffers      394264576 bytes
Redo Buffers            5455872 bytes

.

谢谢大家的帮助!

linux oracle-12c
  • 1 1 个回答
  • 3014 Views

1 个回答

  • Voted
  1. Best Answer
    Phil Sumner
    2019-03-06T03:58:58+08:002019-03-06T03:58:58+08:00

    忽略init.ora,不使用。你想要init<SID>.ora。在你的情况下,这似乎是initpridb.ora

    您已掌握的此文件中的此评论似乎已被忽略:

    更改“<ORACLE_BASE>”以指向 oracle 库(您在安装时指定的那个)

    你还有:

    audit_file_dest='<ORACLE_BASE>/admin/orcl/adump'
    

    将此修改为:

    /u01/app/oracle/admin/orcl/adump
    

    然后再试一次。

    • 1

相关问题

  • 查看 Postgresql 内存使用情况

  • MySQL Tuner 优化和碎片整理

  • MySQL 说“InnoDB: Initializing buffer pool, size = 128.0M”,是不是表示它正在使用 128MB RAM?

  • 任何想法如何在 opensuse12.1 中从 PostgresSQL 8.4 迁移到 PostgresSQL 9.1.1

  • Oracle XE Fedora 15 安装问题

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    连接到 PostgreSQL 服务器:致命:主机没有 pg_hba.conf 条目

    • 12 个回答
  • Marko Smith

    如何让sqlplus的输出出现在一行中?

    • 3 个回答
  • Marko Smith

    选择具有最大日期或最晚日期的日期

    • 3 个回答
  • Marko Smith

    如何列出 PostgreSQL 中的所有模式?

    • 4 个回答
  • Marko Smith

    列出指定表的所有列

    • 5 个回答
  • Marko Smith

    如何在不修改我自己的 tnsnames.ora 的情况下使用 sqlplus 连接到位于另一台主机上的 Oracle 数据库

    • 4 个回答
  • Marko Smith

    你如何mysqldump特定的表?

    • 4 个回答
  • Marko Smith

    使用 psql 列出数据库权限

    • 10 个回答
  • Marko Smith

    如何从 PostgreSQL 中的选择查询中将值插入表中?

    • 4 个回答
  • Marko Smith

    如何使用 psql 列出所有数据库和表?

    • 7 个回答
  • Martin Hope
    Jin 连接到 PostgreSQL 服务器:致命:主机没有 pg_hba.conf 条目 2014-12-02 02:54:58 +0800 CST
  • Martin Hope
    Stéphane 如何列出 PostgreSQL 中的所有模式? 2013-04-16 11:19:16 +0800 CST
  • Martin Hope
    Mike Walsh 为什么事务日志不断增长或空间不足? 2012-12-05 18:11:22 +0800 CST
  • Martin Hope
    Stephane Rolland 列出指定表的所有列 2012-08-14 04:44:44 +0800 CST
  • Martin Hope
    haxney MySQL 能否合理地对数十亿行执行查询? 2012-07-03 11:36:13 +0800 CST
  • Martin Hope
    qazwsx 如何监控大型 .sql 文件的导入进度? 2012-05-03 08:54:41 +0800 CST
  • Martin Hope
    markdorison 你如何mysqldump特定的表? 2011-12-17 12:39:37 +0800 CST
  • Martin Hope
    Jonas 如何使用 psql 对 SQL 查询进行计时? 2011-06-04 02:22:54 +0800 CST
  • Martin Hope
    Jonas 如何从 PostgreSQL 中的选择查询中将值插入表中? 2011-05-28 00:33:05 +0800 CST
  • Martin Hope
    Jonas 如何使用 psql 列出所有数据库和表? 2011-02-18 00:45:49 +0800 CST

热门标签

sql-server mysql postgresql sql-server-2014 sql-server-2016 oracle sql-server-2008 database-design query-performance sql-server-2017

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve