当前位置:数据库 > Oracle >>

oracle rman catalog目录数据库创建过程

oracle rman catalog目录数据库创建过程
 
一、创建catalog需要的表空间
 
SQL> create tablespace rman_wolf datafile '/oracle/ora10g/oradata/wolf/rmanwolf.dbf' size 20m;
 
Tablespace created.
 
查看表空间是否创建成功
SQL> select tablespace_name from dba_tablespaces;
 
TABLESPACE_NAME
------------------------------
SYSTEM
UNDOTBS1
SYSAUX
TEMP
USERS
RMAN_WOLF
 
6 rows selected.
 
SQL> 
二、创建用户
SQL> create user rman identified by rman default tablespace rman_wolf quota unlimited on rman_wolf;
 
User created.
查看用户是否创建成功及状态
SQL> select username,account_status from dba_users
  2  ;
 
USERNAME                       ACCOUNT_STATUS
------------------------------ --------------------------------
MGMT_VIEW                      OPEN
SYS                            OPEN
SYSTEM                         OPEN
DBSNMP                         OPEN
SYSMAN                         OPEN
SCOTT                          OPEN
RMAN                           OPEN
OUTLN                          EXPIRED & LOCKED
MDSYS                          EXPIRED & LOCKED
ORDSYS                         EXPIRED & LOCKED
CTXSYS                         EXPIRED & LOCKED
 
USERNAME                       ACCOUNT_STATUS
------------------------------ --------------------------------
ANONYMOUS                      EXPIRED & LOCKED
EXFSYS                         EXPIRED & LOCKED
DMSYS                          EXPIRED & LOCKED
WMSYS                          EXPIRED & LOCKED
XDB                            EXPIRED & LOCKED
ORDPLUGINS                     EXPIRED & LOCKED
SI_INFORMTN_SCHEMA             EXPIRED & LOCKED
OLAPSYS                        EXPIRED & LOCKED
MDDATA                         EXPIRED & LOCKED
DIP                            EXPIRED & LOCKED
TSMSYS                         EXPIRED & LOCKED
 
22 rows selected.
 
三、授权
SQL> grant recovery_catalog_owner to rman;
 
Grant succeeded.
 
SQL> grant connect to rman;
 
Grant succeeded.
 
SQL> grant dba to rman;
 
Grant succeeded.
 
查看角色拥有的权限
SQL> select * from dba_sys_privs where grantee='RECOVERY_CATALOG_OWNER';
 
GRANTEE                        PRIVILEGE
------------------------------ ----------------------------------------
ADMIN_OPT
---------
RECOVERY_CATALOG_OWNER         CREATE SYNONYM
NO
 
RECOVERY_CATALOG_OWNER         CREATE CLUSTER
NO
 
RECOVERY_CATALOG_OWNER         ALTER SESSION
NO
 
GRANTEE                        PRIVILEGE
------------------------------ ----------------------------------------
ADMIN_OPT
---------
RECOVERY_CATALOG_OWNER         CREATE DATABASE LINK
NO
 
RECOVERY_CATALOG_OWNER         CREATE PROCEDURE
NO
 
RECOVERY_CATALOG_OWNER         CREATE SEQUENCE
NO
 
GRANTEE                        PRIVILEGE
------------------------------ ----------------------------------------
ADMIN_OPT
---------
RECOVERY_CATALOG_OWNER         CREATE TABLE
NO
 
RECOVERY_CATALOG_OWNER         CREATE SESSION
NO
 
RECOVERY_CATALOG_OWNER         CREATE TYPE
NO
 
GRANTEE                        PRIVILEGE
------------------------------ ----------------------------------------
ADMIN_OPT
---------
RECOVERY_CATALOG_OWNER         CREATE VIEW
NO
 
RECOVERY_CATALOG_OWNER         CREATE TRIGGER
NO
 
11 rows selected.
 
四、创建恢复目录
[oracle@redhat ~]$ rman target / catalog rman/rman
 
Recovery Manager: Release 10.2.0.1.0 - Production on 星期五 4月 19 10:14:11 2013
 
Copyright (c) 1982, 2005, Oracle.  All rights reserved.
 
connected to target database: WOLF (DBID=3778783462)
connected to recovery catalog database
 
RMAN> create catalog tablespace rman_wolf;
 
recovery catalog created
 
RMAN> register database;
 
database registered in recovery catalog
starting full resync of recovery catalog
full resync complete
 
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,