zoukankan      html  css  js  c++  java
  • RMAN系列catalog数据库

    oracle@server ~]$ sqlplus / as sysdba

    SQL*Plus: Release 10.2.0.1.0 - Production on Sun Jan 16 14:22:35 2011

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


    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options


    SQL> select name from v$datafile;

    NAME
    --------------------------------------------------------------------------------
    /oracle/oradata/orcl/system01.dbf
    /oracle/oradata/orcl/undotbs01.dbf
    /oracle/oradata/orcl/sysaux01.dbf
    /oracle/oradata/orcl/users01.dbf
    /oracle/oradata/orcl/example01.dbf
    /oracle/oradata/orcl/jason01.dbf

    6 rows selected.

    SQL> create tablespace rman datafile '/oracle/oradata/orcl/rman01.dbf' size 20m;

    Tablespace created.

    SQL> create user rman identified by rman default tablespace rman quota unlimited on rman;

    User created.

    SQL> grant recovery_catalog_owner to rman;

    Grant succeeded.

    SQL> select * from dba_sys_privs where grantee='connect';

    no rows selected

    SQL> select * from dba_sys_privs where grantee='CONNECT';

    GRANTEE                        PRIVILEGE                                ADM
    ------------------------------ ---------------------------------------- ---
    CONNECT                        CREATE SESSION                           NO

    SQL> grant connect to rman;

    Grant succeeded.

    SQL> grant resource to rman;

    Grant succeeded.

    SQL> exit
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    [oracle@server ~]$ clear

    [oracle@server ~]$ rman target/

    Recovery Manager: Release 10.2.0.1.0 - Production on Sun Jan 16 14:51:27 2011

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

    connected to target database: ORCL (DBID=1268348214)

    RMAN> connect catalog rman/rman

    connected to recovery catalog database

    RMAN> create catalog;

    recovery catalog created

    RMAN> register database;

    database registered in recovery catalog
    starting full resync of recovery catalog
    full resync complete

    RMAN>
    注这里必须先连接target database 再连接catalog database 要不register database;报

    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of register command at 01/16/2011 14:45:19
    RMAN-06171: not connected to target database

    rman同时连接target database和catalog database

    [oracle@server ~]$ rman target/ catalog rman/rman

    Recovery Manager: Release 10.2.0.1.0 - Production on Sun Jan 16 14:54:47 2011

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

    connected to target database: ORCL (DBID=1268348214)
    connected to recovery catalog database

    RMAN>

  • 相关阅读:
    h5自定义播放器得实现原理
    this a sao
    Winform(C#)输入完毕后,按Enter键触发Button事件
    解析xml文件,C# 获取所有节点的属性值
    xml节点和元素的关系
    C#中DataGridView控件使用大全
    Linq To Xml操作XML增删改查
    winform中如何选中datagridview中的一行数据双击后跳转并将其显示在另一个页面的datagirdview中
    Winform中的dataGridView添加自动编号
    C# winform 主界面打开并关闭登录界面
  • 原文地址:https://www.cnblogs.com/datalife/p/1985417.html
Copyright © 2011-2022 走看看