搜索|收藏|地图|订阅|图片|论坛|商城

详细讲解Oracle数据库10g RMAN的备份过程

来源:赛迪网 编辑:若水 时间:2008-05-07
1.首先查看一下Oracle的数据文件
SQL> select name from v$datafile;
NAME
-------------------------------------
/dev/rora_system
/dev/rora_undo1
/dev/rora_sysaux
/dev/rora_users
/dev/rora_example
2.建立RMAN所需的表空间,这里采用裸设备“/dev/rora_backup”
SQL> create tablespace ora_backup datafile'/dev/rora_backup' size 500M;
Tablespace created.
进行查看确认
SQL> select name from v$datafile;
NAME
----------------------------------------
/dev/rora_system
/dev/rora_undo1
/dev/rora_sysaux
/dev/rora_users
/dev/rora_example
/dev/rora_backup
6 rows selected.
已经发现ora_backup表空间
3.建立RMAN用户以及设定密码和用户表空间
SQL> create user rman identified by rman default tablespace ora_backup temporay tablespace temp
2 ;
create user rman identified by rman default tablespace ora_backup temporay tablespace temp
*
ERROR at line 1:
ORA-00922: missing or invalid option
在此处出错,原来是temporay打错,继续。
SQL> create user rman identified by rman default tablespace ora_backup temporary tablespace temp;
User created.
呵呵,成功
4.给用户授权
SQL> grant connect,resource,recovery_catalog_owner to rman
2 ;
Grant succeeded.
5.连接到数据库
SQL> rman target 'zhirui' catalog rman/rman
SP2-0734: unknown command beginning "rman targe..." - rest of line ignored.
呵呵,又出错了,没退出SQL。
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
$ rman target 'zhirui'catalog rman/rman
这下应该可以了吧
Argument Value Description
-----------------------------------------------------
target quoted-string connect-string for target database
catalog quoted-string connect-string for recovery catalog
nocatalog none if specified, then no recovery catalog
cmdfile quoted-string name of input command file
log quoted-string name of output message log file
trace quoted-string name of output debugging message log file
append none if specified, log is opened in append mode
debug optional-args activate debugging
msgno none show RMAN-nnnn prefix for all messages
send quoted-string send a command to the media manager
pipe string building block for pipe names
timeout integer number of seconds to wait for pipe input
checksyntax none check the command file for syntax errors
最新评论共有 0 位网友发表了评论
发表评论
评论内容:不能超过250字,需审核,请自觉遵守互联网相关政策法规。
用户名: 密码:
匿名?