跨平台迁移oracle数据库指南(3)

来源:未知 责任编辑:责任编辑 发表时间:2013-12-01 14:21 点击:
三.在linux服务器上准备相应的目录,并将上传的文件移动到相关的目录,修改控制文件脚本和初始化参数文件 1. [root@rhel6 ~]# mount -t cifs -o username=yang //192.168.50.195/data  /mnt  2. Password:   3. [root@rhel6 ~]# ls /mnt  4. DATA_D-WINORCL_I-1904915064_TS-EXAMPLE_FNO-5_03MHMQUN  DATA_D-WINORCL_I-1904915064_TS-UNDOTBS1_FNO-2_04MHMQUU     INIT_00MHMQTE_1_0.ORA  5. DATA_D-WINORCL_I-1904915064_TS-SYSAUX_FNO-3_02MHMQU8   DATA_D-WINORCL_I-1904915064_TS-USERS_FNO-4_06MHMQV3        winorcl_ora_4056.trc  6. DATA_D-WINORCL_I-1904915064_TS-SYSTEM_FNO-1_01MHMQTF   DATA_D-WINORCL_I-1904915064_TS-WIN_MIGRATE_FNO-6_05MHMQV2  7.  8. [oracle@rhel6 ~]$ mkdir -p /u01/app/admin/winorcl/{adump,bdump,cdump,udump}  9. [oracle@rhel6 ~]$ mkdir -p /u01/app/oradata/winorcl  10. [oracle@rhel6 ~]$ mkdir -p /u01/app/flash_recovery_area/WINORCL  11.  12. [oracle@rhel6 ~]$ cp /mnt/DATA_D-WINORCL_I-1904915064_TS-* /u01/app/oradata/winorcl/  13. [oracle@rhel6 ~]$ cp /mnt/INIT_00MHMQTE_1_0.ORA $ORACLE_HOME/dbs/initwinorcl.ora  14. [oracle@rhel6 ~]$ cp /mnt/winorcl_ora_4056.trc  ~/winorcl.sql  15.  16. [oracle@rhel6 ~]$ cd /u01/app/oradata/winorcl  17. [oracle@rhel6 winorcl]$ mv DATA_D-WINORCL_I-1904915064_TS-EXAMPLE_FNO-5_03MHMQUN example01.dbf  18. [oracle@rhel6 winorcl]$ mv DATA_D-WINORCL_I-1904915064_TS-SYSAUX_FNO-3_02MHMQU8  sysaux01.dbf  19. [oracle@rhel6 winorcl]$ mv DATA_D-WINORCL_I-1904915064_TS-SYSTEM_FNO-1_01MHMQTF  system01.dbf  20. [oracle@rhel6 winorcl]$ mv DATA_D-WINORCL_I-1904915064_TS-UNDOTBS1_FNO-2_04MHMQUU undotbs1.dbf  21. [oracle@rhel6 winorcl]$ mv DATA_D-WINORCL_I-1904915064_TS-USERS_FNO-4_06MHMQV3    users01.dbf  22. [oracle@rhel6 winorcl]$ mv DATA_D-WINORCL_I-1904915064_TS-WIN_MIGRATE_FNO-6_05MHMQV2  win_migrate01.dbf  23.  24. [oracle@rhel6 ~]$ cat winorcl.sql   25. CREATE CONTROLFILE REUSE SET DATABASE "winorcl" RESETLOGS  ARCHIVELOG  26.     MAXLOGFILES 16  27.     MAXLOGMEMBERS 3  28.     MAXDATAFILES 100  29.     MAXINSTANCES 8  30.     MAXLOGHISTORY 292  31. LOGFILE  32.   GROUP 1 '/u01/app/oradata/winorcl/redo01.dbf'  SIZE 50M,  33.   GROUP 2 '/u01/app/oradata/winorcl/redo02.dbf'  SIZE 50M,  34.   GROUP 3 '/u01/app/oradata/winorcl/redo03.dbf'  SIZE 50M  35. DATAFILE  36.   '/u01/app/oradata/winorcl/system01.dbf',  37.   '/u01/app/oradata/winorcl/undotbs1.dbf',  38.   '/u01/app/oradata/winorcl/sysaux01.dbf',  39.   '/u01/app/oradata/winorcl/users01.dbf',  40.   '/u01/app/oradata/winorcl/example01.dbf',  41.   '/u01/app/oradata/winorcl/win_migrate01.dbf'  42. CHARACTER SET ZHS16GBK  43. ;  44.  45. [oracle@rhel6 dbs]$ grep -v '^$' initwinorcl.ora   46. # Please change the values of the following parameters:  47.   control_files            = "/u01/app/oradata/winorcl/control01.dbf","/u01/app/oradata/winorcl/control02.dbf"  48.   db_recovery_file_dest    = "/u01/app/flash_recovery_area" 49.   db_recovery_file_dest_size= 21474836480 50.   audit_file_dest          = "/u01/app/admin/winorcl/adump" 51.   background_dump_dest     = "/u01/app/admin/winorcl/bdump" 52.   user_dump_dest           = "/u01/app/admin/winorcl/udump" 53.   core_dump_dest           = "/u01/app/admin/winorcl/cdump" 54.   db_name                  = "winorcl" 55. # Please review the values of the following parameters:  56.   __shared_pool_size       = 167772160 57.   __large_pool_size        = 4194304 58.   __java_pool_size         = 16777216 59.   __streams_pool_size      = 0 60.   __db_cache_size          = 415236096 61.   remote_login_passwordfile= "EXCLUSIVE" 62.   db_domain                = "766.com" 63.   dispatchers              = "(PROTOCOL=TCP) (SERVICE=winorclXDB)" 64. # The values of the following parameters are from source database:  65.   processes                = 150 66.   nls_language             = "SIMPLIFIED CHINESE" 67.   nls_territory            = "CHINA" 68.   sga_target               = 612368384 69.   db_block_size            = 8192 70.   compatible               = "10.2.0.1.0" 71.   log_archive_format       = "ARC%S_%R.%T" 72.   db_file_multiblock_read_count= 16 73.   undo_management          = "AUTO" 74.   undo_tablespace          = "UNDOTBS1" 75.   job_queue_processes      = 10 76.   open_cursors             = 300 77.   pga_aggregate_target     = 203423744 四:开始迁移 1. [oracle@rhel6 ~]$ export ORACLE_SID=winorcl 2. [oracle@rhel6 ~]$ sqlplus /nolog  3. SQL*Plus: Release 10.2.0.1.0 - Production on Sun Jul 17 20:25:10 2011  4. Copyright (c) 1982, 2005, Oracle.  All rights reserved.  5.  6. SQL> conn /as sysdba  7. Connected to an idle instance.  8. SQL> create spfile from pfile;  9. File created.  10.  11. SQL> startup nomount  12. ORACLE instance started.  13. Total System Global Area  612368384 bytes  14. Fixed Size                  2022696 bytes  15. Variable Size             188744408 bytes  16. Database Buffers          415236096 bytes  17. Redo Buffers                6365184 bytes  18.  19. SQL> @/home/oracle/winorcl.sql;  20. Control file created.  21.  22.  23. SQL> alter database open resetlogs;  24. Database altered.  25.  26. SQL> select dbid,name from v$database;  27.  28.       DBID NAME  29. ---------- ---------------------------  30. 1904915064 WINORCL  31.  32. SQL> select * from t_migrate;  33.  34.          A  35. ----------  36.          1  37.  38. SQL> select tablespace_name from dba_tablespaces;  39.  40. TABLESPACE_NAME  41. --------------------------------------------------------------------------------  42. SYSTEM  43. UNDOTBS1  44. SYSAUX  45. TEMP  46. USERS  47. EXAMPLE  48. WIN_MIGRATE  49.  50. 7 rows selected.  51.  52. SQL> alter tablespace temp add tempfile '/u01/app/oradata/winorcl/temp01.dbf' size 50M;  53. Tablespace altered. 五:收尾工作 1. SQL> shutdown immediate  2. Database closed.  3. Database dismounted.  4. ORACLE instance shut down.  5. SQL> startup upgrade  6. ORACLE instance started.  7.  8. Total System Global Area  268435456 bytes  9. Fixed Size                  2020056 bytes  10. Variable Size              83889448 bytes  11. Database Buffers          176160768 bytes  12. Redo Buffers                6365184 bytes  13. Database mounted.  14. Database opened.  15.  16. SQL> @?/rdbms/admin/utlirp.sql;  17. SQL> spool /tmp/upgrade.log  18. SQL> @?/rdbms/admin/utlrp.sql;  19. SQL> startup force   本文出自 “月牙天冲” 博客
发表评论
请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。
用户名: 验证码:点击我更换图片
最新评论 更多>>

推荐热点

  • Table函数使用简介
  • Oracle数据库Constraint约束的常用操作及异常处理
  • Bulk Collect性能分析(zz)
  • export/import的使用
  • OCP043第十五讲 Database Security
  • ORACLE10gr2数据导入MySQL方案
  • oracle 让sys用户可以使用isqlplus
  • 在oracle数据库下使用iSQL*Plus DBA访问数据库
  • Oracle行列转换小结
网站首页 - 友情链接 - 网站地图 - TAG标签 - RSS订阅 - 内容搜索
Copyright © 2008-2015 计算机技术学习交流网. 版权所有

豫ICP备11007008号-1