17
System rebuild using system copy (including three instances owned by tempuser , 2002/11 General Notes: 00089188 R3 System copy.txt 00147243 R3COPY under NT Oracle.txt 00179149 INST, 4.6B R3 Inst. - Homogeneous System Copy.txt 00179150 INST, 4.6B R3 Inst. - Heterogeneous System Copy .txt 00389530 INST, R3 4.6C SR2 - Homogeneous System Copy.txt Skill : 1, how to prepare a sap system install in dest. machine for system copy (not full sap install) 2, how to get control.sql. 3, how to setup more than one sap central instance in one machine. Hardware IBM x350 , 4cpu, 2.5G RAM, 6X36.4G HD (raid5) NT setup 1, update hardware BIOS - 1.09 Diagnostic - 2.03 Advanced System Management firmware - 1.14 Advanced System Management driver - 1.25 serveRAID - 5.10 2, Install NT 4.0 press F6 at the beginning of NT setup , in order to install Raid driver. computer name: SAPREF First partition: 4G

forum1_f_1119_1040267944

Embed Size (px)

Citation preview

Page 1: forum1_f_1119_1040267944

System rebuild using system copy (including three instances

owned by tempuser , 2002/11

General Notes:

00089188 R3 System copy.txt 00147243 R3COPY under NT Oracle.txt

00179149 INST, 4.6B R3 Inst. - Homogeneous System Copy.txt

00179150 INST, 4.6B R3 Inst. - Heterogeneous System Copy .txt

00389530 INST, R3 4.6C SR2 - Homogeneous System Copy.txt

Skill : 1, how to prepare a sap system install in dest. machine for system copy (not full sap install) 2, how to get control.sql. 3, how to setup more than one sap central instance in one machine.

Hardware

IBM x350 , 4cpu, 2.5G RAM, 6X36.4G HD (raid5)

NT setup

1, update hardware BIOS - 1.09Diagnostic - 2.03Advanced System Management firmware - 1.14Advanced System Management driver - 1.25serveRAID - 5.10

2, Install NT 4.0press F6 at the beginning of NT setup , in order to install Raid driver. computer name: SAPREFFirst partition: 4G

3, Post NT setupinstall sp6ainstall display driver , s3 savage4install NIC driver , addtional four beside onboard one, IBM 10/100 ,5.10 ,create Team(mode:

interlink), add four nic to one team, setup team ip address 10.138.207.107/21 gw: 10.138.250.1 dns: 10.138.250.21,10.142.10.10 , wins: 10.138.207.252, 10.138.250.150 , and disable NIC onbroad.

Page 2: forum1_f_1119_1040267944

install serveRAID management consoleinstall IE5.5install Pcanywhere 10.5create partition (D:4G, E:4G, F:rest), and it's very important to modify boot.ini ,change boot

partition to 2 , due to the first one is used by IBM recovery(55M). change pagefile setting ( C:2.5G, d:3.8G, e:3,8G)change performance setting in network-->server , to "max network application perf.".

Existing System Status

IP address: 10.138.207.121 , hostname : dvdb046

1, ATSID: D11 system no.: 00DB: Oracle 8.1.7.0.0kenel: 46DR/3: 4.6C , patch 28

2, DESID: D12system no.: 01DB: oracle 8.1.7.3.0kernel: 46DR/3: 4.6C , patch 33

3, ITSID: D13system no.: 02DB: oracle 8.1.7.4.1kernel: 46DR/3: 4.6B , patch 27

Dest. SAP setup (new install)

1, prepare check Disk layout : all data should be put into driver F:(160G), because 1st, whole system just have one

RAID 5, 2rd,we have not enough space. add saptranshost in host file. ( 10.138.207.107 SAPREF SAPTRANSHOST)

check network (The name returned by the commands hostname and ping -a <IP_address> must bethe same, including upper and lowercase. If different, check DNS setting )

install r3dll: <CD_DRIVE>:\NT\I386\NTPATCH\r3dllins.exe.install ADSI , MMC

2, install DB (D11-->D14, D12-->D12, D13-->D13) /* for D11 instance , have SID change */ logon as administrator

start sapserver.cmdinstall three db instance , oracle 8.1.7.0.0 ,

D14817 --- f:\oracle\d14\817 , apply patch 8.1.7.0.1 ( stop service, unpack the patch to install dir ).

Page 3: forum1_f_1119_1040267944

D12817 --- f:\oracle\d12\817 , apply patch 8.1.7.3.0D13817 --- f:\oracle\d13\817 , apply pathc 8.l.7.4.1

After multi Oracle home install, check: 1, check list <ORA_HOME>\network\admin\listener.ora <Ora_HOME>\network\admin\tnsname.ora <sid>adm & SAPService<sid> user environment , and system environment HKLM\software\oracle HKLM\software\SAP PATH

2, my config, and just activate one Oracle<home>TNSListener service.

tnsnames.ora listener.ora

3, test listener tnsping <sid>

3, install r3setup.<CD_DRIVE>:\NT\COMMON\r3setup.batinstall to

d14, f:\users\d14adm\install (46C SR2)d12, f:\users\d12adm\install (46C SR2)d13, f:\users\d13adm\install (46B)

4, install sapr3

4.1 modify centrdb.r3s , like this 46C: CENTRDB.R3S 46B: CENTRDB.R3S , according notes 147242 1, If DBR3CP.R3S is not available, adjust CENTRDB.R3S manually: Open file CENTRDB.R3S from your installation directory (e.g. c:\users\<sid>adm\Install) using SAPPAD, locate section [EXE], and delete the following lines (inclusively): DBRESETDATABASE_NT_ORA through DBPOSTLOAD_NT_ORA. Directly after LISTENERORA_NT_ORA, insert a new line (with the line number of DBRESETDATABASE_NT_ORA), e.g. 485=EXITMNLS_IND_IND or 485=EXITMNLS_NT_IND depending on which section is included in your template. . Note: The line numbers or the sequence of steps can differ,

I don't know why I can't use central.r3s+dbr3cp.r3s method mentioned in notes.

Page 4: forum1_f_1119_1040267944

4.2 install D14 , login as user administrator

Page 5: forum1_f_1119_1040267944

sap system name: D14instance no.: 00Dir for SAP system: F:domain of all users : \\SAPREFTransport host: SAPTRANSHOSTDatabase system name:D14Character set: WE8DECDefault driver for oracle dir: F:Name for Oracle home: D14817Location of SAP Db specific file: (all f:)location of oracle data file : (all f:)location of db log file: (all f:)location of mirror db log file: (all f:)Ram for sap system: 800location of CDs: password of sap administrator (SIDadm): xxxxxpassword of sap service: xxxxxport num.: 3600LDAP support: noLocation of Export CD1: G: (insert export cd1 to read dbsize.tpl)

until 82%, reach the exit point: choose exit.

sap system name: D12instance no.: 01Dir for SAP system: F:domain of all users : \\SAPREFTransport host: SAPTRANSHOSTDatabase system name:D12Character set: WE8DECDefault driver for oracle dir: F:Name for Oracle home: D12817Location of SAP Db specific file: (all f:)location of oracle data file : (all f:)location of db log file: (all f:)location of mirror db log file: (all f:)Ram for sap system: 800location of CDs: password of sap administrator (SIDadm): xxxxxpassword of sap service: xxxxxport num.: 3601LDAP support: noLocation of Export CD1: G: (insert export cd1 to read dbsize.tpl)

until 82%,

Exit with error: DBLISTENERRESTART_NT_ORA , due to our multiple ORA instance. 1, check whether listerner.ora and tnsname.ora is being overwrite, if so , need restore with ours . 2, using r3sedit, to skip this step , then continue.

reach the exit point: choose exit.sap system name: D13instance no.: 02

Page 6: forum1_f_1119_1040267944

Dir for SAP system: F:domain of all users : \\SAPREFTransport host: SAPTRANSHOSTDatabase system name:D13Character set: WE8DECDefault driver for oracle dir: F:Name for Oracle home: D13817Location of SAP Db specific file: (all f:)location of oracle data file : (all f:)location of db log file: (all f:)location of mirror db log file: (all f:)Ram for sap system: 800location of CDs: password of sap administrator (SIDadm): xxxxxpassword of sap service: xxxxxport num.: 3602

DB_Createinstance_NT_ORA error: reason: I install 8.1.7 directly(our copied db is that version), but 46B install need 8.0.6 . oracle 8.0.6 and 8.1.7 have big different , I need modify centrdb.r3s to satisfy the 8.1.7 execute file name. what I modified: oradim80.exe -->oradim.exe STARTMODEauto--> STARTMODE auto (add space)

and also I skip some step,like check oracle TNS,SQLNET,Listener, because we use multi home, have been set.

until 82%,

Exit with error: DBLISTENERRESTART_NT_ORA , due to our multiple ORA instance. 1, check whether listerner.ora and tnsname.ora is being overwrite, if so , need restore with ours . 2, using r3sedit, to skip this step , then continue.

reach the exit point: choose exit.

- cont. after system copy step.

system copy

1, Prepare check check or set NLS_LANG:

notes; 00381674 Oracle and NT, NLS_LANG must be set.txt

0031559. NT, Setting environment variables for R3 kernel.txt

Page 7: forum1_f_1119_1040267944

SVRMGR> connect internal SVRMGR> select * from V$NLS_PARAMETERS; Important are the values for: NLS_LANGUAGE AMERICAN NLS_TERRITORY AMERICA NLS_CHARACTERSET <NLS_CHARACTERSET> You must set NLS_LANG as follows: AMERICAN_AMERICA.<NLS_CHARACTERSET>

our sap NLS_LANG=AMERICAN_AMERICA.WE8DEC , this is different with oracle8 default(AMERICAN_AMERICA.WE8ISO8859P1) , you should set it explicitely , or after sap have been installed, it also should be set by sap auto. just notice after oracle be upgraded, this setting be changed.

2, generate control.sql from source system.

svrmgrl connect internal shutdown normal startup alter database backup controlfile to trace resetlogs; //get trace file in %SAPTRACE%\usertrace\ alter system switch logfile; (repeat this command, once per redolog group; for SAP , repeat 4 times). //force write log file shutdown normal exit

trace files: D11(old): ORA00745.TRC D13: ORA00507.TRC D12: ORA00447.TRC

3, modify trace file according the dest. sap system setup ( including SID, file location ), 3.1 Copy the adjusted file "control.sql" (see above) to a suitable directory, and open it using the Editor.Delete the introductory text so that the file starts directly with the following line: "CREATE CONTROLFILE..." If the SID changes, change the line "CREATE CONTROLFILE REUSE DATABASE "C11" NORESETLOGS ARCHIVELOG" in "CREATE CONTROLFILE SET DATABASE "C12" RESETLOGS ARCHIVELOG" (C11 is the SID of the source system, C12, the SID of the target system. Delete all lines with additional SQL statements (such as startup mount, recover database, alter database...), until only the SQL Statement CREATE CONTROLFILE remains. The statement Create Controlfile ... is ended after all components related to the database are listed with a semicolon (;). 3.2 Adjust the paths in the script to the situation on the target system.

d14.sql d13.sql d12.sql

Page 8: forum1_f_1119_1040267944

logint as <sid>adm

4, copy source files to dest. two method : 4.1, HD copy , shutdown source sap system, stop all sap&oracle service, copy data file to dest.

- all database files in <DRIVE>:\ORACLE\<SAPSID>\...- all archive redolog files in <DRIVE>:\ORACLE\<SAPSID>\SAPARCH- all online redolog files <DRIVE>:\ORACLE\<SAPSID>\MIRLOGA or ORIGLOGA- the files init<SAPSID>.ora, init<SAPSID>.dba, init<SAPSID>.sap in <DRIVE>:\ORANT\DATABASE

Delete copied control file

4.2, restore from offline backup

Page 9: forum1_f_1119_1040267944

notes: 00071254 Using BRBACKUP,BRRESTORE to copy a database.txt

00122363 DB copy (Restore) with retained struct. on Windows NT.txt

00140214 Changed processing of SAPDATA_HOME in BRRESTORE.txt

1, get backup log file and init<sid>.sap : from source system, or from tape How to get log file from offline backup tape ? Answer:

- offline backup tape file structure , and a sample offline backup log. bdhrswkw.aft

number from 1(.tape.hdr0) , 2 (init_ora) ,3 (init_sap) ..... brrestore -n 3 (or init_sap) | { -d tape/util_file , -p profilename , } brrestore -n 2 (or init_ora) brrestore -n det_log (this backup log) if you know last pos , you can use brrestore -n (last_pos-1) (restore det_log)

before using brrestore, you need config init<sid>.sap, let brrestore work, (like tape driver, size..) 2, restore init<sid>.sap , check block size setting , according log file, like dd_in_flags = "bs=16k"

3, copy original BRbackup logfile to your local sapbackup directory

4, Restore Database backupopen command promptbrrestore -m full,H:=F:,I:=F:,N:=G:,O:=G: -b bdhrswkw.aftBRrestore detects different SID but can handle this situation ,BRrestore tries to reuse original drive-letters which are in most cases different to yours, so we have to influence this behavior with syntax <old-drive>:<new-drive>, in my example I wanted to copy origlog,mirrlog to F: and database to G: full help of -m

Page 10: forum1_f_1119_1040267944

-mall|all_data|full|incr|incr_only|incr_full|<tablespace>[=<rest_dir>]|<file_ID>[=<rest_dir>]|<file_ID1>-<file_ID2>[=<rest_dir>]|<generic_path>[=<rest_dir>]|<objectlist>|archive_logs]

5, check init<sid>.ora , according restored init_ora file, especially check Rollback Segments numbers.

6. Also you can check the OS version and DB version according log.

important check list:init<sid>.ora1, Roolback segment (0-19)2, Control file location .

init<sid>.sap1, DD or cpio2, Tapesize , 30G or 35G3, compatible

5. prepare check dest. system . 5.1 If the target system should have another SID than the source system, change all occurrences of the SID in the file names correspondingly.

5.2 In "init<SID>.ora" adjust the parameters "control_files", "background_dump_dest", "log_archive_dest" and "db_name" to the situation on the target system.

5.3 If the SID changes, delete the control files which are named in the init<SID>.ora under "control_files" or even better, rename the files. 5.4 If needed , modify sap profile , specially instance profile. 5.5 check language & local setting , for chinese : schinese.inf and locale.car 6. restart OracleService<sid> , create control file using modified script. svrmgrl connect internal startup nomount @<Pfad>\control.sql alter database open resetlogs; exit

If it is necessary to execute control.sql once more, you must restart the OracleService<SID> service and delete the control files that have been generated in the meantime.

Page 11: forum1_f_1119_1040267944

7.1 Before activate SAP at first time, update sap kernal to 46D.

7.2 Possibly you must create the OPS$ users again manually. Refer to Note 50088 in this respect.

0050088 creating OPS$ users on Winnt&Oracle.txt

00400241 Problems with ops$ or sapr3 connect to Oracle.txt

00134592 Importing the SAPDBA role ( sapdba_role.sql).txt

1,Check for the OPS$ user mechanism work status for Oracle >=8.1.6 , security for OPS$ access has been enhanced by including the domain name in the OPS$ user names.

On NT with Oracle >= 8.1.5, make sure that the ops$ user also contains the domain name: ops$<domain>\<os_user>

If the connect in accordance with 1a) and 1b) was successful, the corresponding log file (for example dev_wX or trans.log) contains the following entries:

