>  기사  >  데이터 베이스  >  Oracle数据库克隆实验系列-停机克隆-数据库同名克隆

Oracle数据库克隆实验系列-停机克隆-数据库同名克隆

WBOY
WBOY원래의
2016-06-07 16:47:35862검색

1、Oracle同名克隆-131服务器上新建库PROD1,然后将其迁移至137服务器,库名仍为PROD1 1.1 dbca-131 PROD1 sys/oracle system/or

1、Oracle同名克隆-131服务器上新建库PROD1,然后将其迁移至137服务器,,库名仍为PROD1
 1.1 dbca-131 PROD1
 sys/oracle
 system/oracle
 uncheck all components
 no EM
 no Flashback
 no Archiving
 ORA-00845 when using dbca to create a database
 Starting with Oracle Database 11g, the Automatic Memory Management feature requires more shared memory (/dev/shm)and file descriptors. The size of the shared memory should be at least the greater of MEMORY_MAX_TARGET and MEMORY_TARGET for each Oracle instance on the computer. If MEMORY_MAX_TARGET or MEMORY_TARGET is set to a non zero value, and an incorrect size is assigned to the shared memory, it will result in an ORA-00845 error at startup.
 

[oracle@oelr5u8-1 admin]$ df -h | grep shm
 tmpfs                2.0G  400M  1.6G  20% /dev/shm
 

for it's only 400M and less than the parameter memory_target=1.6G
 so let's modify it to 2G
 [root@oelr5u8-1 ~]# vi /etc/fstab
 modify:
 tmpfs                  /dev/shm                tmpfs  defaults  0 0
 to:
 tmpfs                  /dev/shm                tmpfs  defaults,size=2G  0 0
 init 6
 

then do the same on 192.168.182.137
 

export ORACLE_SID=PROD1
 sqlplus / as sysdba
 

SYS@PROD1>select dbid from v$database;
 

      DBID
 ----------
 2065008095
 

 

SYS@PROD1>create pfile from spfile;
 

File created.
 

SYS@PROD1>alter database backup controlfile to trace;
 

Database altered.
 

SYS@PROD1>show parameter user_dump
 

NAME                                TYPE        VALUE
 ------------------------------------ ----------- ------------------------------
 user_dump_dest                      string      /u01/app/oracle/diag/rdbms/pro
                                                  d1/PROD1/trace
                                                 
 cd /u01/app/oracle/diag/rdbms/prod1/PROD1/trace
 [oracle@oelr5u8-1 trace]$ cp PROD1_ora_6245.trc /home/oracle/control01.txt
 cd
 vi control01.txt
 -- Other tempfiles may require adjustment.
 ALTER TABLESPACE TEMP ADD TEMPFILE '/u01/app/oracle/oradata/PROD1/temp01.dbf'
      SIZE 20971520  REUSE AUTOEXTEND ON NEXT 655360  MAXSIZE 32767M;
 -- End of tempfile additions.
 STARTUP NOMOUNT
 CREATE CONTROLFILE REUSE DATABASE "PROD1" RESETLOGS  NOARCHIVELOG
    MAXLOGFILES 16
    MAXLOGMEMBERS 3
    MAXDATAFILES 100
    MAXINSTANCES 8
    MAXLOGHISTORY 292
 LOGFILE
  GROUP 1 '/u01/app/oracle/oradata/PROD1/redo01.log'  SIZE 50M BLOCKSIZE 512,
  GROUP 2 '/u01/app/oracle/oradata/PROD1/redo02.log'  SIZE 50M BLOCKSIZE 512,
  GROUP 3 '/u01/app/oracle/oradata/PROD1/redo03.log'  SIZE 50M BLOCKSIZE 512
 -- STANDBY LOGFILE
 DATAFILE
  '/u01/app/oracle/oradata/PROD1/system01.dbf',
  '/u01/app/oracle/oradata/PROD1/sysaux01.dbf',
  '/u01/app/oracle/oradata/PROD1/undotbs01.dbf',
  '/u01/app/oracle/oradata/PROD1/users01.dbf'
 CHARACTER SET AL32UTF8
 ;
 

[oracle@oelr5u8-1 ~]$ scp control01.txt oel6.4-1:~
 

1.2 cold backup tar-131 PROD1
 

SYS@PROD1>select name from v$dbfile;
 

NAME
 --------------------------------------------------------------------------------
 /u01/app/oracle/oradata/PROD1/system01.dbf
 /u01/app/oracle/oradata/PROD1/sysaux01.dbf
 /u01/app/oracle/oradata/PROD1/undotbs01.dbf
 /u01/app/oracle/oradata/PROD1/users01.dbf
 

 

SYS@PROD1>select member from v$logfile;
 

MEMBER
 --------------------------------------------------------------------------------
 /u01/app/oracle/oradata/PROD1/redo01.log
 /u01/app/oracle/oradata/PROD1/redo02.log
 /u01/app/oracle/oradata/PROD1/redo03.log
 

SYS@PROD1>select name from v$controlfile;
 

성명:
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.