Oracle数据库10g RMAN的备份过程

来源:中国IT实验室 作者:佚名 2008-05-07 出处:pcdog.com

oracle  oracle数据库  
下一页 1 2 3 4 

    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


更多内容请看PCdog.com--MySQL数据备份  备份恢复  数据库备份与恢复专题
下一页 1 2 3 4 
上一篇:数据库内存参数调优技术的总结
下一篇:Oracle Wait Event:Data file init write