HPUNIX下表空間檔案系統到裸裝置測試
# lvcreate -L 1024 -n lvtest vg00
Logical volume "/dev/vg00/lvtest" has been successfully created with
character device "/dev/vg00/rlvtest".
Logical volume "/dev/vg00/lvtest" has been successfully extended.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf[@more@]
# ls -l | grep test
brw-r----- 1 root sys 64 0x000014 Aug 17 19:20 lvtest
crw-r----- 1 root sys 64 0x000014 Aug 17 19:20 rlvtest
#chown oracle:dba rlvtest
# ls -l | grep test
brw-r----- 1 root sys 64 0x000014 Aug 17 19:20 lvtest
crw-r----- 1 oracle dba 64 0x000014 Aug 17 19:20 rlvtest
1.先從裸裝置移動到檔案系統上
SQL> alter tablespace guyuanli offline;
Tablespace altered.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
/oracle/app/product/11.1.0/db_1/network/admin $ rman target /
Recovery Manager: Release 11.1.0.7.0 - Production on Wed Aug 18 11:51:34 2010
Copyright (c) 1982, 2007, Oracle. All rights reserved.
connected to target database: TSDB (DBID=3914389360)
RMAN> copy datafile '/dev/vg00/rlvtest' to '/oracle/app/gutest.dbf';
Starting backup at 18-AUG-10
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=1556 device type=DISK
channel ORA_DISK_1: starting datafile copy
input datafile file number=00077 name=/dev/vg00/rlvtest
output file name=/oracle/app/gutest.dbf tag=TAG20100818T115303 RECID=2 STAMP=727357987
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:07
Finished backup at 18-AUG-10
RMAN> exit
Recovery Manager complete.
/oracle/app/product/11.1.0/db_1/network/admin $ sqlplus / as sysdba
SQL*Plus: Release 11.1.0.7.0 - Production on Wed Aug 18 11:53:22 2010
Copyright (c) 1982, 2008, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> alter database rename file '/dev/vg00/rlvtest' to '/oracle/app/gutest.dbf';
Database altered.
SQL> alter tablespace guyuanli online;
Tablespace altered.
SQL> select count(*) from guyuanli;
COUNT(*)
----------
71399
2.從檔案系統移動到裸裝置上
/dev/vg00 $ sqlplus / as sysdba
SQL*Plus: Release 11.1.0.7.0 - Production on Wed Aug 18 12:13:08 2010
Copyright (c) 1982, 2008, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> alter tablespace guyuanli offline;
Tablespace altered.
/dev/vg00 $ rman target /
Recovery Manager: Release 11.1.0.7.0 - Production on Wed Aug 18 12:15:17 2010
Copyright (c) 1982, 2007, Oracle. All rights reserved.
connected to target database: TSDB (DBID=3914389360)
RMAN> copy datafile '/oracle/app/gutest.dbf' to '/dev/vg00/rlvtest';
Starting backup at 18-AUG-10
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=1553 device type=DISK
channel ORA_DISK_1: starting datafile copy
input datafile file number=00077 name=/oracle/app/gutest.dbf
output file name=/dev/vg00/rlvtest tag=TAG20100818T121532 RECID=3 STAMP=727359332
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01
Finished backup at 18-AUG-10
RMAN> exit
Recovery Manager complete.
/dev/vg00 $ sqlplus / as sysdba
SQL*Plus: Release 11.1.0.7.0 - Production on Wed Aug 18 12:15:58 2010
Copyright (c) 1982, 2008, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> alter database rename file '/oracle/app/gutest.dbf' to '/dev/vg00/rlvtest';
Database altered.
SQL> alter tablespace guyuanli online;
Tablespace altered.
SQL> select count(*) from guyuanli;
COUNT(*)
----------
71399
最後把檔案系統的檔案手工刪除
/dev/vg00 $ cd /oracle/app/
/oracle/app $ ls
admin cfgtoollogs diag eygle01.dbf gutest.dbf product
/oracle/app $ rm gutest.dbf
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/7490392/viewspace-1037428/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- linux下表空間檔案系統移動到裸裝置測試Linux
- 裸裝置表空間對映檔案
- 利用rman遷移裸裝置資料檔案到檔案系統
- 在UNIX裸裝置和檔案系統之間移動ORACLEOracle
- 在UNIX裸裝置和檔案系統之間移動ORACLE (轉)Oracle
- 三、rman 資料庫遷移--從檔案系統到裸裝置資料庫
- oracle將控制檔案從裸裝置遷移到檔案系統Oracle
- Linux新增裸裝置空間(Redhat)LinuxRedhat
- db2資料庫檢視錶空間使用的是檔案系統和裸裝置情況DB2資料庫
- linux 使用裸裝置建立表空間Linux
- raw 裸裝置資料檔案更改其他raw裸裝置位置
- 三、rman 資料庫遷移--從檔案系統到裸裝置 用dd複製控制檔案資料庫
- linux下使用裸裝置建立oracle表空間LinuxOracle
- aix5.3上使用裸裝置建立表空間AI
- 用rman更改管理裸裝置檔案
- SOLARS AIX LINUX 下移動資料庫檔案到裸裝置AILinux資料庫
- 移動資料檔案、系統表空間檔案、臨時表空間檔案
- 裝置檔案系統教程(轉)
- ORACLE RAC 裸裝置資料庫一節點表空間擴容錯誤新增資料檔案到本地的處理Oracle資料庫
- MySQL 系統表空間檔案解析MySql
- ORACLE中裸裝置資料檔案RESIZE/AUTOEXTEND ONOracle
- 基於裸裝置檔案格式安裝oracle資料庫Oracle資料庫
- 如何遷移裸裝置raw device資料檔案到另一個raw devicedev
- AIX 5.3 10.2g rac環境下 給表空間擴容(裸裝置表空間)AI
- ASM與檔案系統之間copy資料檔案--檔案系統到ASMASM
- Oracle資料庫 檔案系統與裸裝置之間的轉換(RAC環境)Oracle資料庫
- 作業系統——裝置驅動和檔案系統作業系統
- 給oracle新增裸裝置資料檔案(AIX單機)OracleAI
- 建立資料庫時用裸裝置的配置檔案資料庫
- 更改資料庫裸裝置資料檔案的位置資料庫
- 透過xtts遷移單例項檔案系統表空間到RAC ASM儲存表空間TTS單例ASM
- 通過xtts遷移單例項檔案系統表空間到RAC ASM儲存表空間TTS單例ASM
- [轉]用裸裝置擴資料庫表空間專題(完整版)資料庫
- Backup And Recovery User's Guide-在Windows系統上備份到裸裝置GUIIDEWindows
- 字元裝置、塊裝置與裸裝置字元
- 字元裝置、塊裝置、裸裝置、RAW裝置 .字元
- 檔案系統&&磁碟管理(六)–swap分割槽、迴環裝置、檔案系統配置檔案fstab
- MySQL InnoDB系統表空間資料檔案配置MySql