RMAN-04006: error from auxiliary database: ORA-01034: ORACLE not available

简介: 在使用rman duplicate复制standby数据库的时候,由于standby数据库实例必须处于非mount状态,所以主数据库直接连接是会报错的,需要在standby数据库服务上的监听器上配置静态的服务名,如下:$GRID_HOME/network/admin/listener.

在使用rman duplicate复制standby数据库的时候,由于standby数据库实例必须处于非mount状态,所以主数据库直接连接是会报错的,需要在standby数据库服务上的监听器上配置静态的服务名,如下:
$GRID_HOME/network/admin/listener.ora
SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (GLOBAL_DBNAME = rtdg1)
      (ORACLE_HOME = /u01/app/oracle/product/11.2.0/db_1)
      (SID_NAME = rtdg1)
    )
  )
不配置、或者配置的ORACLE_HOME,和SID_NAME不正确都有可能导致出现此错误。请仔细检查ORACLE_HOME,ORACLE_SID环境变量设置设置,在listener.ora中是否配置正确了ORACLE_HOME,SID_NAME(与环境变量匹配)。

配置完成后需要重启监听器才能生效。
可以使用Net Manager来配置。
如果你使用的是11gR2的版本,请注意监听器是在grid用户下配置。

另外还有一点需要注意:
如果配置正确的话,使用RMAN连接应该看到如下内容:
[oracle@rhel1 ~]$ rman target / auxiliary
sys/oracle@rtdg1

Recovery Manager: Release 11.2.0.2.0 - Production on Sun Apr 17 09:43:14 2011

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

connected to target database: RACTEST (DBID=3276406709)
connected to auxiliary database: RACTEST
(not mounted)
#not mounted,表示已经连上启动实例的auxiliary数据库实例。

如果ORACLE_HOME环境变量设置不正确,与实际的环境变量不匹配连接后的结果是:
[oracle@rhel1 ~]$ rman target / auxiliary
sys/oracle@rtdg1

Recovery Manager: Release 11.2.0.2.0 - Production on Sun Apr 17 09:43:14 2011

Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.

connected to target database: RACTEST (DBID=3276406709)
connected to auxiliary database: RACTEST
(not started)
#not started,说明我们连接到一个空闲例程,这种情况通常就是静态服务名中ORACLE_HOME配置不正确,或者SID配置不正确导致的。

这样连接到auxiliary执行duplicate就会报此错误!这点需要注意。另外我们通过sqlplus xxx/xxx@xxx as sysdba的方式也可以测试一下是否连接到启动实例的实例,还是连接上了空闲实例。

目录
相关文章
|
5月前
|
SQL Oracle 关系型数据库
WARNING: Too Many Parse Errors With error=911 When Running a JDBC Application Connected to an Oracle 19c database
WARNING: Too Many Parse Errors With error=911 When Running a JDBC Application Connected to an Oracle 19c database (
77 2
|
5月前
|
Oracle 关系型数据库
19c 开启Oracle Database Vault
19c 开启Oracle Database Vault
136 1
|
3月前
|
SQL 移动开发 Java
“\r\n### Error updating database. ,解决问题的思路在于认真参考给的错误提示,看错误提示,这里我的数据表,没有写primary key 导致的
“\r\n### Error updating database. ,解决问题的思路在于认真参考给的错误提示,看错误提示,这里我的数据表,没有写primary key 导致的
|
5月前
|
SQL Oracle 关系型数据库
Connect to Autonomous Database Using Oracle Database Tools
Connect to Autonomous Database Using Oracle Database Tools
47 1
|
4月前
|
Oracle 关系型数据库 Linux
Requirements for Installing Oracle Database/Client 19c on OL8 or RHEL8 64-bit (x86-64) (Doc ID 2668780.1)
Requirements for Installing Oracle Database/Client 19c on OL8 or RHEL8 64-bit (x86-64) (Doc ID 2668780.1)
34 0
|
5月前
|
人工智能 Oracle 关系型数据库
一篇文章弄懂Oracle和PostgreSQL的Database Link
一篇文章弄懂Oracle和PostgreSQL的Database Link
|
5月前
|
人工智能 关系型数据库 数据库
PostgreSQL 常见问题解决方案 - ERROR: database is being accessed by other users
PostgreSQL 常见问题解决方案 - ERROR: database is being accessed by other users
|
5月前
|
SQL Oracle 安全
Oracle Database Vault Access Control Components
Oracle Database Vault Access Control Components
37 0
|
5月前
|
Oracle 安全 关系型数据库
What Is Oracle Database Vault?
The Oracle Database Vault security controls protect application data from unauthorized access, and helps you to comply with privacy and regulatory requirements. You can deploy controls to block privileged account access to application data and control sensitive operations inside the database using
34 0
|
5月前
|
SQL 数据库
导入 sql 文件,如果发生 ERROR 1046 (3D000) no database selected 错误
导入 sql 文件,如果发生 ERROR 1046 (3D000) no database selected 错误
76 0