时间:2021-07-01 10:21:17 帮助过:38人阅读
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;