Posts

Showing posts from 2020

Oracle Trigger to Log Logon Denied ORA-1017 Error into Alert Log

  create trigger logon_denied_to_alert after servererror on database declare message varchar2(4000); begin select 'ip='||sys_context('userenv','ip_address')||',host='||sys_context('userenv','host')||',osuser='||SYS_CONTEXT ('USERENV', 'OS_USER') into message from dual; IF (ora_is_servererror(1017)) THEN message := to_char(sysdate,'Dy Mon dd HH24:MI:SS YYYY') || ' logon denied for ' || message; sys.dbms_system.ksdwrt(2,message); end if; end; / === And to view where the trace file is: G:\oracle\diag\rdbms\syp\syp\trace>sqlplus / as sysdba SQL*Plus: Release 11.2.0.4.0 Production on Mon Dec 14 12:09:14 2020 Copyright (c) 1982, 2017, Oracle.  All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> show parameter background NAME                   ...

How To Check Existing NW Java Usage Types / Software Units / Product Instance

 Software Units or Usage Types or the new name Product Instance All same thing, but different names. Example in NW JAVA - ADS or EP Core or Enterpriuse Portal Go To URL: http://fqdn:port/utl/SLDInstancesDetailedInfo.jsp Old URL:  http://<host>:<http_port>/utl/UsageTypesInfo Some side reference:  1793486 - Installing additional usage types in existing SAP systems using SUM //alak

Compiling and Testing sflightClient Demo Application on MacOS 10.15.6 after Installing SAP NW RFC SDK 7.50 PL6

  Just my own notes: Ref: 2573790 - Installation, Support and Availability of the SAP NetWeaver RFC Library 7.50 2573953 - Compiling and Linking RFC Programs with the SAP NetWeaver RFC SDK 7.50 Compiling: cd demo/ clang++ -std=c++11 -DSAPwithUNICODE -I../include -c -o sflightClient.o sflightClient.c clang++ -o sflightClient sflightClient.o ../lib/libsapnwrfc.dylib ../lib/libsapucum.dylib And running it: awes0me@Niks-MacBook-Pro demo % ./sflightClient /H/saprouter.com/S/3299/H/172.16.10.71 00 BPINST Welcome1 100 EN Logging in...  ...done Caching DDIC metadata...  ...done Please select an Airline: AA     American Airlines AB     Air Berlin AC     Air Canada AF     Air France AZ     Alitalia BA     British Airways CO     Continental Airlines DL     Delta Airlines FJ     Air Pacific JL     Japan Airlines LH    ...

SAP NW RFC SDK 7.50 PL6 On MacOS 10.15.6

 Had some issue in compiling node-rfc on MacOS 10.15.6 Haven't had that sorted out But at least i have my SAP NW RFC SDK installed correctly on my Mac.. VERY useful info from: https://github.com/SAP/node-rfc/issues/143 https://github.com/SAP/node-rfc/issues/140 Snippets: As a workaround you can: Replace modified nwrfcsdk libs, with SAP original libs, in /usr/local/nwrfcsdk folder Fix  sapnwrfc.node  @rpaths to @loader_paths: $ cd lib \b inding $ install_name_tool -change @rpath/libsapnwrfc.dylib @loader_path/libsapnwrfc.dylib sapnwrfc.node $ install_name_tool -change @rpath/libsapucum.dylib @loader_path/libsapucum.dylib sapnwrfc.node To verify: $ otool -L sapnwrfc.node (py380) master ✱ sapnwrfc.node: @rpath/sapnwrfc.node (compatibility version 0.0.0, current version 0.0.0) @loader_path/libsapnwrfc.dylib (compatibility version 0.0.0, current version 0.0.0) @loader_path/...

Fiori Apps Keep Calling Internal Hostname / Internal FQDN

Image
Had this issue where certain apps calls internal hostnames or internal FQDN when clicking or spawning webdynpro URL or any calling of internally hosted attachment. To change this setting, general steps as below: Check the app is using which local Alias - is it LOCAL or S4PS or S4FIn or whatever Check in /UI2/V_ALIASMAP / /UI2/V_ALIASCAT that alis is mapped to which alias. Check in SM59 under HTTP Connections to ABAP System if let say the Alias name is LOCAL, so there should be three LOCAL_xx created, which are: LOCAL_HTTP LOCAL_HTTPS LOCAL_HTTPT SO change for each of this, to the correct FQDN or hostname Hope this helps someone. //alak

Determine / Show WIndows NICs Index and Metric

