Oracle Upgrade von 11 auf 12. Migration des Software-Eigentümers zu ‘oracle’

Oracle Upgrade

OS technisch

	fstab
	hosts
	ggf. hostname (bleibt)
	resolv.conf
	/oracle/HR3/112_64/network/admin/listener.ora (/oracle/HR3/121_64/network/admin)
	ifconfig(yast)
	nsswitch
		#hosts:          files dns
		#networks:       files dns
		hosts:         files
		networks:      files
	crontab -e
	ggf. /etc/init.d/postfix stop
	Database log mode              No Archive Mode
	
SAP technisch vorbeitungen.
	ggf. IPtables damit die Server IP technisch nicht nach außen Kommunizieren.
	Batch Prozess Anzahl auf 0 ("vi /usr/sap/HR3/SYS/profile/HR3_DVEBMGS00_sles14" -> rdisp/wp_no_btc = 0 )
	RFC angepasst (/nsm59)
	Std. Jobs aus und neun geplant (/nSM37)
	Easy Archive deaktiviert
	cd_save gemounted
	
	SAP Notes:
	1915317 - Migration des Software-Eigentümers zu 'oracle'
		Ansatz 1: Vor dem Datenbank-Upgrade auf 12c
			Auf sles14_clone (SAP-Server)
				"su - hr3adm"
				"stopsap r3"
				"ps -ef | grep -i sap"
				"sapcontrol -nr 00 -function GetProcessList"
			Auf sles69_clone (DB-Server)
				"su - orahr3"
				"sqlplus"
				"/ as sysdba"
					"SHUTDOWN IMMEDIATE;"
					"exit;"
				"ps -ef | grep -i ora"
				"lsnrctl stop"
				"ps -ef | grep -i orahr3"
				"exit" ("whoami" => root)
				"groupadd oinstall" -> 																		"groupadd: Group `oinstall' already exists."
				"useradd -g oinstall -G dba,oper -c "Oracle Software Owner" -m -s "/bin/sh" oracle " ->		"useradd: Account `oracle' already exists."
				"passwd oracle"
				"su - oracle -c "id; pwd" "
					ggf.  "1554661 - Konfiguration der Umgebung für den Benutzer 'oracle'" beachten
					"echo $PATH" => "/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/opt/kde3/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin:/opt/gnome/bin:/opt/oracle/product/11gR1/db/bin"
				#
				"groupmod -A hr3adm oinstall" . User hr3adm der Gruppe oinstall hinzufügen.
				"usermod -G sapsys,sapinst,dba,oper,oinstall hr3adm"										"usermod: `dba' is primary group name."
				#
				"whoami" (root)
				"mkdir -p /home/orahr3"
				"chown orahr3:dba /home/orahr3"
				"usermod -d /home/orahr3 orahr3"
				"usermod -g dba -G oper,oinstall orahr3"
				"cd /oracle/HR3"
				"cp -frv .profile .login .bashrc .cshrc .sap* .dbenv* .j2eeenv* /home/orahr3" ggf. "mv .profile .login .bashrc .cshrc .sap* .dbenv* .j2eeenv* /home/ora<dbsid>
				"cp -frv startdb stopdb /home/orahr3" ggf. "mv startdb stopdb /home/ora<dbsid>"  ggf. "mv -frv /sapmnt/HR3/exe/startdb /sapmnt/HR3/exe/stopdb /home/orahr3"
				"chown -R orahr3:dba /home/orahr3"
				"su - orahr3"
				"env"
				"exit"
				#
				"whoami" (root)
				Environement Variablen Checken.	ORACLE_BASE, ORACLE_HOME und ORACLE_SID müssen für oracle, hr3adm und orahr3 alle gleich sein.
				Das Script "oraenv" für den OS-User "oracle" verwenden um die "env" Variablen zu setzen.
				"cat /etc/oratab"
				"su - oracle"
				". oraenv" ggf. (/usr/local/bin/oraenv)
					ORACLE_SID = [orcl] ? HR3
					The Oracle base has been changed from /opt/oracle to /oracle
					"echo $ORACLE_SID" -> HR3
					"echo $ORACLE_HOME" -> /oracle/HR3/112_64
					"echo $ORACLE_BASE" -> /oracle
				#
				Eigentümer der Oracle Verzeichnis umsetzten
				"su - orahr3"
				Download von orasid2oracle.sh 	"1915317 - Migration des Software-Eigentümers zu 'oracle'"
				"chown orahr3:sapsys /home/orahr3/orasid2oracle.sh"
				"chmod 777 orasid2oracle.sh"
				"setenv DB_SID HR3"  (Variable war nicht gesetzt)
				"echo $DB_SID"
				"sudo SAPDATA_HOME=$SAPDATA_HOME ORACLE_BASE=$ORACLE_BASE DB_SID=$DB_SID ./orasid2oracle.sh -v"  (Test Mode)
				"sudo SAPDATA_HOME=$SAPDATA_HOME ORACLE_BASE=$ORACLE_BASE DB_SID=$DB_SID ./orasid2oracle.sh -v -exec" (Ausführen)
				#
				Software-Eigentümer des bestehenden Oracle Home von orahr3 auf oracle ändern.
				1983457 - Klonen von Oracle Homes unter Unix und Linux
				Download von "clone_oh-1.7-005.zip" aus SAP Note 1983457 - Klonen von Oracle Homes unter Unix und Linux
				"exit"
				"su - orahr3"
				"cd /home/orahr3/clone_oh-1.7-005/sapnote_1983457/pkg_clone_oh"
				"chmod -R 777 *"
				"./clone_oh.sh -version"
				"./clone_assistant.sh"
					######################################################################
					### clone_assistant.sh (V1.7 PL 005 2015-01-19)
					### Oracle Home Cloning Assistant
					### Copyright (c) Oracle Corporation 2014. All Rights Reserved.
					######################################################################

					The following actions are available:
					  (1) Copying an existing Oracle home to a new location (clone)
					  (2) Moving  an existing Oracle home to a new location (relocate)
					  (3) Changing the configuration of an existing Oracle home (config)
					  (4) Managing an existing Oracle home (manage)
					  (5) All these actions (all)
					Which of these actions do you want to perform? 
					[clone]: 3
					Your answer is: 3

					(INFO)    -  For action 'config', several parameters are required.


					Enter Oracle database release:
					[11.2]: 11.2
					Your answer is: 11.2

					Default value settings
					----------------------

					Oracle Release              : 11.2
					Database name <DBSID>       : HR3 
					Source Oracle Home <IHRDBMS>: /oracle/HR3/1120X 
					Target Oracle Home <IHRDBMS>: /oracle/HR3/1120X 
					Target Oracle Base          : /oracle/HR3 

					Parameter help
					--------------
					For Source Oracle home path, use installation Oracle home <IHRDBMS>.
					For Target Oracle home path, use installation Oracle home <IHRDBMS>.

					Example(s):
					+---------+----------------------+----------------------+
					|RELEASE  |ORACLE_HOME           |IHRDBMS               |
					+---------+----------------------+----------------------+
					|11.2.0.4 |/oracle/<DBSID>/112_64|/oracle/<DBSID>/11204 |
					+---------+----------------------+----------------------+


					Enter location for target Oracle home (ORACLE_HOME):
					[/oracle/HR3/1120X]: /oracle/HR3/112_64						ACHTUNG !!!! hier darf nicht der Symbolische Link stehen. Check und abgleich mit listener.ora

					Enter name for target Oracle home (ORACLE_HOME_NAME):
					If you do not specify an Oracle home name, it will be generated by OUI.
					[]: 

					Enter location for target Oracle base (ORACLE_BASE):
					Reference: SAP Note 1521371
					[/oracle/HR3]: /oracle/HR3
					(OK)      -  ORACLE_BASE directory exists.
					Your answer is: /oracle/HR3

					Enter name of OS group (OSDBA):
					[dba]: dba
					Your answer is: dba

					Enter name of OS group (OSOPER):
					[oper]: oper
					Your answer is: oper

					Do you want to change the software owner for this Oracle home?
					[no]: yes
					Your answer is: yes

					Enter name of Oracle Software Owner:
					[oracle]: oracle
					Your answer is: oracle

					Enter name of primary group of Oracle Software Owner:
					[oinstall]: oinstall
					Your answer is: oinstall

					Enter name of super user:
					[root]: root
					Your answer is: root


					Enter location for oraInst.loc:
					[/etc/oraInst.loc]: /etc/oraInst.loc

					Enter location for scripts (script directory):
					[/home/orahr3/clone_oh-1.7-005/sapnote_1983457/pkg_clone_oh/clone_scripts]: /home/orahr3/clone_oh-1.7-005/sapnote_1983457/pkg_clone_oh/clone_scripts
					Your answer is: /home/orahr3/clone_oh-1.7-005/sapnote_1983457/pkg_clone_oh/clone_scripts

					Do you want to generate the scripts?
					[yes]: yes
					Your answer is: yes
					(INFO)    -  Generating scripts ...
					######################################################################
					### clone_oh.sh
					### Oracle Home Cloning
					### Copyright (c) Oracle Corporation 2014. All Rights Reserved.
					######################################################################

					Hostname / Platform : sles69 linux_x86_64 (64-bit)
					Current date        : 2015_08_10
					Current time        : 15:00:39
					Current user        : orahr3 (uid: 10757)
					Current directory   : /home/orahr3/clone_oh-1.7-005/sapnote_1983457/pkg_clone_oh
					Working directory   : /home/orahr3/clone_oh-1.7-005/sapnote_1983457/pkg_clone_oh
					Script  directory   : /home/orahr3/clone_oh-1.7-005/sapnote_1983457/pkg_clone_oh/clone_scripts
					Verbose mode        : NO
					Query mode          : NO

					Command line        : /home/orahr3/clone_oh-1.7-005/sapnote_1983457/pkg_clone_oh/clone_oh.sh 
					  -tgt_ob /oracle/HR3
					  -tgt_oh /oracle/HR3/112_64
					  -tgt_osdba dba
					  -tgt_osoper oper
					  -tgt_swowner oracle
					  -tgt_swowner_group oinstall
					  -tgt_release 11.2
					  -script_dir /home/orahr3/clone_oh-1.7-005/sapnote_1983457/pkg_clone_oh/clone_scripts
					  -invPtrLoc /etc/oraInst.loc
					  -root root
					  -action config

					Current Settings for Configuring an Oracle Home

					Source Oracle home       = not specified        

					Target Oracle home       = /oracle/HR3/112_64        
					Target Software Owner    = orahr3:dba
					will be changed to         oracle:oinstall
					Target Oracle home name  = not specified   
					Target Oracle base       = /oracle/HR3        
					Target Oracle release    = 11.2        
					Target OSDBA group       = dba 
					Target OSOPER group      = oper

					Copy command             = tar
					Super user (root)        = root
					Default oraInst.loc      = /etc/oraInst.loc


					Creating scripts for action 'Configuring an Oracle Home' completed.
					Location of generated scripts: /home/orahr3/clone_oh-1.7-005/sapnote_1983457/pkg_clone_oh/clone_scripts

					(EXIT)    -  clone_assistant.sh - Exiting with exit code 0.
			
				"./config01_show_env.sh"
				"./config02_detach_oh.sh"
				"exit"
				"whoami" (root)
				"./config03_set_swowner.sh"
				"su - oracle"
				". oraenv"
				"./config04_clone_oh.sh"
				"exit"
				"whoami" (root)
				"/oracle/HR3/11264/root.sh"
				"./config05_run_rootsh.sh"
				"./config06_cleanup.sh??"
				#
				"su - oracle"
				". oraenv"
				"lsnrctl start"
				"sqlplus / as sysdba"
					startup;
					
		Auf sles14_clone (SAP-Server)	
			"su - hr3adm"
			"R3trans -d"
			"startsap r3"
		
		Auf sles69_clone (DB Server)
			-
			Vorher auf der sles14_clone den User "oracle" und die Gruppe "oinstall" anlegen und dieselbe UID und GID zuweisen.
			Auf die ORACLE_HOME Variable des SIDadm achten. Symlink Problem.
			BRtools aktualiseren
			"whoami" (root)
			"cd /usr/sap/HR3/SYS/exe/run/"
			"cp -frv ~/brtools_740/* ."
			"chown oracle:oinstall brarchive brbackup brconnect brrecover brrestore brspace"
			"chmod 6774 brarchive brbackup brconnect brrecover brrestore brspace"
			#
			"cp -frv /oracle/HR3/112_64/dbs/initHR3.sap /oracle/HR3/sapprof/"
			"cp -frv /oracle/HR3/112_64/dbs/initHR3.ora /oracle/HR3/sapprof/"
			oder aus dem neuen 12er Verz. kopieren, je nachdem wann das Update stattfindet.
			"cp -frv /oracle/HR1/121/dbs/initHR1.sap /oracle/HR3/sapprof/"
			"cp -frv /oracle/HR1/121/dbs/initHR1.ora /oracle/HR3/sapprof/"
			"cp -frv /oracle/HR1/121/dbs/spfileHR1.ora /oracle/HR3/sapprof/"
			"chown -R oracle:oinstall /oracle/HR3/sapprof/"
			"su - oracle"
			". oraenv"
			"sqlplus / as sysdba"
				create user ops$oracle identified externally;
				grant sapdba to ops$oracle;
				quit;
			"exit"
			"su - hr3adm"
			"brconnect -u / -f check"
			"brbackup -u / -q"
			
			
			
################################################################################
SSFD 1639578 - SSFS als Kennwortablage für den primären Datenbank-Connect
Auf der sles69_clone
"vi /home/hr3adm/.dbenv_sles69.cshpwd" ->
	setenv RSEC_SSFS_DATAPATH /sapmnt/HR3/global/security/rsecssfs/data
	setenv RSEC_SSFS_KEYPATH /sapmnt/HR3/global/security/rsecssfs/key
	setenv rsdb_ssfs_connect 1
	setenv SAPSYSTEMNAME HR3
"R3trans -d"

Post Revisions:

Tags:  ,