SAP system copy-oracle change SID

Source: Internet
Author: User

ECCPRD to Q05 system copy 2018.01.25 first part V7000 storage for storage LUN copy
  1. Using a consistency group for LUN cloning
  2. To map a clone volume to a new host
  3. Force the import of the volume group on the new host because the AIX image is missing and the volume group cannot be imported properly with the-f parameter
    # importvg-y q05datavg-f HDISK11PV status:hdisk11 00067a4b2d12e06f pvactive hdisk12 00067a4b7901 a384 pvactive hdisk13 00067a4b7901a3d6 pvactive hdisk14 00067a4b7901a429 pvacti                    VE hdisk15 0001d23cddef5ee6 pvactive hdisk16 0001d23cde6afe3a pvactive        0001d23cde6a7b05 NONAME 00067a4bf5b39357 NONAME 00067a4bf5b39312                    NONAME 0001d23cddef5de1 NONAME 00067a4bf5b39285 NONAME 00067A4BF5B392CF Nonamevaryonvg:volume group Q05datavg is varied on.0516-510 synclvodm:physical Volume  Not found to physical volume identifier 00067a4bf5b392850000000000000000.0516-510 synclvodm:physical volume not found For physical volume identifier 00067a4bf5b392cf0000000000000000.0516-510 synclvodm:physical volume not found for Phys ical volume IdentifieR 00067a4bf5b393120000000000000000.0516-510 synclvodm:physical Volume not found for physical volume identifier 00067A4 bf5b393570000000000000000.0516-510 synclvodm:physical Volume not found for physical volume identifier 0001d23cddef5de1 0000000000000000.0516-510 synclvodm:physical Volume not found for physical volume identifier 0001d23cde6a7b05000000000 0000000.0516-548 synclvodm:partially successful with updating volume group Q05DATAVG.Q05DATAVGPV status:hdisk12        00067a4b7901a384 pvactive hdisk13 00067a4b7901a3d6 pvactive hdisk14 00067a4b7901a429            Pvactive hdisk11 00067a4b2d12e06f pvactive hdisk15 0001d23cddef5ee6 pvactive Hdisk16 0001d23cde6afe3a pvactive 0001d23cde6a7b05 NONAME 0006 7a4bf5b39357 NONAME 00067a4bf5b39312 NONAME 0001d23cddef5de1 NO                    NAME00067a4bf5b39285 NONAME 00067a4bf5b392cf nonamevaryonvg:volume Group Q05datavg is varied on.# lsvgrootvgq05datavg# lsvg-l q05datavgq05datavg:lv NAME TYPE LPs PPs PVs LV State MO     UNT POINTloglv00 jfs2log 1 2 2 closed/stale n/advdlv JFS2 200 400 2 CLOSED/SYNCD/DVDSAPMNTLV JFS2 2 closed/stale/sapmntusrsaplv JFS 2 3 Closed/syncd/usr/saporaclelv JFS2 2 Closed/syncd/orac LEORAPRDLV JFS2 2 closed/syncd/oracle/prdoradate1lv jfs2 6144 1228 8 8 closed/stale/oracle/prd/sapdata1oradate2lv jfs2 6144 12288 closed/stale/oracle/prd/s       APDATA2ORADATE3LV JFS2 3200 2 closed/stale/oracle/prd/sapdata3oradate4lv JFS2 2400 2 CLOSED/STALE/ORACLE/PRD/SAPDATA4ORAARCHLV JFS2 2 Closed/syncd/oracle/prd/oraarchorig        Logalv JFS2 4 8 2 CLOSED/STALE/ORACLE/PRD/ORIGLOGAORIGLOGBLV JFS2 4 8 2 Closed/stale/oracle/prd/origlogbmirrlogalv JFS2 4 8 2 CLOSED/STALE/ORACLE/PR      D/MIRRLOGAMIRRLOGBLV JFS2 4 8 2 closed/syncd/oracle/prd/mirrlogbpaging00 Paging 2 CLOSED/SYNCD n/apaging01 Paging 2 closed/syncd N/A
  4. The missing volumes are as follows

    0001d23cde6a7b05 NONAME
    00067a4bf5b39357 NONAME
    00067a4bf5b39312 NONAME
    0001d23cddef5de1 NONAME
    00067a4bf5b39285 NONAME
    00067A4BF5B392CF NONAME

  5. The missing PV can be manually removed, slightly

    Part II database Restore/Change SID
  6. Start the database normally for crash recovery
    MMNL started with pid=16, OS id=13238340oracle_base from environment =/oraclefri Jan 09:42:03 2018alter Database mount Fri Jan 09:42:08 2018Successful Mount of Redo thread 1, with Mount ID 2030095339Database mounted in Exclusive modelost Write protection Disabledcompleted:alter Database Mountalter database Openfri Jan 09:42:14 2018BLOCK change tracking F Ile is current. Beginning crash Recovery of 1 threadsparallel recovery started with 7 processesstarted redo scancompleted Redo Scanread 81 129 KB Redo, 17401 data blocks need Recoveryfri Jan 09:42:26 2018Started Redo Application Atthread 1:logseq 452162, bl Ock 92297Recovery of Online Redo log:thread 1 Group 4 Seq 452162 Reading mem 0mem# 0:/ORACLE/PRD/ORIGLOGB/LOG_G14M1.DBFM em# 1:/oracle/prd/mirrlogb/log_g14m2.dbfrecovery of Online Redo log:thread 1 Group 5 Seq 452163 Reading mem 0mem# 0:/or acle/prd/origloga/log_g15m1.dbfmem# 1:/oracle/prd/mirrloga/log_g15m2.dbfcompleted Redo Application of 65.45MBCompleted Crash Recovery Atthread 1:logseq 452163, Block 62783, SCN 613392435217401 data blocks read, 17400 data blocks written, 81129 Redo K- Bytes Readfri Jan 09:42:30 2018...smon:enabling tx recoverydatabase Characterset is utf8no Resource Manager plan Activ Efri Jan 09:42:39 2018Starting background process Qmncfri Jan 09:42:39 2018QMNC started with pid=31, OS id=30015654c Ompleted:alter Database Open
  7. Back up the SPFile and change the parameters as follows (restart verification and back up as Pfile)
    create pfile from spfile;aleter system set memory_max_target=24G scope=spfile;aleter system set memory_target=10G scope=spfile;aleter system set sga_max_size=5G scope=spfile;aleter system set db_cache_size=2G scope=spfile;aleter system set large_pool_size 1G scope=spfile;aleter system set shared_pool_size=2G scope=spfile;
  8. Backup control files to trace
    alter database backup controlfile to trace;
  9. Close database Change file system path (uninstall State)
    chfs -m /oracle/Q05 /oracle/PRDchfs -m /oracle/Q05/sapdata1 /oracle/PRD/sapdata1chfs -m /oracle/Q05/sapdata2 /oracle/PRD/sapdata2chfs -m /oracle/Q05/sapdata3 /oracle/PRD/sapdata3chfs -m /oracle/Q05/sapdata4 /oracle/PRD/sapdata4chfs -m /oracle/Q05/oraarch /oracle/PRD/oraarchchfs -m /oracle/Q05/origlogA /oracle/PRD/origlogAchfs -m /oracle/Q05/origlogB /oracle/PRD/origlogBchfs -m /oracle/Q05/mirrlogA /oracle/PRD/mirrlogAchfs -m /oracle/Q05/mirrlogB /oracle/PRD/mirrlogB
  10. Create the OS user and change the environment variables, change the file name below and replace the old SID in the files with the new SID
    Hara Hostname:sapprda
    New hostname:eccqasq05
    Hara SID:PRD
    New sid:q05
    .dbenv.csh.dbenv_SAPPRDA.csh.sapenv_SAPPRDA.csh
  11. Change the old SID in Listener and Tnsname files to the new SID
    Catalog:/oracle/sid/112_64/network/admin
  12. Change the profile file name and the path information inside
    Files:/oracle/sid/112_64/dbs/initsid.ora
  13. Edit the previous controlfile backup trace, specifying the new SID, which is eventually as follows:
    STARTUP nomountcreate controlfile Set DATABASE "Q05" resetlogs archivelogmaxlogfiles 255MAXLOGMEMBERS 3MAXDATAFILES 254M Axinstances 50MAXLOGHISTORY 23360LOGFILEGROUP 1 ('/oracle/q05/origloga/log_g11m1.dbf ', '/oracle/q05/mirrloga/log_ G11M2.DBF ') SIZE 200M BLOCKSIZE 512,group 2 ('/oracle/q05/origlogb/log_g12m1.dbf ', '/oracle/q05/mirrlogb/log_ G12M2.DBF ') SIZE 200M BLOCKSIZE 512,group 3 ('/oracle/q05/origloga/log_g13m1.dbf ', '/oracle/q05/mirrloga/log_ G13M2.DBF ') SIZE 200M BLOCKSIZE 512,group 4 ('/oracle/q05/origlogb/log_g14m1.dbf ', '/oracle/q05/mirrlogb/log_ G14M2.DBF ') SIZE 200M BLOCKSIZE 512,group 5 ('/oracle/q05/origloga/log_g15m1.dbf ', '/oracle/q05/mirrloga/log_ G15M2.DBF ') SIZE 200M BLOCKSIZE 512,group 6 ('/oracle/q05/origlogb/log_g16m1.dbf ', '/oracle/q05/mirrlogb/log_ G16M2.DBF ') SIZE 200M BLOCKSIZE 512--STANDBY logfiledatafile '/oracle/q05/sapdata1/system_1/system.data1 ', '/oracle/ Q05/sapdata3/undo_1/undo.data1 ', '/oracle/q05/sapdata1/sysaux_1/sysaux.data1 ', '/oracle/q05/sapdata1/sr3_1/ Sr3.datA1 ', '/oracle/q05/sapdata1/sr3_2/sr3.data2 ', '/oracle/q05/sapdata1/sr3_3/sr3.data3 ', '/oracle/q05/sapdata1/sr3_4/ Sr3.data4 ', '/oracle/q05/sapdata1/sr3_5/sr3.data5 ', '/oracle/q05/sapdata2/sr3_6/sr3.data6 ', '/oracle/Q05/sapdata2 /sr3_7/sr3.data7 ', '/oracle/q05/sapdata2/sr3_8/sr3.data8 ', '/oracle/q05/sapdata2/sr3_9/sr3.data9 ', '/oracle/Q05/ Sapdata2/sr3_10/sr3.data10 ', '/oracle/q05/sapdata3/sr3_11/sr3.data11 ', '/oracle/q05/sapdata3/sr3_12/sr3.data12 ', '/oracle/q05/sapdata3/sr3_13/sr3.data13 ', '/oracle/q05/sapdata3/sr3_14/sr3.data14 ', '/oracle/Q05/sapdata3/sr3_15 /sr3.data15 ', '/oracle/q05/sapdata4/sr3_16/sr3.data16 ', '/oracle/q05/sapdata4/sr3_17/sr3.data17 ', '/oracle/Q05/ Sapdata4/sr3_18/sr3.data18 ', '/oracle/q05/sapdata4/sr3_19/sr3.data19 ', '/oracle/q05/sapdata4/sr3_20/sr3.data20 ', '/oracle/q05/sapdata1/sr3700_1/sr3700.data1 ', '/oracle/q05/sapdata1/sr3700_2/sr3700.data2 ', '/oracle/Q05/ Sapdata1/sr3700_3/sr3700.data3 ', '/oracle/q05/sapdata1/sr3700_4/sr3700.data4 ', '/oracle/q05/sapdata2/sr3700_5/ Sr3700.data5 ', '/oracle/q05/sapdata2/sr3700_6/sr3700.data6 ', '/oracle/q05/sapdata2/sr3700_7/sr3700.data7 ', '/oracle/Q05/sapdata2/sr3700 _8/sr3700.data8 ', '/oracle/q05/sapdata3/sr3700_9/sr3700.data9 ', '/oracle/q05/sapdata3/sr3700_10/sr3700.data10 ', ' /oracle/q05/sapdata3/sr3700_11/sr3700.data11 ', '/oracle/q05/sapdata3/sr3700_12/sr3700.data12 ', '/oracle/Q05/ Sapdata4/sr3700_13/sr3700.data13 ', '/oracle/q05/sapdata4/sr3700_14/sr3700.data14 ', '/oracle/Q05/sapdata4/sr3700_ 15/sr3700.data15 ', '/oracle/q05/sapdata4/sr3700_16/sr3700.data16 ', '/oracle/q05/sapdata1/sr3usr_1/sr3usr.data1 ', '/oracle/q05/sapdata4/sr3_21/sr3.data21 ', '/oracle/q05/sapdata4/sr3_22/sr3.data22 ', '/oracle/Q05/sapdata4/sr3_23 /sr3.data23 ', '/oracle/q05/sapdata4/sr3_24/sr3.data24 ', '/oracle/q05/sapdata1/sr3_25/sr3.data25 ', '/oracle/Q05/ Sapdata1/sr3_26/sr3.data26 ', '/oracle/q05/sapdata1/sr3_27/sr3.data27 ', '/oracle/q05/sapdata1/sr3_28/sr3.data28 ', '/oracle/q05/sapdata2/sr3_29/sr3.data29 ', '/oracle/q05/sapdata2/sr3_30/sr3.data30 ', '/oracle/Q05/sapdata2/sr3_31 /sr3.data31 ', '/ORacle/q05/sapdata2/sr3_32/sr3.data32 ', '/oracle/q05/sapdata3/sr3_33/sr3.data33 ', '/oracle/q05/sapdata3/sr3_34/ Sr3.data34 ', '/oracle/q05/sapdata3/sr3_35/sr3.data35 ', '/oracle/q05/sapdata3/sr3_36/sr3.data36 ', '/oracle/Q05/ Sapdata3/sr3_37/sr3.data37 ', '/oracle/q05/sapdata3/sr3_38/sr3.data38 ', '/oracle/q05/sapdata3/sr3_39/sr3.data39 ', '/oracle/q05/sapdata3/sr3_40/sr3.data40 ', '/oracle/q05/sapdata3/sr3_41/sr3.data41 ', '/oracle/Q05/sapdata3/sr3_42 /sr3.data42 ', '/oracle/q05/sapdata3/sr3_43/sr3.data43 ', '/oracle/q05/sapdata3/sr3_44/sr3.data44 ', '/oracle/Q05/ Sapdata1/sr3_45/sr3.data45 ', '/oracle/q05/sapdata1/sr3_46/sr3.data46 ', '/oracle/q05/sapdata1/sr3_47/sr3.data47 ', '/oracle/q05/sapdata1/sr3_48/sr3.data48 ', '/oracle/q05/sapdata1/sr3_49/sr3.data49 ', '/oracle/Q05/sapdata1/sysaux _2/sysaux.data2 ', '/oracle/q05/sapdata1/sr3_50/sr3.data50 ', '/oracle/q05/sapdata1/sr3_51/sr3.data51 ', '/oracle/ Q05/sapdata1/sr3_52/sr3.data52 ', '/oracle/q05/sapdata1/sr3_53/sr3.data53 ', '/oracle/q05/sapdata1/sr3_54/ Sr3.data54 ', '/oracle/q05/saPdata1/sr3_55/sr3.data55 ', '/oracle/q05/sapdata1/sr3_56/sr3.data56 ', '/oracle/q05/sapdata1/sr3_57/sr3.data57 ', '/ Oracle/q05/sapdata1/sr3_58/sr3.data58 ', '/oracle/q05/sapdata1/sr3_59/sr3.data59 ', '/oracle/Q05/sapdata1/sr3_60/ Sr3.data60 ', '/oracle/q05/sapdata1/sr3_61/sr3.data61 ', '/oracle/q05/sapdata1/sr3_62/sr3.data62 ', '/oracle/Q05/ Sapdata1/sr3_63/sr3.data63 ', '/oracle/q05/sapdata1/sr3_64/sr3.data64 ', '/oracle/q05/sapdata1/sr3_65/sr3.data65 ', '/oracle/q05/sapdata1/sr3_66/sr3.data66 ', '/oracle/q05/sapdata1/sr3_67/sr3.data67 ', '/oracle/Q05/sapdata1/sr3_68 /sr3.data68 ', '/oracle/q05/sapdata1/sr3_69/sr3.data69 ', '/oracle/q05/sapdata1/sr3_70/sr3.data70 ', '/oracle/Q05/ Sapdata1/sr3_71/sr3.data71 ', '/oracle/q05/sapdata1/sr3_72/sr3.data72 ', '/oracle/q05/sapdata1/sr3_73/sr3.data73 ', '/oracle/q05/sapdata1/sr3_74/sr3.data74 ', '/oracle/q05/sapdata1/sr3_75/sr3.data75 ', '/oracle/Q05/sapdata1/sr3_76 /sr3.data76 ', '/oracle/q05/sapdata1/sr3_77/sr3.data77 ', '/oracle/q05/sapdata1/sr3_78/sr3.data78 ', '/oracle/Q05/ Sapdata1/sr3_79/sr3.data79 ', '/oracle/q05/sapdata1/sr3usr_2/sr3usr.data2 ', '/oracle/q05/sapdata1/sr3_80/sr3.data80 ', '/oracle/Q05/ Sapdata1/sr3_81/sr3.data81 ', '/oracle/q05/sapdata1/sr3_82/sr3.data82 ', '/oracle/q05/sapdata1/sr3_83/sr3.data83 ', '/oracle/q05/sapdata1/sr3_84/sr3.data84 ', '/oracle/q05/sapdata1/sr3_85/sr3.data85 ', '/oracle/Q05/sapdata1/sr3_86 /sr3.data86 ', '/oracle/q05/sapdata1/sr3_87/sr3.data87 ', '/oracle/q05/sapdata1/sr3_88/sr3.data88 ', '/oracle/Q05/ Sapdata1/sr3_89/sr3.data89 ', '/oracle/q05/sapdata1/sr3_90/sr3.data90 ', '/oracle/q05/sapdata1/sr3_91/sr3.data91 ', '/oracle/q05/sapdata1/sr3_92/sr3.data92 ', '/oracle/q05/sapdata1/sr3_93/sr3.data93 ', '/oracle/Q05/sapdata1/sr3_94 /sr3.data94 ', '/oracle/q05/sapdata1/sr3_95/sr3.data95 ', '/oracle/q05/sapdata1/sr3_96/sr3.data96 ', '/oracle/Q05/ Sapdata1/sr3_97/sr3.data97 ', '/oracle/q05/sapdata1/sr3_98/sr3.data98 ', '/oracle/q05/sapdata1/sr3_99/sr3.data99 ', '/oracle/q05/sapdata1/sr3_100/sr3.data100 ', '/oracle/q05/sapdata1/sr3_101/sr3.data101 ', '/oracle/Q05/sapdata1/ Sr3_102/sr3.data1'/oracle/q05/sapdata1/sr3_103/sr3.data103 ', '/oracle/q05/sapdata1/sr3_104/sr3.data104 ', '/oracle/Q05/ sapdata1/sr3_105/sr3.data105 ', '/oracle/q05/sapdata1/sr3_106/sr3.data106 ', '/oracle/q05/sapdata1/sr3_107/ Sr3.data107 ', '/oracle/q05/sapdata1/sr3_108/sr3.data108 ', '/oracle/q05/sapdata1/sr3_109/sr3.data109 ', '/oracle/ Q05/sapdata1/sr3_110/sr3.data110 ', '/oracle/q05/sapdata1/sr3_111/sr3.data111 ', '/oracle/q05/sapdata1/sr3_112/ sr3.data112 ', '/oracle/q05/sapdata1/sr3_113/sr3.data113 ', '/oracle/q05/sapdata1/sr3_114/sr3.data114 ', '/oracle/ Q05/sapdata4/sr3700_17/sr3700.data17 ', '/oracle/q05/sapdata4/sr3700_18/sr3700.data18 ', '/oracle/Q05/sapdata4/ Sr3700_19/sr3700.data19 ', '/oracle/q05/sapdata4/sr3700_20/sr3700.data20 ', '/oracle/q05/sapdata4/sr3700_21/ Sr3700.data21 ', '/oracle/q05/sapdata4/sr3700_22/sr3700.data22 ', '/oracle/q05/sapdata4/sr3700_23/sr3700.data23 ', ' /oracle/q05/sapdata1/system_2/system.data2 ', '/oracle/q05/sapdata1/sr3_115/sr3.data115 ', '/oracle/Q05/sapdata1/ sr3_116/sr3.data116 ', '/oracle/q05/sapdata1/sr3_117/sr3.data117 ', '/oracle/q05/sapdata1/sr3_118/sr3.data118 ', '/oracle/q05/sapdata1/sr3_119/sr3.data119 ', ' /oracle/q05/sapdata1/sr3_120/sr3.data120 ', '/oracle/q05/sapdata2/sr3_121/sr3.data121 ', '/ORACLE/Q05/SAPDATA2/SR3 _122/sr3.data122 ', '/oracle/q05/sapdata2/sr3_123/sr3.data123 ', '/oracle/q05/sapdata2/sr3_124/sr3.data124 ', '/ oracle/q05/sapdata2/sr3_125/sr3.data125 ', '/oracle/q05/sapdata2/sr3_126/sr3.data126 ', '/oracle/Q05/sapdata2/sr3_ 127/sr3.data127 ', '/oracle/q05/sapdata2/sr3_128/sr3.data128 ', '/oracle/q05/sapdata2/sr3_129/sr3.data129 ', '/ oracle/q05/sapdata2/sr3_130/sr3.data130 ', '/oracle/q05/sapdata2/sr3_131/sr3.data131 ', '/oracle/Q05/sapdata2/sr3_ 132/sr3.data132 ', '/oracle/q05/sapdata2/sr3_133/sr3.data133 ', '/oracle/q05/sapdata2/sr3_134/sr3.data134 ', '/ oracle/q05/sapdata2/sr3_135/sr3.data135 ', '/oracle/q05/sapdata2/sr3_136/sr3.data136 ', '/oracle/Q05/sapdata2/sr3_ 137/sr3.data137 ', '/oracle/q05/sapdata2/sr3_138/sr3.data138 ', '/oracle/q05/sapdata2/sr3_138/sr3.data139 ', '/ oracle/q05/sapdata2/sr3_140/sr3.data140 ', '/oracle/q05/sapdata2/sr3_141/sr3.data141 ', '/oracle/q05/sapdata2/sr3_142/sr3.data142 ', '/oracle/Q05 /sapdata2/sr3_142/sr3.data143 ', '/oracle/q05/sapdata2/sr3_144/sr3.data144 ', '/oracle/q05/sapdata2/sr3_145/ sr3.data145 ', '/oracle/q05/sapdata2/sr3_146/sr3.data146 ', '/oracle/q05/sapdata2/sr3_147/sr3.data147 ', '/oracle/ q05/sapdata2/sr3_148/sr3.data148 ', '/oracle/q05/sapdata2/sr3_149/sr3.data149 ', '/oracle/q05/sapdata2/sr3_150/ sr3.data150 ', '/oracle/q05/sapdata2/sr3_151/sr3.data151 ', '/oracle/q05/sapdata2/sr3_152/sr3.data152 ' CHARACTER SET UTF8; ALTER DATABASE OPEN resetlogs; ALTER tablespace psaptemp ADD tempfile '/oracle/q05/sapdata2/temp_1/temp.data1 ' reuse;
  14. Run SQL
    SQL> @control.sqlORACLE instance started.

Total System Global area 5394989056 bytes
Fixed Size 2229080 bytes
Variable Size 3238005928 bytes
Database buffers 2147483648 bytes
Redo buffers 7270400 bytes

Control file created.

> 习惯手动运行最后两条命令  

sql> ALTER DATABASE OPEN resetlogs;

Database altered.

sql> ALTER tablespace psaptemp ADD tempfile '/oracle/q05/sapdata2/temp_1/temp.data1 ' reuse;

Tablespace altered.

Sql> show parameter name;

NAME TYPE VALUE

Db_file_name_convert string
Db_name string Q05
Db_unique_name string Q05
Global_names Boolean FALSE
instance_name string Q05
Lock_name_space string
Log_file_name_convert string
Service_names string Q05

10. 恢复并更改SID完毕。  ###### 第三部分 BASIS

SAP system copy-oracle change SID

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.