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;