oracle10g/11g 新特性十二(数据库空间管理)
来源:互联网 发布:淘宝云盘在哪里 编辑:程序博客网 时间:2024/06/09 15:13
Database Storage
Supporting 4-KB Sector Disks
Using 4-KB Sector Disks
Specifying the Disk Sector Size
Transporting Tablespaces
Concept:Minimum Compatibility Level
如果表空间是read-only的,在移植之前, 把表空间改成read/write方式
Transportable Tablespace Procedure
Determining The Endian Format of a Platform
select tp.dndian_format from v$transportable_platform tp, v$database d where tp.platform_name=d.platform_name;
Using the RMAN CONVERT Command
orag11gr2-APP_TEST--user1copydb 1. 确认平台是否支持 select d.name,i.version,d.platform_name,endian_format from v$transportable_platform tp, V$database d, v$instance i where tp.PLATFORM_name=d.PLATFORM_NAME2.选择自含的表空间集: exec dbs_tt.transport_set_check('表空间名字',TRUE); select * from transport_set_violations3.read only tablespace alter tablespace app_test read only; 4.导出元数据expdp DUMPFILE=APP_TEST.dmp DIRECTORY=TEST_DIR TRANSPORT_TABLESPACES=APP_TEST5.DBMS_TDB.CHECK_DB检查数据库状态 <img src="http://img.blog.csdn.net/20150514152212309" alt="" /> 6.convert tablespace 在rman里执行 CONVERT TABLESPACE app_test TO PLATFORM 'Linux IA(32-bit)' db_file_name_convert '/xxxx/xxx','/xxxx/xx' 7.ftp 拷贝 目的 ,元素据文件 metadata, datafile 目标数据库: create user user1 identified by user1; create DIRECTORY test_dir as '/xxx/xxx/xxx/bak' grant connect, resource to user1;8.导入元数据 impdp dumpfile=APP_TEST.DMP directory=test_dir transport_datafile='/xxx/xxx/xxx/targedir/app_test01.dbf'alter tablespace app_test read write;alter user user1 default tablespace app_test;conn user1/user1select * from tab;select segment_name ,tablespace_name from user_segments;
Transporting Database
Database Transportation Procedure: Source System Conversion
移植前 如果表空间是readonly 方式, 先变为read-write, 然后在变成 readonly方式
Database Transportation :Consideration
1.Create the password file on the target platform
2.Transport the BFILEs used in the source database
3.The generated PFILE and transport script use OMF
4.Use DBNEWID to change the DBID
需要在目标系统创建 控制文件(源数据库通过rman 会生成脚本,需要在目标机执行), 联机重做日志, 临时性表空间
1.源数据库: database--ora11gr2-read-only startup mount alter database open readonly //只读 set serveroutput on declare db_ready boolean; begin db_ready:=dbms_tdb.check_db('Linux IA(32-bit)'); end; / 看外部表: declare external boolean:begin external:=dbms_tdb.check_external;end;/登录RMAN convert database new database 'keelodb' transport script 'F:\app\User\oradata\bak\kelodb.sql' to platform 'Linux IX(32-bit)' db_file_name_convert 'F:\app\User\oradata\ora11gr' , 'F:\app\User\oradata\kelodb' 4.复制文件到目标平台 把F:\app\User\oradata\kelodb 下生成的文件复制到目标文件夹下 修改脚本文件和初始化参数文件改参数文件的名字: INITKELODB.ORA (rman转换过程中会提示 这个文件生成在哪里)修改 INITKELODB.ORA, 可以修改控制文件的路径F:\app\User\oradata\bak\kelodb.sql 改一下这个脚本,比如所日志文件的目录到目标机器上: set ORACLE_SID=kelodb oradim.exe-new -sid kelod -startmode manual -spfile windows平台下 还需要这个命令 startup nomount; 创建数据库和控制文件: 用 F:\app\User\oradata\bak\kelodb.sql 里的SQL 建库 alter database open resetlogs 这里创建联机重做日志 alter tablespace temp add tempfile='F;\app\User\oradata\kelodb\temp1.dbf' size 20M shutdown immediate startup upgrage(参照kelodb.sql) 运行脚本编译对象: @F:\app\User\product\11.2.0\dbhome_1\RDBMS\ADMIN\utlrp.sql shutdown immediate; startup @F:\app\User\product\11.2.0\dbhome_1\RDBMS\ADMIN\utlrp.sql //再运行 select * from all_user; select name from v$datebase;
0 0
- oracle10g/11g 新特性十二(数据库空间管理)
- oracle10g/11g 新特性十一(表空间管理)
- oracle10g/11g 新特性四(管理内存)
- Oracle10g新特性—表空间管理
- oracle10g/11g 新特性六(数据库维护)
- oracle10g/11g 新特性九(数据库诊断)
- oracle10g/11g 新特性十三(数据库复制)
- oracle10g/11g 新特性一(ASM)
- oracle10g/11g 新特性二(Flashback Database)
- oracle10g/11g 新特性三(Flashback Table)
- oracle10g/11g 新特性五(用Shceduler自动化)
- oracle10g/11g 新特性七(性能维护)
- oracle10g/11g 新特性八(SQL性能调优)
- oracle10g/11g 新特性十(数据移植)
- Oracle10g新特性-SYSAUX表空间
- Oracle 数据库 11g新特性:安全性
- Oracle 数据库 11g新特性:安全性
- 用 Navicat for Oracle 管理 Oracle10g/11g 数据库
- scanf函数与华为机试题
- Android控件之ScrollView探究
- 编程基本功之数组交叉合并
- 8大排序算法图文讲解
- java6,7,8中String.intern进化史与深度剖析
- oracle10g/11g 新特性十二(数据库空间管理)
- select from update row的实现
- ongoDB 基础(七)复制
- 开源 java CMS - FreeCMS2.3 站内信
- HM测试数据处理
- 一个优秀程序员具备的15个特性
- Freemarker的常用技巧总结
- POJ 1006
- 【第八章】 对ORM的支持 之 8.3 集成iBATIS ——跟我学spring3