Logon as OPS$-user to get SAPR3's password Connecting as /@<sid> on connection 0 ... <-- 1a) Now I'm connected to ORACLE Got SAPR3's password from table SAPUSER Disconnecting from connection 0 ... Now I'm disconnected from ORACLE Try to connect with the password I got from OPS$-user Connecting as SAPR3/<pwd>@<sid> on connection 0 ... <-- 1b) Now I'm connected to ORACLE

If connecting using 1a) and 1b) is not possible, but alternative 2 works, the log will looks as follows:

Logon as OPS$-user to get SAPR3's password <-- 1a) Connecting as /@<sid> on connection 0 ... *** ERROR => OCI-call 'olog' failed: rc = 1017 <-- Error! *** ERROR => CONNECT failed with sql error '1017' Try to connect with default password Connecting as SAPR3/<pwd>@<sid> on connection 0 ... <-- 2) C Now I'm connected to ORACLE

if see above log in souce system, ops$ is working.

2,reset OPS$ user

Page 12: forum1_f_1119_1040267944

/* usage: *//* UNIX: sqlplus /NOLOG @oradbusrSD.sql SCHEMAOWNER UNIX SID *//* NT: sqlplus /nolog @oradbusrSD.sql SCHEMAOWNER NT COMPUTER|DOMAIN *//* *//* if [SCHEMAOWNER] is ommited SAPR3 is automatically used as *//* [SCHEMAOWNER]. The SCHEMAOWNER has to start with SAP and must *//* must not exceed a length of 6 characters (example: SAPPRD) *//* Domain must be specified if Oracle 8.1.5 or later is used on NT *//* and must contain the Userdomain or Computername (if the user *//* is only local to the computer *//*-------------------------------------------------------------------*/

