Chinaunix首页 | 论坛 | 博客
  • 博客访问: 547388
  • 博文数量: 855
  • 博客积分: 40000
  • 博客等级: 大将
  • 技术积分: 5005
  • 用 户 组: 普通用户
  • 注册时间: 2008-10-16 19:08
文章分类

全部博文(855)

文章存档

2011年(1)

2008年(854)

我的朋友

分类:

2008-10-16 19:09:51

    1.首先查看一下的数据文件

    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 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

[1]    

【责编:Ken】

--------------------next---------------------

阅读(247) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~