参考[三思笔记]一步一步学DataGuard文档做dg的开始准备阶段,做主库的副本数据库,做副本数据库的第一阶段,创建辅助实例,基本过程为:

1、创建密码文件

2、创建初始化参数文件

3、连接并启动辅助实例

4、用rman加以auxiliary参数连接主库及辅助实例

我的系统环境:redhat-as4.7+oracle10.2.0.4,

主数据库地址:192.168.1.220  sid:lizidb   dbname:lizidb

辅助数据库地址:192.168.1.221  sid:standbydb  dbname:sbydb

客户端对数据库的连接字符串:主:@lizidb_192.168.1.220

辅:@standby_192.168.1.221

第一步创建密码文件,参考三思的文档,将密码文件创建到了数据库数据文件目录下面,并且以PWDsid.ora命名,用rman登陆辅助实例,报错:

[oracle@db-standby standbydb]$ orapwd file=/u00/oracle/standbydb/pwdstandby.ora password=aaa entries=30

[oracle@db-standby pfile]$ rman target

Recovery Manager: Release 10.2.0.4.0 - Production on Fri Apr 16 16:11:13 2010

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

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-00554: initialization of internal recovery manager package failed

RMAN-04005: error from target database:

ORA-01031: insufficient privileges

google搜索解决ora-01031错误的方法,要检查好多好多的地方,比如sqlnet.ora、listener.ora、各种文件权限、实例占用内存等等,很麻烦也很没有效果,几经思考,觉得还是定位于密码文件上面。因为这个错误字面上意思就是为没有权限去登陆这个辅助实例,为什么没有权限呢?无非就是用户对其他用户没有操作权限,而现在这个辅助实例只创建了一个sys的密码文件,可是还是报这个错误,那就说明没有找到这个sys用户,也就是登陆时候没有用到密码文件,经搜索,查到以下相关文章:

关于oracle密码文件的一点学习

创建密码文件的命令

orapwd  file=<>  password=<> entries=最大数目

这里的file命名规则在unix/linux下 orapw,在windows下为 pwd.ora

具体资料看下面的描述(这是pub中一个网友的总结)

1. unix 环境:

查了Administrator‘s Reference 10g Release 2 (10.2) for UNIX-Based Operating Systems.

1. Log in as the Oracle software owner.

2. Use the orapwd utility to create the password file as follows:$ $ORACLE_HOME/bin/orapwd file=filename password=password entries=max_users……

filename The name of the file in which password information is written

The name of the file must be orapwsid, and you must supply the full path name. Its contents are encrypted. Typically, the password file is created in the $ORACLE_HOME/dbs directory.

请注意黑体字, 所以unix环境中, password file 一定是要用 orapw, 没有例外。

2. windows 环境:

查了Platform. Guide 10g Release 2 (10.2) for Microsoft Windows (32-Bit) (没查64-bit)

To create and populate a password file:

(1). Create a password file with the Password Utility:

C:> orapwd FILE=PWDsid.ora PASSWORD=password ENTRIES=max_users

where

| FILE specifies the password filename.

| SID identifies the database instance.

| PASSWORD sets the password for account SYS.

| ENTRIES sets maximum number of entries in password file. This corresponds to maximum number of distinct users allowed to connect to the database simultaneously with either the SYSDBA or the SYSOPER DBA privilege.

(2). Set initialization parameter file parameter REMOTE_LOGIN_PASSWORDFILE to exclusive, shared, or none.

In search of the password file, Oracle Database looks in the registry for the value of parameter

ORA_SID_PWFILE. If no value is specified, then it looks in the registry for the

value of parameter ORA_PWFILE, which points to a file containing usernames,

passwords, and privileges. If that is not set, then it uses the default:

ORACLE_BASEORACLE_HOMEDATABASEPWDsid.ORA.

The default value is shared.

请注意黑体字, windows 环境中, 很大的部分是基于 registry 中变量 ora_sid_pwfile 或者 ora_pwfile 的设置, 缺省的值, 正如paulyibinyi兄弟指出的, 是 pwd.ora (unix中是没有这个。ora后缀的)。

二、在windows下对于connect /as sysdba及其它用户可以不用密码就能登录的问题

1.这是因为oracle采用了 OS认证的方式,具体的可以查看 sqlnet.ora具体同容如下

SQLNET.AUTHENTICATION_SERVICES= (NTS)

将其改成SQLNET.AUTHENTICATION_SERVICES= (NONE)

这样就是oracle认证方式了

2.因为用的OS认证方式,可以在操作系统->控制面版->计算机管理->用户 将当前用户的属性组 ORA_DBA去掉,这时如果没有用户名及密码则不可以。

如下:

SQL> connect /as sysdba ERROR:ORA-01031: insufficient privileges

SQL> connect sys/oracle as sysdba

已连接。

三、利用alter user identified by ……来修改密码alter user sys identified by abc一下,就连数据库中的密码和密码文件中的密码一起改成abc了;

四、如果密码文件丢失了如何办?