eg: sqlplus /nolog @oradbusr.sql sapr3 NT sapref , oradbuser.sql is located in \users\<sid>adm\install 3, check result svrmgrl : connect / @<sid>

4, change password sapdba -sapr3 <new password> notes: if sapdba can't work, maybe missing record in registry . add key in HKLM\software\oracle\home<n>\ORACLE_SID <sid>

7.3 Oracle: If you changed SID, alter global_name If you changed the SID during the system copy, it is recommended to adapt the global_name parameter with the following SQL command: alter database rename global_name to <NEW_DB>; If the parameter is not existing on your system, ignore this section.

8.Continue with R3SETUP afterwards, and relogon as installer of R3setup. 8.1 check sapdba first. 8.2 RFC connect use DDIC

Page 13: forum1_f_1119_1040267944

If the password of the SAP user "DDIC" does not correspond to the standard "19920706", the 40B-R3SETUP terminates in the step RFCRADDDBDIFF.(As of 4.5A, the R3SETUP asks for the DDIC password so that you do not have to change it.)Troubleshooting the RFC step If the step RFCRADDBDIF_IND_<db> or RFCRSWBOINI_IND_<db> exits with an error, this is probably caused by one of these issues: 1. The R/3 System has not been started up correctly. This is indicated by error messages in the files dev_w* and dev_disp (located in the work directory). Also check if the R/3 work processes are running: Use ps and grep for dw.sap 2. R3SETUP is not authorized to log on to the R/3 System as user DDIC. Check if the password for DDIC is the default (19920706). Also check if the license is valid, using saplicense -check. 3. The job cannot be started or executed in the R/3 System. Check if the user <sapsid>adm has the permission to write in the directories /usr/sap/trans and /usr/sap/trans/tmp.

