1. Create a new standard database. RCAT
2. create a tablespace for RMAN repository user:
export ORACLE_SID=RCAT
SQL>create tablespace rcat datafile '+DATA/rcat/datafile/rcat.dbf'
size 200M autoextend on;
3. create RMAN repository catalog user:
SQL> CREATE USER rcat IDENTIFIED BY "rcat" DEFAULT
TABLESPACE RCAT QUOTA UNLIMITED ON rcat;
SQL> prompt grant recovery catalog owner to rcat catalog
owner
SQL> GRANT recovery_catalog_owner TO rcat;
4. Create RMAN catalog inside this user. To
create the catalog, connect to RMAN database through RMAN:
Before entering RMAN utility set some OS
environment variables:
-format RMAN
time format output (this will output the date inside RMAN to "01-MAR-2010
18:34:23"):
$> export NLS_DATE_FORMAT="DD-MON-YYYY HH24:MI:SS"
rman
catalog rcat/rcat
recovery catalog database Password:
connected to recovery catalog database
RMAN> CREATE CATALOG;
recovery catalog created
5. Register a database to the catalog, now that
we have a RMAN Repository Catalog. So, on a database that you need to register
connect to RMAN and register the database to RMAN catalog:
1.
Creación de
un nuevo espacio de tabla mediante el comando SQL*Plus:
* create tablespace <espaciodetabla del
catálogo del RMAN> datafile <nombre del archivodedatos> size
<tamaño del archivodedatos> m;
2.
Creación
del usuario propietario del catálogo RMAN introduciendo este comando: *
create user <propietario del catálogo RMAN> identified by
<contraseña> default tablespace <espaciodetabla del catálogo RMAN>
quota unlimited on <espaciodetabla del catálogo de RMAN>;
3.
Asignación
de los privilegios correctos a dicho usuario mediante el siguiente comando: *
grant recovery_catalog_owner to <propietario del catálogo RMAN>;
4.
Para
establecer la conexión con la base de datos del catálogo de RMAN, abra un nuevo
símbolo del sistema y ejecute el siguiente comando: rman
catalog <propietario del catálogo RMAN>/<contraseña del catálogo
RMAN>@rmandb
donde rmandb es el nombre TNS de la base de datos de catálogo de RMAN.
5.
Cree un
catálogo mediante este comando: create catalog;
6. Conéctese a la base de datos del catálogo
y a la base de datos de destino de RMAN. *rman target <usuario(sys)
con privilegios sysdba>/< contraseña para usuario(sys)>@targetdb
catalog <propietario del catálogo de RMAN>/<contraseña del catálogo
RMAN>@rmandb
donde rmandb es el nombre TNS de la base de datos de catálogo de RMAN
y targetdb es el nombre TNS de la base de datos de destino.
7. Ejecute el siguiente comando. register
database;
$ rman catalog rman/rman
connected to recovery catalog database
RMAN> connect target
sys/CLORINOSBEFX@CLORINOSBEFX
connected to target database: CLORINOS
(DBID=1732973088)
RMAN> register database;
database registered in recovery catalog
starting full resync of recovery catalog
full resync complete
SQL> connect rman/rman
Connected.
SQL>
select * from rc_database;
DB_KEY DBINC_KEY
DBID NAME
RESETLOGS_CHANGE# RESETLOG
---------- ---------- ---------- --------
----------------- --------
2 4 1732973088 CLORINOS
rman target / catalog rcat@RCAT
RMAN.DBMS_RCVCAT version 11.02.00.01 in RCVCAT
database is not current
RMAN> upgrade catalog;
recovery catalog owner is RMAN
enter UPGRADE CATALOG command again to
confirm catalog upgrade
RMAN> UPGRADE CATALOG
recovery catalog upgraded to version
11.02.00.03
DBMS_RCVMAN package upgraded to version
11.02.00.03
DBMS_RCVCAT package upgraded to version
11.02.00.03
SQL> connect rcat/rcat
Connected.
SQL>
SQL>
SQL> select * from rc_database;
DB_KEY DBINC_KEY
DBID NAME RESETLOGS_CHANGE# RESETLOG
---------- ---------- ---------- --------
----------------- --------
2 4 1732973088 CLORINOS
57437604 22/10/13
927 928 3376507379 DEXPLOG2
298481158 28/10/13
###############################
create tablespace TOOLS datafile
'+DATA/catdb/datafile/tools.dbf' size
200M;
CREATE
USER rman IDENTIFIED BY cat
TEMPORARY TABLESPACE temp
DEFAULT TABLESPACE tools
QUOTA UNLIMITED ON tools;
GRANT CONNECT, RESOURCE, RECOVERY_CATALOG_OWNER TO
rman;
GRANT
RECOVERY_CATALOG_OWNER TO rman;
GRANT
create session TO rman;
%
rman
RMAN>
CONNECT CATALOG rman/cat@catdb
ORACLE:
OK=
uid=500(oracle) gid=500(oinstall)
groups=500(oinstall),501(asmadmin),502(dba),503(oper),504(asmdba)
MAL uid=500(oracle) gid=503(oinstall)
groups=501(asmadmin),503(oinstall),504(dba),505(oper),507(asmdba)
GRID:
OK=
uid=501(grid) gid=503(oinstall)
grupos=500(asmadmin),501(asmdba),502(asmoper),503(oinstall),504(dba)
MAIL uid=501(grid) gid=503(oinstall)
groups=501(asmadmin),502(asmoper),503(oinstall),504(dba),507(asmdba)
BIEN:
asmadmin:x:500:oracle,grid asmadmin:x:501:grid,oracle
asmdba:x:501:grid,oracle asmdba:x:507:oracle,grid
asmoper:x:502:grid asmoper:x:502:grid
oinstall:x:503:
oinstall:x:503:oracle,grid
dba:x:504:oracle,grid dba:x:504:grid,oracle
oper:x:505:oracle oper:x:505:oracle
MAL:
oracle:x:500:
oracleasm createdisk DISK01 /dev/sdc1
oracleasm createdisk DISK02 /dev/sdd1
oracleasm createdisk DISK03 /dev/sde1
export ORACLE_SID=CLPRTR01
CREATE USER clprtr01 IDENTIFIED BY "clprtr01" DEFAULT
TABLESPACE RCAT QUOTA UNLIMITED ON rcat;
No hay comentarios.:
Publicar un comentario