Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1125933
  • 博文数量: 276
  • 博客积分: 10077
  • 博客等级: 上将
  • 技术积分: 2513
  • 用 户 组: 普通用户
  • 注册时间: 2007-08-24 20:31
文章分类

全部博文(276)

文章存档

2020年(1)

2015年(5)

2012年(2)

2011年(6)

2010年(7)

2009年(224)

2008年(31)

我的朋友

分类: Oracle

2009-04-28 10:59:57

SQL> select file_name from dba_data_files;
FILE_NAME
--------------------------------------------------------------------------------
/dev/raw/raw4
/dev/raw/raw3
/dev/raw/raw2
/dev/raw/raw1
/home/oracle/test.dbf
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Pr
oduction
With the Partitioning, OLAP and Data Mining options
[oracle@localhost ~]$ rman
Recovery Manager: Release 10.2.0.1.0 - Production on Tue Apr 28 03:08:50 2009
Copyright (c) 1982, 2005, Oracle.  All rights reserved.
RMAN> connect target /
connected to target database (not started)
RMAN> copy datafile '/home/oracle/test.dbf' to '/dev/raw/raw9';
Starting backup at 28-APR-09
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of backup command at 04/28/2009 03:09:26
RMAN-03014: implicit resync of recovery catalog failed
RMAN-06403: could not obtain a fully authorized session
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux Error: 2: No such file or directory

RMAN> startup
Oracle instance started
database mounted
database opened
Total System Global Area     285212672 bytes
Fixed Size                     1218992 bytes
Variable Size                 92276304 bytes
Database Buffers             188743680 bytes
Redo Buffers                   2973696 bytes

RMAN> sql 'alter tablespace test offline';
sql statement: alter tablespace test offline
RMAN> copy datafile '/home/oracle/test.dbf' to '/dev/raw/raw9';
Starting backup at 28-APR-09
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=147 devtype=DISK
channel ORA_DISK_1: starting datafile copy
input datafile fno=00005 name=/home/oracle/test.dbf
output filename=/dev/raw/raw9 tag=TAG20090428T031212 recid=1 stamp=685336333
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:02
Finished backup at 28-APR-09
RMAN> sql 'alter database rename '/home/oracle/test.dbf' to '/dev/raw/raw9'';
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01006: error signalled during parse
RMAN-02001: unrecognized punctuation symbol "/"
RMAN> exit

Recovery Manager complete.
[oracle@localhost ~]$ sqlplus /nolog
SQL*Plus: Release 10.2.0.1.0 - Production on Tue Apr 28 03:12:59 2009
Copyright (c) 1982, 2005, Oracle.  All rights reserved.
SQL> alter database rename file '/home/oracle/test.dbf' to '/dev/raw/raw9';
SP2-0640: Not connected
SQL> conn  / as sysdba
Connected.
SQL> alter database rename file '/home/oracle/test.dbf' to '/dev/raw/raw9';
Database altered.
SQL> alter tablespace test online;
Tablespace altered.
SQL> select * from lgx;
         A
----------
         1
SQL> select file_name from dba_data_files;
FILE_NAME
--------------------------------------------------------------------------------
/dev/raw/raw4
/dev/raw/raw3
/dev/raw/raw2
/dev/raw/raw1
/dev/raw/raw9
SQL>
阅读(1808) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~