at that time , sap have been started, you can try to logon using ddic, to check password or license problem. at D11 case, SID and HW key changed, I have to apply new SAP license , also we must logon as sap* , change ddic password if we don't know it.

8.3 after install, if possiale, copy all transport data from source.

9. Post install check :

Page 14: forum1_f_1119_1040267944

1, OS level:

Adapt the configuration files on operating system level to meet network and SAP requirements.Log on as OS user <sapsid>adm and adapt the parameter file TPPARAM in the SAP transport directory.Adapt additional SAP software coponents (e.g. RFC, CPIC, SAP ArchiveLink) if required.Adapt additional non-SAP software components (e.g. archiving systems, monitoring tools, job schedulers) if required.Adapt backup programs (e.g. SAPDBA, BRBACKUP, BRARCHIVE, BACKINT) if required.Adapt non-SAP directories, file systems, NFS mounts, etc. if required . Check the R/3 parameters of the default and instance profiles.Check your UNIX shell files for special entries.Check crontab or AT jobs.Check operating system files (e.g. .netrc, .rhosts).Check operating system printers.Oracle: Adapt the database profiles init<SAPSID>.ora, init<SAPSID>.dba and init<SAPSID>.sap.

2, Database level:

Before starting the SAP System, make sure that the logging mechanism of the database is active.(I switch off all archive log mode, due to limitation of space).Check the parameters in the database profiles.If you performed the database import without updating the database statistics by skipping the corresponding analyze step in the command file, you should now manually perform the update statistics step on the target system or perform it as part of your regular analyze runs.Oracle: Delete all entries from the following tables: DBSTATHORA, DBSTAIHORA, DBSTATIORA, DBSTATTORA.

