SQL> create directory dt_ws5 as '/home/oracle/dir'; Directory created.
11.检查源端和目标端的BLOCK_SIZE是否一致 源端:
SQL> select block_size from dba_tablespaces where tablespace_name='OLTP';
BLOCK_SIZE ---------- 8192 目标端:
SQL> show parameter db_block_size
NAME TYPE ------------------------------------ ---------------------- VALUE
------------------------------
db_block_size integer 8192
如不一致可在目标端通过诸如alter system set db_4k_cache_size=8M;语句来修改
12.将OLTP表空间对应的数据文件拷贝到EMREP数据库中 [oracle@rac1 ~]$ cp /u01/app/oracle/oradata/PROD/Disk1/oltp1.dbf /u01/app/oracle/oradata/EMREP/
13.导入传输集到EMREP数据库中,使OLTP表空间注册到EMREP数据库中
[oracle@rac1 ~]$ impdp system/oracle@emrep dumpfile='oltp.dmp' directory=dt_ws5 TRANSPORT_DATAFILES='/u01/app/oracle/oradata/EMREP/oltp1.dbf'
Import: Release 10.2.0.1.0 - Production on Friday, 09 March, 2012 11:04:00
Copyright (c) 2003, 2005, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production With the Partitioning, OLAP and Data Mining options
Master table \Starting \ system/********@emrep dumpfile=oltp.dmp directory=dt_ws5 TRANSPORT_DATAFILES=/u01/app/oracle/oradata/EMREP/oltp1.dbf Processing object type TRANSPORTABLE_EXPORT/PLUGTS_BLK Processing object type TRANSPORTABLE_EXPORT/TABLE
Processing object type TRANSPORTABLE_EXPORT/POST_INSTANCE/PLUGTS_BLK Job \
14.将OLTP表空间在PROD和EMREP数据库中均置为可读可写状态 [oracle@rac1 ~]$ sqlplus sys/oracle@emrep as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Fri Mar 9 11:05:09 2012 Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production With the Partitioning, OLAP and Data Mining options
SQL> alter tablespace oltp read write; Tablespace altered.
[oracle@rac1 scripts]$ sqlplus sys/oracle@prod as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Fri Mar 9 11:05:58 2012 Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production With the Partitioning, OLAP and Data Mining options
SQL> alter tablespace oltp read write; Tablespace altered.
Create Additional Buffer Cache
1. Create an additional buffer cache within the SGA of the PROD database for use with 16KB blocks.Ensure that the 16KB buffer cache will always be available in the SGA.
题目说明:在PROD数据库的SGA中创建额外的块大小为16k的buffer cache,保证它将一直在SGA中可用。
[oracle@rac1 scripts]$ sqlplus sys/oracle@prod as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Fri Mar 9 13:43:00 2012 Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production With the Partitioning, OLAP and Data Mining options
SQL> alter system set db_16k_cache_size=16M; System altered.
SQL> startup force;
ORACLE instance started.
Total System Global Area 314572800 bytes Fixed Size 1219184 bytes Variable Size 138413456 bytes Database Buffers 171966464 bytes Redo Buffers 2973696 bytes Database mounted. Database opened.
Working with LOB Data
1. Create a new tablespace named LOB_DATA in the PROD database to store lob data and lob indexes with the following specifications:
1.1 Create 2 datafiles each in a different location. 1.2 Each file should be 64MB in size. 1.3 Block size 16KB
1.4 Determine which type of extent management would be best for lob data and configure the extents appropriately.
方法一:在Sqlplus中用命令行创建:
create tablespace LOB_DATA datafile '/u01/app/oracle/oradata/PROD/Disk1/lob_data01.dbf' size 64M
autoextend on next 2M,
'/u01/app/oracle/oradata/PROD/Disk2/lob_data02.dbf' size 64M autoextend on next 2M
extent management local uniform size 2M segment space management auto blocksize 16k;
将以上创建LOB_DATA表空间的脚本保存为lob_data.sql,然后在Sqlplus中运行lob_data.sql [oracle@rac1 scripts]$ sqlplus sys/oracle@prod as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Fri Mar 9 13:55:32 2012 Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production With the Partitioning, OLAP and Data Mining options
SQL> @lob_data.sql Tablespace created.
方法二:用GC图形界面创建: