oracle迁移(rman)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 | 原库: 192.168.162.199 node01 目标库: 192.168.162.200 oracle11g 目标库: [oracle@oracle11g dbs]$ vi ~/.bash_profile export PATH export ORACLE_BASE=/u01/app/oracle export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1 export ORACLE_SID=orcl export PATH=$PATH:$ORACLE_HOME/bin [oracle@oracle11g dbs]$ source ~/.bash_profile [oracle@oracle11g dbs]$ mkdir -p /home/oracle/backup [oracle@oracle11g dbs]$ mkdir -p /u01/app/oracle/admin/orcl/adump [oracle@oracle11g dbs]$ mkdir -p /u01/app/oracle/oradata/orcl [oracle@oracle11g dbs]$ mkdir -p /u01/app/oracle/fast_recovery_area/orcl [oracle@oracle11g dbs]$ mkdir -p /home/oracle/archivelog 原库: [oracle@node01 dbs]$ sqlplus / as sysdba SQL*Plus: Release 11.2.0.4.0 Production on Fri May 20 22:13:52 2022 Copyright (c) 1982, 2013, Oracle. All rights reserved. Connected to an idle instance. SQL> create pfile from spfile; File created. [oracle@node01 dbs]$ scp orapworcl oracle11g:/u01/app/oracle/product/11.2.0/db_1/dbs/ oracle@oracle11g's password: orapworcl 100% 1536 18.6KB/s 00:00 [oracle@node01 dbs]$ scp initorcl.ora oracle11g:/u01/app/oracle/product/11.2.0/db_1/dbs/ oracle@oracle11g's password: initorcl.ora 100% 891 215.7KB/s 00:00 目标库: 修改从主库传送过来的initorcl.ora文件 orcl.__db_cache_size=314572800 orcl.__java_pool_size=4194304 orcl.__large_pool_size=8388608 orcl.__oracle_base= '/u01/app/oracle' #ORACLE_BASE set from environment orcl.__pga_aggregate_target=306184192 orcl.__sga_target=457179136 orcl.__shared_io_pool_size=0 orcl.__shared_pool_size=121634816 orcl.__streams_pool_size=0 *.audit_file_dest= '/u01/app/oracle/admin/orcl/adump' *.audit_trail= 'db' *.compatible= '11.2.0.4.0' *.control_files= '/u01/app/oracle/oradata/orcl/control01.ctl' , '/u01/app/oracle/fast_recovery_area/orcl/control02.ctl' *.db_block_size=8192 *.db_domain= '' *.db_name= 'orcl' *.db_recovery_file_dest_size=4385144832 *.db_recovery_file_dest= '/home/oracle/archivelog' *.diagnostic_dest= '/u01/app/oracle' *.dispatchers= '(PROTOCOL=TCP) (SERVICE=orclXDB)' *.memory_target=763363328 *.open_cursors=300 *.processes=150 *.remote_login_passwordfile= 'EXCLUSIVE' *.undo_tablespace= 'UNDOTBS1' [oracle@oracle11g dbs]$ sqlplus / as sysdba SQL*Plus: Release 11.2.0.4.0 Production on Sat May 21 00:46:27 2022 Copyright (c) 1982, 2013, Oracle. All rights reserved. Connected to an idle instance. SQL> create spfile from pfile; File created. 原库: RMAN> CONFIGURE CONTROLFILE AUTOBACKUP ON; new RMAN configuration parameters: CONFIGURE CONTROLFILE AUTOBACKUP ON; new RMAN configuration parameters are successfully stored RMAN> CONFIGURE BACKUP OPTIMIZATION ON; new RMAN configuration parameters: CONFIGURE BACKUP OPTIMIZATION ON; new RMAN configuration parameters are successfully stored RMAN> show all; RMAN configuration parameters for database with db_unique_name ORCL are: CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default CONFIGURE BACKUP OPTIMIZATION ON; CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default CONFIGURE CONTROLFILE AUTOBACKUP ON; CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F' ; # default CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default CONFIGURE MAXSETSIZE TO UNLIMITED; # default CONFIGURE ENCRYPTION FOR DATABASE OFF; # default CONFIGURE ENCRYPTION ALGORITHM 'AES128' ; # default CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/11.2.0/db_1/dbs/snapcf_orcl.f' ; # default [oracle@node01 dbs]$ rman target / Recovery Manager: Release 11.2.0.4.0 - Production on Fri May 20 22:33:30 2022 Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved. connected to target database: ORCL (DBID=1594731755, not open) 数据库全备脚本: run { allocate channel c1 type disk; allocate channel c2 type disk; allocate channel c3 type disk; backup database format '/home/oracle/backup/full_%d_%T_%s_%p' ; sql 'alter system archive log current' ; sql 'alter system archive log current' ; sql 'alter system archive log current' ; backup archivelog all format '/home/oracle/backup/arch_%d_%T_%s_%p' ; backup current controlfile format '/home/oracle/backup/ctl_bf' ; release channel c1; release channel c2; release channel c3; } RMAN> run { allocate channel c1 type disk; allocate channel c2 type disk; allocate channel c3 type disk; backup database format '/home/oracle/backup/full_%d_%T_%s_%p' ; 2> 3> 4> 5> 6> sql 'alter system archive log current' ; sql 'alter system archive log current' ; sql 'alter system archive log current' ; backup archivelog all format '/home/oracle/backup/arch_%d_%T_%s_%p' ; backup current controlfile format '/home/oracle/backup/ctl_bf' ; release channel c1; release channel c2; release channel c3; }7> 8> 9> 10> 11> 12> 13> 14> 15> using target database control file instead of recovery catalog allocated channel: c1 channel c1: SID=40 device type=DISK allocated channel: c2 channel c2: SID=1 device type=DISK allocated channel: c3 channel c3: SID=29 device type=DISK Starting backup at 21-MAY-22 channel c1: starting full datafile backup set channel c1: specifying datafile(s) in backup set input datafile file number=00001 name=/u01/app/oracle/oradata/orcl/system01.dbf input datafile file number=00004 name=/u01/app/oracle/oradata/orcl/users01.dbf channel c1: starting piece 1 at 21-MAY-22 channel c2: starting full datafile backup set channel c2: specifying datafile(s) in backup set input datafile file number=00002 name=/u01/app/oracle/oradata/orcl/sysaux01.dbf input datafile file number=00005 name=/u01/app/oracle/oradata/orcl/test01.dbf channel c2: starting piece 1 at 21-MAY-22 channel c3: starting full datafile backup set channel c3: specifying datafile(s) in backup set input datafile file number=00006 name=/u01/app/oracle/oradata/orcl/par01.dbf input datafile file number=00003 name=/u01/app/oracle/oradata/orcl/undotbs01.dbf channel c3: starting piece 1 at 21-MAY-22 channel c3: finished piece 1 at 21-MAY-22 piece handle=/home/oracle/backup/full_ORCL_20220521_32_1 tag=TAG20220521T092637 comment=NONE channel c3: backup set complete, elapsed time: 00:00:03 channel c1: finished piece 1 at 21-MAY-22 piece handle=/home/oracle/backup/full_ORCL_20220521_30_1 tag=TAG20220521T092637 comment=NONE channel c1: backup set complete, elapsed time: 00:00:17 channel c2: finished piece 1 at 21-MAY-22 piece handle=/home/oracle/backup/full_ORCL_20220521_31_1 tag=TAG20220521T092637 comment=NONE channel c2: backup set complete, elapsed time: 00:00:17 Finished backup at 21-MAY-22 Starting Control File and SPFILE Autobackup at 21-MAY-22 piece handle=/home/oracle/archivelog/ORCL/autobackup/2022_05_21/o1_mf_s_1105262814_k8jhyybk_.bkp comment=NONE Finished Control File and SPFILE Autobackup at 21-MAY-22 sql statement: alter system archive log current sql statement: alter system archive log current sql statement: alter system archive log current Starting backup at 21-MAY-22 current log archived channel c1: starting archived log backup set channel c1: specifying archived log(s) in backup set input archived log thread=1 sequence=18 RECID=13 STAMP=1080207245 input archived log thread=1 sequence=19 RECID=14 STAMP=1080581343 input archived log thread=1 sequence=20 RECID=15 STAMP=1080928361 input archived log thread=1 sequence=21 RECID=16 STAMP=1080990018 channel c1: starting piece 1 at 21-MAY-22 channel c2: starting archived log backup set channel c2: specifying archived log(s) in backup set input archived log thread=1 sequence=22 RECID=17 STAMP=1081327526 input archived log thread=1 sequence=23 RECID=18 STAMP=1105226487 input archived log thread=1 sequence=24 RECID=19 STAMP=1105226487 input archived log thread=1 sequence=25 RECID=20 STAMP=1105226489 input archived log thread=1 sequence=26 RECID=21 STAMP=1105226489 input archived log thread=1 sequence=27 RECID=22 STAMP=1105262007 channel c2: starting piece 1 at 21-MAY-22 channel c3: starting archived log backup set channel c3: specifying archived log(s) in backup set input archived log thread=1 sequence=28 RECID=23 STAMP=1105262478 input archived log thread=1 sequence=29 RECID=24 STAMP=1105262478 input archived log thread=1 sequence=30 RECID=25 STAMP=1105262478 input archived log thread=1 sequence=31 RECID=26 STAMP=1105262482 input archived log thread=1 sequence=32 RECID=27 STAMP=1105262815 input archived log thread=1 sequence=33 RECID=28 STAMP=1105262815 channel c3: starting piece 1 at 21-MAY-22 channel c1: finished piece 1 at 21-MAY-22 piece handle=/home/oracle/backup/arch_ORCL_20220521_34_1 tag=TAG20220521T092658 comment=NONE channel c1: backup set complete, elapsed time: 00:00:01 channel c1: starting archived log backup set channel c1: specifying archived log(s) in backup set input archived log thread=1 sequence=34 RECID=29 STAMP=1105262818 input archived log thread=1 sequence=35 RECID=30 STAMP=1105262818 channel c1: starting piece 1 at 21-MAY-22 channel c2: finished piece 1 at 21-MAY-22 piece handle=/home/oracle/backup/arch_ORCL_20220521_35_1 tag=TAG20220521T092658 comment=NONE channel c2: backup set complete, elapsed time: 00:00:01 channel c3: finished piece 1 at 21-MAY-22 piece handle=/home/oracle/backup/arch_ORCL_20220521_36_1 tag=TAG20220521T092658 comment=NONE channel c3: backup set complete, elapsed time: 00:00:01 channel c1: finished piece 1 at 21-MAY-22 piece handle=/home/oracle/backup/arch_ORCL_20220521_37_1 tag=TAG20220521T092658 comment=NONE channel c1: backup set complete, elapsed time: 00:00:00 Finished backup at 21-MAY-22 Starting backup at 21-MAY-22 channel c1: starting full datafile backup set channel c1: specifying datafile(s) in backup set including current control file in backup set channel c1: starting piece 1 at 21-MAY-22 channel c1: finished piece 1 at 21-MAY-22 piece handle=/home/oracle/backup/ctl_bf tag=TAG20220521T092659 comment=NONE channel c1: backup set complete, elapsed time: 00:00:01 Finished backup at 21-MAY-22 Starting Control File and SPFILE Autobackup at 21-MAY-22 piece handle=/home/oracle/archivelog/ORCL/autobackup/2022_05_21/o1_mf_s_1105262821_k8jhz5xj_.bkp comment=NONE Finished Control File and SPFILE Autobackup at 21-MAY-22 released channel: c1 released channel: c2 released channel: c3 [oracle@node01 dbs]$ cd /home/oracle/backup/ [oracle@node01 backup]$ ll total 1272524 -rw-r----- 1 oracle oinstall 54942720 May 20 23:21 arch_ORCL_20220520_19_1 -rw-r----- 1 oracle oinstall 91010048 May 20 23:21 arch_ORCL_20220520_20_1 -rw-r----- 1 oracle oinstall 7749632 May 20 23:21 arch_ORCL_20220520_21_1 -rw-r----- 1 oracle oinstall 2560 May 20 23:21 arch_ORCL_20220520_22_1 -rw-r----- 1 oracle oinstall 9797632 May 20 23:21 ctl_bf -rw-r----- 1 oracle oinstall 667172864 May 20 23:21 full_ORCL_20220520_15_1 -rw-r----- 1 oracle oinstall 461086720 May 20 23:21 full_ORCL_20220520_16_1 -rw-r----- 1 oracle oinstall 11296768 May 20 23:21 full_ORCL_20220520_17_1 [oracle@node01 backup]$ scp * 192.168.162.200:/home/oracle/backup oracle@192.168.162.200's password: arch_ORCL_20220520_19_1 100% 52MB 52.3MB/s 00:01 arch_ORCL_20220520_20_1 100% 87MB 52.1MB/s 00:01 arch_ORCL_20220520_21_1 100% 7568KB 48.7MB/s 00:00 arch_ORCL_20220520_22_1 100% 2560 3.0MB/s 00:00 ctl_bf 100% 9568KB 49.5MB/s 00:00 full_ORCL_20220520_15_1 100% 636MB 49.1MB/s 00:12 full_ORCL_20220520_16_1 100% 440MB 20.6MB/s 00:21 full_ORCL_20220520_17_1 100% 11MB 12.6MB/s 00:00 目标库: [oracle@oracle11g backup]$ ll total 1310452 -rw-r----- 1 oracle oinstall 98667008 May 21 01:29 arch_ORCL_20220521_34_1 -rw-r----- 1 oracle oinstall 93436416 May 21 01:29 arch_ORCL_20220521_35_1 -rw-r----- 1 oracle oinstall 1158656 May 21 01:29 arch_ORCL_20220521_36_1 -rw-r----- 1 oracle oinstall 3072 May 21 01:29 arch_ORCL_20220521_37_1 -rw-r----- 1 oracle oinstall 9797632 May 21 01:29 ctl_bf -rw-r----- 1 oracle oinstall 667164672 May 21 01:30 full_ORCL_20220521_30_1 -rw-r----- 1 oracle oinstall 461529088 May 21 01:30 full_ORCL_20220521_31_1 -rw-r----- 1 oracle oinstall 10133504 May 21 01:30 full_ORCL_20220521_32_1 [oracle@oracle11g backup]$ rman target / Recovery Manager: Release 11.2.0.4.0 - Production on Sat May 21 01:31:47 2022 Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved. connected to target database: ORCL (not mounted) RMAN> restore controlfile from '/home/oracle/backup/ctl_bf' ; Starting restore at 21-MAY-22 using target database control file instead of recovery catalog allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID=19 device type=DISK channel ORA_DISK_1: restoring control file channel ORA_DISK_1: restore complete, elapsed time: 00:00:01 output file name=/u01/app/oracle/oradata/orcl/control01.ctl output file name=/u01/app/oracle/fast_recovery_area/orcl/control02.ctl Finished restore at 21-MAY-22 RMAN> sql 'alter database mount' ; sql statement: alter database mount released channel: ORA_DISK_1 原库查看schema: [oracle@node01 backup]$ rman target / Recovery Manager: Release 11.2.0.4.0 - Production on Sat May 21 09:33:59 2022 Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved. connected to target database: ORCL (DBID=1594731755) RMAN> report schema; using target database control file instead of recovery catalog Report of database schema for database with db_unique_name ORCL List of Permanent Datafiles =========================== File Size(MB) Tablespace RB segs Datafile Name ---- -------- -------------------- ------- ------------------------ 1 740 SYSTEM *** /u01/app/oracle/oradata/orcl/system01.dbf 2 580 SYSAUX *** /u01/app/oracle/oradata/orcl/sysaux01.dbf 3 80 UNDOTBS1 *** /u01/app/oracle/oradata/orcl/undotbs01.dbf 4 5 USERS *** /u01/app/oracle/oradata/orcl/users01.dbf 5 10 TEST *** /u01/app/oracle/oradata/orcl/test01.dbf 6 500 PAR *** /u01/app/oracle/oradata/orcl/par01.dbf List of Temporary Files ======================= File Size(MB) Tablespace Maxsize(MB) Tempfile Name ---- -------- -------------------- ----------- -------------------- 1 29 TEMP 32767 /u01/app/oracle/oradata/orcl/temp01.dbf 目标库: 数据库还原脚本:<br>run { allocate channel c1 device type disk; allocate channel c2 device type disk; allocate channel c3 device type disk; set newname for datafile 1 to '/u01/app/oracle/oradata/orcl/system01.dbf' ; set newname for datafile 2 to '/u01/app/oracle/oradata/orcl/sysaux01.dbf' ; set newname for datafile 3 to '/u01/app/oracle/oradata/orcl/undotbs01.dbf' ; set newname for datafile 4 to '/u01/app/oracle/oradata/orcl/users01.dbf' ; set newname for datafile 5 to '/u01/app/oracle/oradata/orcl/test01.dbf' ; set newname for datafile 6 to '/u01/app/oracle/oradata/orcl/par01.dbf' ; restore database; switch datafile all; release channel c1; release channel c2; release channel c3; } recovery databases; RMAN> run { allocate channel c1 device type disk; allocate channel c2 device type disk; allocate channel c3 device type disk; set newname for datafile 1 to '/u01/app/oracle/oradata/orcl/system01.dbf' ; set newname for datafile 2 to '/u01/app/oracle/oradata/orcl/sysaux01.dbf' ; set newname for datafile 3 to '/u01/app/oracle/oradata/orcl/undotbs01.dbf' ; set newname for datafile 4 to '/u01/app/oracle/oradata/orcl/users01.dbf' ; set newname for datafile 5 to '/u01/app/oracle/oradata/orcl/test01.dbf' ; set newname for datafile 6 to '/u01/app/oracle/oradata/orcl/par01.dbf' ; restore database; switch datafile all; release channel c1; release channel c2; release channel c3; }2> 3> 4> 5> 6> 7> 8> 9> 10> 11> 12> 13> 14> 15> 16> 17> released channel: ORA_DISK_1 allocated channel: c1 channel c1: SID=19 device type=DISK allocated channel: c2 channel c2: SID=21 device type=DISK allocated channel: c3 channel c3: SID=22 device type=DISK executing command: SET NEWNAME executing command: SET NEWNAME executing command: SET NEWNAME executing command: SET NEWNAME executing command: SET NEWNAME executing command: SET NEWNAME Starting restore at 21-MAY-22 channel c1: starting datafile backup set restore channel c1: specifying datafile(s) to restore from backup set channel c1: restoring datafile 00003 to /u01/app/oracle/oradata/orcl/undotbs01.dbf channel c1: restoring datafile 00006 to /u01/app/oracle/oradata/orcl/par01.dbf channel c1: reading from backup piece /home/oracle/backup/full_ORCL_20220521_32_1 channel c2: starting datafile backup set restore channel c2: specifying datafile(s) to restore from backup set channel c2: restoring datafile 00001 to /u01/app/oracle/oradata/orcl/system01.dbf channel c2: restoring datafile 00004 to /u01/app/oracle/oradata/orcl/users01.dbf channel c2: reading from backup piece /home/oracle/backup/full_ORCL_20220521_30_1 channel c3: starting datafile backup set restore channel c3: specifying datafile(s) to restore from backup set channel c3: restoring datafile 00002 to /u01/app/oracle/oradata/orcl/sysaux01.dbf channel c3: restoring datafile 00005 to /u01/app/oracle/oradata/orcl/test01.dbf channel c3: reading from backup piece /home/oracle/backup/full_ORCL_20220521_31_1 channel c1: piece handle=/home/oracle/backup/full_ORCL_20220521_32_1 tag=TAG20220521T092637 channel c1: restored backup piece 1 channel c1: restore complete, elapsed time: 00:00:32 channel c3: piece handle=/home/oracle/backup/full_ORCL_20220521_31_1 tag=TAG20220521T092637 channel c3: restored backup piece 1 channel c3: restore complete, elapsed time: 00:00:38 channel c2: piece handle=/home/oracle/backup/full_ORCL_20220521_30_1 tag=TAG20220521T092637 channel c2: restored backup piece 1 channel c2: restore complete, elapsed time: 00:00:58 Finished restore at 21-MAY-22 released channel: c1 released channel: c2 released channel: c3 RMAN> recover database; Starting recover at 21-MAY-22 allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID=19 device type=DISK starting media recovery channel ORA_DISK_1: starting archived log restore to default destination channel ORA_DISK_1: restoring archived log archived log thread=1 sequence=32 channel ORA_DISK_1: restoring archived log archived log thread=1 sequence=33 channel ORA_DISK_1: reading from backup piece /home/oracle/backup/arch_ORCL_20220521_36_1 channel ORA_DISK_1: piece handle=/home/oracle/backup/arch_ORCL_20220521_36_1 tag=TAG20220521T092658 channel ORA_DISK_1: restored backup piece 1 channel ORA_DISK_1: restore complete, elapsed time: 00:00:01 archived log file name=/home/oracle/archivelog/ORCL/archivelog/2022_05_21/o1_mf_1_32_k8hncmpk_.arc thread=1 sequence=32 channel default : deleting archived log(s) archived log file name=/home/oracle/archivelog/ORCL/archivelog/2022_05_21/o1_mf_1_32_k8hncmpk_.arc RECID=32 STAMP=1105234547 archived log file name=/home/oracle/archivelog/ORCL/archivelog/2022_05_21/o1_mf_1_33_k8hncmqp_.arc thread=1 sequence=33 channel default : deleting archived log(s) archived log file name=/home/oracle/archivelog/ORCL/archivelog/2022_05_21/o1_mf_1_33_k8hncmqp_.arc RECID=31 STAMP=1105234547 channel ORA_DISK_1: starting archived log restore to default destination channel ORA_DISK_1: restoring archived log archived log thread=1 sequence=34 channel ORA_DISK_1: restoring archived log archived log thread=1 sequence=35 channel ORA_DISK_1: reading from backup piece /home/oracle/backup/arch_ORCL_20220521_37_1 channel ORA_DISK_1: piece handle=/home/oracle/backup/arch_ORCL_20220521_37_1 tag=TAG20220521T092658 channel ORA_DISK_1: restored backup piece 1 channel ORA_DISK_1: restore complete, elapsed time: 00:00:01 archived log file name=/home/oracle/archivelog/ORCL/archivelog/2022_05_21/o1_mf_1_34_k8hncns7_.arc thread=1 sequence=34 channel default : deleting archived log(s) archived log file name=/home/oracle/archivelog/ORCL/archivelog/2022_05_21/o1_mf_1_34_k8hncns7_.arc RECID=33 STAMP=1105234548 archived log file name=/home/oracle/archivelog/ORCL/archivelog/2022_05_21/o1_mf_1_35_k8hncnsf_.arc thread=1 sequence=35 channel default : deleting archived log(s) archived log file name=/home/oracle/archivelog/ORCL/archivelog/2022_05_21/o1_mf_1_35_k8hncnsf_.arc RECID=34 STAMP=1105234548 unable to find archived log archived log thread=1 sequence=36 RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-03002: failure of recover command at 05/21/2022 01:35:49 RMAN-06054: media recovery requesting unknown archived log for thread 1 with sequence 36 and starting SCN of 1378316 原库: [oracle@node01 orcl]$ scp redo0* oracle11g:/u01/app/oracle/oradata/orcl/ Warning: the RSA host key for 'oracle11g' differs from the key for the IP address '192.168.162.200' Offending key for IP in /home/oracle/.ssh/known_hosts:1 Matching host key in /home/oracle/.ssh/known_hosts:2 Are you sure you want to continue connecting (yes/no)? yes oracle@oracle11g's password: redo01.log 100% 50MB 34.0MB/s 00:01 redo02.log 100% 50MB 44.2MB/s 00:01 redo03.log 100% 50MB 73.0MB/s 00:00 目标库: RMAN> recover database; Starting recover at 21-MAY-22 using channel ORA_DISK_1 starting media recovery archived log for thread 1 with sequence 36 is already on disk as file /u01/app/oracle/oradata/orcl/redo03.log archived log file name=/u01/app/oracle/oradata/orcl/redo03.log thread=1 sequence=36 media recovery complete, elapsed time: 00:00:01 Finished recover at 21-MAY-22 SQL> alter database open resetlogs; Database altered. 自此,rman迁移数据库完成! |
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 分享4款.NET开源、免费、实用的商城系统
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 记一次.NET内存居高不下排查解决与启示
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了