truncate table xxxx ;Oracle: Delete the user OPS$<SOURCE_SAPSID>ADM.

select * from dba_users; DROP USER "OPS$<OLDSERVERID>\sapservice<old_sid>" cascade ; drop user "ops$<oldserverid>\<old_sid>adm" cascade ;3. SAP level:

SM28 , install check SE06 , with option "database copy" , and config TMS . Delete all entries from the following tables: MONI, PAHI, OSMON, DBSNP, SDBAH, SDBAD, SDBAP, SDBAR. ALCONSEG and ALSYSTEMS.

truncate table sapr3.xxx ;Delete canceled and finished jobs. SE38-->RSBTCDEL-->Delete with force mode , old than 00 , user: *Adapt all jobs needed in the target system:1. Copy the old jobs2. Modify the new jobs3. Delete the old jobs.SP12 , Check the consistency of the TemSe , check note 16875Adapt the definition of the printers to meet the new system requirements:- Device types and character set definitions- Spool servers- Output management systems (OMS)Delete entries in table DDLOG for buffer synchronization(truncate table ddlog). Synchronize the buffers as described in

notes 00036283 buffer synchronization.txt

Adapt the client information for the logical system.SM59, SM58 ,RFC config : RZ04 & SM63, Create new operation modes and remove old ones, 1. Create new operation modes and instance definitions.