Some usef=ul commands: route print - the initial part of the output shows the nwtrok interface indexes and middle part show the NICs metrix and gateway priority netsh int ipv4 show interfaces - shows list of NICs with MTUm, index and Metric,. Powershell: Get-WMIObject Win32_networkadapter | Select-Object Name, AdapterType, InterfaceIndex | Format-List Shows index of network cards Powershell:  Get-NetIpInterface Get info of Index, MTU and Mteric of all NICs SAP related Notes: 1568249 - How to Change Network adapter priority in Windows 1841151 - Windows Server 2012 (and higher) - different NIC order 2109662 - Windows returns wrong IP address as source IP SAP on VMware related: 2161991 - VMware vSphere configuration guidelines //alak

rsync - recursive and preserving permissions

Had a case where i need to sync up /hana/data dn /hana/log to a whole new disk.. i used rsync, but f-up the permission part.. so here's a note to myself rsync -rlptgoDHAX <source-dir> <target-dir> You want the -p flag: -p, --perms preserve permissions I tend to always use the -a flag, which is an aggregation of -p and several other useful ones: -a, --archive archive mode; equals -rlptgoD (no -H,-A,-X) -H, --hard-links Preserve hard links -A, --acls This option causes rsync to update the destination ACLs to be the same as the source ACLs. The option also implies --perms. The source and destination systems must have compatible ACL entries for this option to work properly. See the --fake-super option for a way to backup and restore ACLs that are not compatible. -X, --xattrs This option causes rsync to update the destination extended attributes to be the same as the source ones. For systems that suppor...

CSS: Puting Things Dead Center

SOme examples i got from Twitterr: .container {     display: grid     place-iitems: center } {      display: block;      margin: auto; } {      display: flex;      justify-content: center;      align-items: center; } {      width: 50%;      margin: 0 25%; } {      text-align: center; } {      position: absolute;      top: 50%;      left: 50%;      transform: translate(-50%, -50%); } {     margin-left: auto;     margin-righ: auto;     width: 960px; /*example*/ } //alak

VBScript clearner.vbs - Delete File Based on Last Modified Date and Filter by File Extension

A VB script, i forgot where i got it. === '****************************************************************** ' naam: Cleanup.vbs ' function: ' - Cleanup old files depending on the age of x days ' - Check for file extension ' - Possible to recurse in subfolders ' - For clustered drives, will check first if the drive exists on that server ' author: SDR '****************************************************************** Option Explicit Dim wshShell Dim FilePath, Retention, FileFilter, FilterExt, SubFilter Dim fso, Folder, DriveLetter Set wshShell = wscript.createobject( "wscript.shell" ) Set fso = CreateObject( "Scripting.FileSystemObject" ) '******************************************************************* ' Fill in below variables ' ex. ' FilePath = "D:\BACKUP" ' Retention = 2 ' note: Retention is in days ' If you need to filter by extention...

User administration page in Solution Manager for Each Scenarrios and Use Cases and Its Respective rroles

Image
User administration page in Solution Manager. Solution Manager has a lot of scenarios and use cases, and all of them require different roles/authorizations to be used. We can find the template users in this administration page, together with their use-case, so we can activate and use the correct roles for the different scenario’s: http://solman.customer.local:port/sap/bc/webdynpro/sap/wd_sise_centralusermgmt?SCENARIO=X&sap-language=EN# Below screenshot is from Solution manager 7.2 FP 09 Kudos Stijn de Regge //alak

Communication Between S/4HANA and an EDI Server Failed due to Inconsistent Time

1. Shutdown both HANA DB and S/4HANA Applications in S4H.customer.local 2. As user root, backup the /etc/ntp.conf file in S4H.customer.local 3. Run the ntpdate -u command to update the machine clock.    e.g.: ntpdate -u 192.11.111.22 4. Open the /etc/ntp.conf file and add the NTP server: 192.11.111.22. Add the line below:    server 192.11.111.22  mode 5 prefer 5. Restart the NTP Daemon using the command (as user root):     systemctl restart ntpd 6. Check the clock settings 7. Check the status of the ntpd daemon     systemctl status ntpd 7. Restart both HANA DB and S/4HANA Applications in S4H.customer.local Kudos to Alvin Domanico and Dormal Benoit /alak

SuSE Update Lists No Repository

Image
We need to perform OS patching for ORAC But found the SUSE connect error and no repositorieds defined. No updates can found currently. ls -l /etc/products.d Wrong baseproduct is defined, it should be SLES_SAP.prod cd /etc/products.d unlink baseproduct ln -s SLES_SAP.prod baseproduct cat /var/log/cloudregister zypper repos zypper lp --category security Kudos to Stijn De Regge //alak

Restart an SAP service internally in SAP without restarting the service itself

If we restart whole instance, users get disconnected etc, so in a case, for example, we want to restart only message server, we can eithr use MMC and All Task > Restart Service for MessageServer or more simply via command: sapcontrol -nr 61 -function RestartService and to check: sapcontrol -nr 61 -function GetProcessList Kudos to Stijn De Regge and Tibor Fenyosi for the guide! :3 /alak