tcode CG3Z for upload
tcode CG3Y for download
SAP Basis
tcode CG3Z for upload
tcode CG3Y for download
Use R3trans -l filename (see attached)
Today we were asked to login to 50+ SAP systems with initial passwd and change , this vbscript helped us
open notepad , paste the following vb code(for each line after changepass insert the hostname,SID,sysnr,client,language and login name ,save it with a .vbs extension, save it , double click on it to execute
Set ctlLogon = CreateObject(“SAP.LogonControl.1”)
Set funcControl = CreateObject(“SAP.Functions”)
Set objFileSystemObject = CreateObject(“Scripting.FileSystemObject”)
”’Obtain current and new password from user
currpass = InputBox(“Enter current password”)
newpass = InputBox(“Enter new password”)
”Initialize variables
Set outFile = objFileSystemObject.CreateTextFile(“passchangelog.txt”, True)
”’ For each system, call subroutine to log on to system and change password
”’ Parameters are: hostname, system id, system no., client, language, user
”’ ADD A LINE PER SYSTEM FOR WHICH YOU WANT TO CHANGE YOUR PASSWORD
ChangePass “1.1.1.3”, “ABC”, “00”, “100”, “EN”, “JOYJ”
ChangePass “1.1.1.2”, “ABD”, “00”, “100”, “EN”, “JOYJ”
ChangePass “1.1.1.3”, “ABX”, “00”, “100”, “EN”, “JOYJ”
ChangePass “1.1.1.4”, “ABV”, “00”, “100”, “EN”, “JOYJ”
”’ Cleanup
outFile.Close
Set outFile = Nothing
Set ctlLogon = Nothing
Set funcControl = Nothing
Set objFileSystemObject = Nothing
”’***** Log on to system and change password *****
Sub ChangePass(appserver, sysid, sysno, client, lang, user)
”’ Establish new connection
Set objConnection = ctlLogon.NewConnection
”’ Set logon details
objConnection.ApplicationServer = appserver
objConnection.System = sysid
objConnection.SystemNumber = sysno
objConnection.client = client
objConnection.Language = lang
objConnection.user = user
objConnection.Password = currpass
”’ Log on to system
booReturn = objConnection.Logon(0, True)
outFile.Write sysid & ” ” & client & “: ”
”’ Check if logon successful
If booReturn <> True Then
objConnection.LastError
outFile.Write “Can’t log on”
Exit Sub
Else
outFile.Write “Login OK”
End If
”’ Prepare to call change password function
funcControl.connection = objConnection
Set CHPASS_FN = funcControl.Add(“SUSR_USER_CHANGE_PASSWORD_RFC”)
Set expPassword = CHPASS_FN.Exports(“PASSWORD”)
Set expNewPass = CHPASS_FN.Exports(“NEW_PASSWORD”)
Set expFillRet = CHPASS_FN.Exports(“USE_BAPI_RETURN”)
Set impReturn = CHPASS_FN.Imports(“RETURN”)
expPassword.Value = currpass
expNewPass.Value = newpass
expFillRet.Value = “1”
”’ Call change password function
If CHPASS_FN.Call = True Then
outFile.Write (“, Called Function”)
Message = impReturn(“MESSAGE”)
outFile.WriteLine ” : ” & Message
Else
outFile.Write (“, Call to function failed”)
End If
outFile.WriteLine vbNewLine
End Sub
now it was ask for the old passwd
and the new passwd
Give it a couple of mins and open the passchangelog file(will be on the same directory where you ran pass.vbs from) to see the results
shutdown /m \\hostname /r /t 0
While trying to add a system to a solution we got the following error :
and it was because the product definition was missing from SMSY as referred on SAP Note : 1603103 – SMSY: The product definition for one or several SAP product versions is missing
and the Solution was to :
Download the files attached to this SAP Note. The archives contain the required XML files. An XML file always contains the specified version of a product and includes all previous versions.
Comment:
Refer also to SAP Note 1935993, which contains additional product definitions.
while trying to configure SLD on HANA system we got the following error
acc-db-01:/sapmntext/shared/ABC/hdblcm # ./hdblcm
SAP HANA Lifecycle Management – SAP HANA 1.00.102.05.1455873859
***************************************************************
Choose an action to perform
Index | Action to be performed | Description
————————————————————————————–
1 | add_hosts | Add Additional Hosts to the SAP HANA System
2 | configure_internal_network | Configure Inter-Service Communication
3 | configure_sld | Configure System Landscape Directory Registration
4 | print_component_list | Print Component List
5 | rename_system | Rename the SAP HANA System
6 | uninstall | Uninstall SAP HANA Components
7 | unregister_system | Unregister the SAP HANA System
8 | update_component_list | Update Component List
9 | update_components | Install or Update Additional Components
10 | update_host | Update the SAP HANA Instance Host integration
11 | exit | Exit (do nothing)
Enter selected action index [11]: 3
Enter SLD Host Name: abcx.com.au.gb
Enter SLD Port: 50000
Enter SLD User Name: SLD_USER
Enter SLD Password:
Enter Use HTTPS [n]:
Summary before execution:
=========================
SLD Registration Configuration
Configuration Parameters
SLD Host Name: abcx.com.au.gb
SLD Port: 50000
SLD User Name: SLD_USER
Do you want to continue? (y/n): y
INFO: END: Configuration of SLD registration failed
10:18:42.088 – ERR : SLD configuration failed
10:18:42.089 – INFO: Configuring SLD Registration failed
10:18:42.273 – ERR : Registration in System Landscape Directory failed.
10:18:42.327 – INFO: Summary of critical errors
10:18:42.273 – ERR : Registration in System Landscape Directory failed.
10:18:42.088 – ERR : SLD configuration failed
10:18:42.087 – ERR : SetUser() failed: cannot get egid
10:18:42.087 – INFO: Set of global property failed
The Issue was /etc/groups was messed up for the user’s group
was like this
abcx.com.au.gb:/> cat /etc/group | grep 111
sapsys:!:111,hmdadm:
Also the groups command show this
abcx.com.au.gb:/> groups
groups: cannot find name for group ID 111
111 dialout video hmdshm
and after fixing the /etc/group file now its like this
abcx.com.au.gb> cat /etc/group | grep 111
sapsys:!:111:abcadm,defadm,sweadm
abcx.com.au.gb:/> groups
sapsys dialout video hmdshm
we had issues with SAP download manager and got wget to download the files for us . First we got the URL for the files to be downloaded from the download basket using the export links to a text file option
The URL can be seen as from the downloaded file
https://softwaredownloads.sap.com/file/0010000019608882017
https://softwaredownloads.sap.com/file/0010000020350632017
https://softwaredownloads.sap.com/file/0010000000408952018
https://softwaredownloads.sap.com/file/0030000020441862017
and then downloaded the wget version for windows and used as follows , the ai.txt file has the url for the files to be downloaded
wget -i ai.txt –no-check-certificate –http-user=Suser ID –http-password=xxxxxxx
If we need to mass change SAP Jobs (like change program,variant,user,executing server) etc use the following report by SAP
BTC_MASS_JOB_CHANGE
We wanted to check all our windows servers were set to – ‘Never check for update’ ( windows update and we wanted to check all the hosts without logging to each one of them and the following PS command helped (if the value returned !=1 then it meant thats windows updates was enabled)
PS C:\Users\jjoy> Invoke-Command -ComputerName ear-as-02,bar-as-02,bar-as-01,sab-as-01,sab-as-02 -ScriptBlock { Get-ItemProperty -Path hklm:software\microsoft\windows\currentversion\WindowsUpdate\Auto* -Name “AUOptions” }
We had an issue where the HANA application lifecycle manager shows the login page but after sucessfully authenticating just shows a blank page.
The issue was with the HANA LCM delivery unit was not activated properly and we had to deploy them again .
The following query shows if any objects were invalid on HANA
select * from “_SYS_REPO”.”ACTIVE_OBJECT” where object_status > 0;
and this query shows the version and date of the deployment for LM
select * from “_SYS_REPO”.”DELIVERY_UNITS” where delivery_unit = ‘HANA_XS_LM’;
the following step with redeploy all teh auto content DU’s
As <sid>adm user, log on to the server and deploy all auto content DUs on the system database by executing the following command:
/usr/sap/<SID>/SYS/global/hdb/install/bin/hdbupdrep –content_directory=/usr/sap/<SID>/SYS/global/hdb/auto_content
and in our case we just had to redeploy the LM delivery unit via studio
File > Import > Import Source: “Delivery Unit” > Choose the right target system > Select from “server” file: “/usr/sap/<SID>/SYS/global/hdb/auto_content/HANA_XS_LM.tgz” > Finish.
ref sap notes :
2158380 – Activation of .hdbti object Fails with Error “Found overlapping key usage with {tenant: , package: …, name: …, suffix: hdbti} : define distinct key areas”
2115815 – FAQ: SAP HANA Database Patches and Upgrades (section 21)
2214890 – Deployment of a delivery unit in SAP HANA.