Page 15: forum1_f_1119_1040267944

2. Maintain the timetable using the new operation modes.3. Delete the old operation modes and old instance definitions.RZ10, Adapt the instances and profilesSU01,Define or remove the SAP System usersDelete all entries from tables TPFET and TPFHT. These contain information about changes made to the profile of your source system:Delete all entries from table TLOCK which holds the repair requests from your source system.Adapt other CCMS settingsMake data archived in the source system (data that does not reside in the database but was moved to a different storage location using SAP Archive Management) accessible in the target system. Adapt the file residence information in the target system.Redefine database actions (backup, update statistics, etc.) if you have used the DBA calendar in the source system (DB13).Check logon groups and assignment of application servers to logon groups (SMLG).Check the connection to SAPNet - R/3 Frontend (OSS1).Check self-defined external commands (SM69).Check the thresholds (RZ06). or rz20Check entries of the following tables in all involved systems:- TXCOM (SM54)- THOSTS (SM55)Check for every client in your SAP System the detail settings (logical system, client role, changes and transports for client-dependent objects, changes for client-independent objects, protection level, restrictions) (SCC4).Check if you can delete clients that will no longer be used in the target system (SCC5).Check the contexts and segments of remote application servers for the R/3 Monitoring Infrastructure if required (RZ21).Configure the domain controller in the Transport Management System (TMS) by using transaction code STMS.

After the system copy, create and execute the report ZSETCLOG according to SAP Note 192494. 00192494.txt

4, Dest. system check

Perform initial consistency check (SM28).Check the system log on all application servers (SM21).Check the consistency of the database (DB02).Perform server check (SM51).Test transactions frequently used by the customer.FI customers: Run the job SAPF190 (accounting reconciliation) and compare the results to those gained on the source system before the system copy (_accounting --> FA--> GL--> periodic processing --> closing --> check/count -->comparison)FI customers: Run the jobs RFUMSV00 (tax on sales/purchases), RAGITT01 (asset history sheet), RAZUGA01 (asset acquisitions), RAABGA01 (fixed asset retirements) and compare the results to those gained on the source system before the system copy.CO customers: Run the report group 1SIP and compare the results to those gained on the source system before the the system copy.

MPR processing in source system terminates During a homogeneous system copy, invalid tables get copied that may result in the termination of MRP background processing in the source (!) system due to the lock of the corresponding user account. See SAP Note 217271 to prevent/solve this problem.Postprocessing concerning customer objects

o If customer objects are not original in the new system, modify the corresponding entries in table TADIR.

Page 16: forum1_f_1119_1040267944

o If you encounter problems modifying a customer development class using transaction SMTS or SM31, try to use the option 'Validate' (ENTER) instead of the option 'Save' to save your changings.

10. If needed , reset password 1,change passwords of Oracle users: alter user system identified by manager; alter user sys identified by change_on_install; alter user sapr3 identified by sap; or : sapdba -alter_user sapr3/sap 2. enable sap*/pass logon in all clients delete from sapr3.usr02 where bname = '*SAP*';

11. if needed, switch archive mode.