利用 orapwd重新创建一个就可以了。

本贴来自天极网群乐社区--

注意斜体部分,原来是在linux系统下,我创建密码文件时候路径及名称都不正确,之后按照其要求重建密码文件,顺利连接:

[oracle@db-standby pfile]$ rman target

Recovery Manager: Release 10.2.0.4.0 - Production on Fri Apr 16 17:02:53 2010

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

connected to target database: standbydb (not mounted)

RMAN> exit

oracle 辅助实例,初学rman问题小记三:创建辅助实例遇到的ORA-01031相关推荐

  1. oracle10grac创建单实例,Oracle10gLinux单实例迁移到rac

    Oracle 10g Linux 单实例迁移 到 Oracle 10g rac 简要操作说明 1.从源端单实例数据库rman备份 包括:控制文件+归档+数据+pfile.ora 2.rac搭建,不需要 ...

  2. 【Set jsonObj = toJson( jsonString )】创建JSON实例

    创建JSON实例: 原型: toJson( jsonString ) 说明: 创建JSON实例 返回: [JSON] 参数:jsonString [可选] 可以用json格式字符串创建实例 示例: & ...

  3. camunda流程定义表无数据_创建流程实例时 act_ru_identitylink 表中没有出现相关的人员数据...

    老师您好,我对流程实例有两个问题: 创建流程实例的方法,视频中给出的是 ProcessInstance processInstance = runtimeService.startProcessIns ...

  4. 如何创建 “抢占实例” 云服务器BCC?抢占式实例云服务器创建步骤

    在使用抢占实例时,您需要考虑以下内容: 选择一个合理的出价:您的出价应该足够高,而且要充分考虑到市场价格的波动.这样,您的抢占请求才会被接受处理,而且创建后才不会因为价格因素被释放.另外,出价还必须符 ...

  5. oracle 测试库搭建,Oracle Study之--通过RMAN克隆测试库

    Oracle Study之--通过RMAN克隆测试库 通过使用数据库备份,DBA可以在同一服务器或其它服务器上建立副本数据库.这个副本数据库可以和主数据库有相同的名称(拷贝)或与主数据库名称不同(克隆 ...

  6. oracle数据库 备份与恢复笔记 rman

    oracle用户执行 查看数据库版本: sqlplus -version SQL执行 查询归档状态: archive log list(No Archive Mode为非归档模式) 查询服务器是否开启 ...

  7. oracle技术之使用rman找回被误删除表空间

    一.案例说明 利用rman备份数据库后,因为人工误删除表空间,现在需要使用非完全恢复来找回被误删除的表空间 二.环境准备 [oracle@ECP-UC-DB1 ~]$ sqlplus / as sys ...

  8. Oracle 11g Dataguard 物理备库配置(三)之Dataguard broker配置

    Oracle 11g Dataguard 物理备库配置系列文档 Oracle 11g Dataguard 物理备库配置(一)之duplicate创建 Oracle 11g Dataguard 物理备库 ...

  9. linux下复制catalog信息指令,基於Linux下catalog方式的 Oracle 備份策略(RMAN)

    --********************************** --基於Linux下 Oracle備份策略(RMAN) --********************************* ...

最新文章

  1. java+object+graph,graphql-go:使用Object作为查询的输入参数
  2. sqlserver中常用的几个存储过程
  3. mysql binlog线程恢复_使用MySQL SQL线程回放Binlog实现恢复
  4. 赛普拉斯 12864_如何使用赛普拉斯自动化辅助功能测试
  5. ios笔试题算法_微软笔试题-Dijkstra算法
  6. stm32烧录软件_使用华为LiteOS Studio开发STM32物联网工程1
  7. Dubbo RESTful风格
  8. CSS 总结我对3D效果的一些误解
  9. mysql装完是什么样儿的_Win7系统安装MySQL之后找不到指定文件与服务如何解决?...
  10. OpenCV : 投影变换
  11. share 接口的使用
  12. 计算机多媒体技术专业论文,多媒体技术论文
  13. 微信公众平台开发(九) 数据库操作
  14. AJAX 请求 NIDE 搭建简单服务
  15. 伊登工业云:云计算打通“机器换人”最关键一环
  16. ElasticSearch 学习笔记
  17. HTML5和CSS3开发第九章课后作业
  18. 竞赛打卡:糖尿病遗传风险检测挑战赛
  19. 前端人的前端CI/CD
  20. 基础——DTE与DCE

热门文章

  1. 论流量平台(交易内容)生死劫——币看流量生意正在进入正循环
  2. 浅析 Linux 初始化 init 系统:sysvinit
  3. 如何在centos7上网卡名称回归传统
  4. Scikit Learn: 在python中机器学习
  5. 高性能的MySQL(7)字符集和校对
  6. java VM 推荐的命令行设置
  7. 在Android开发中怎样调用系统Email发送邮件
  8. [转载] 七龙珠第一部——第032话 飞天要塞
  9. oracle em 乱码问题
  10. ASP.NET MVC实践系列5-结合jQuery