Sunday, 29 September 2019

HANA studio brief intro


  1. Catalog: Collection of schema's, schema's are collection of tables.


  • schema: The logical representation of tables. 
      2.content : It is the collection of packages, packages are collection of Business process.
  • Business process: one business activity can perform through SAP software.
      3. Provising: collection of data from External sources.
                            eg: SLT
      4.security: For creation of users & assignment of role to HANA Database users.

Thursday, 26 September 2019

How to set time zone in server

My scenario: while install one SAP Business solution, installation stopped due to time zone difference between the Application & DB server.


Here we go for changing the time zone for my Application server:

Step1: check the present time zone of the server.

$date

Thu Sep 26 16:23:24 +07 2019

step2: Navigate to etc/localtime & remove 

$/etc # ll loc*
-rw-r--r-- 1 root root 407 Jan 21  2018 locale.conf
lrwxrwxrwx 1 root root  36 Sep 26 15:54 localtime -> /usr/share/zoneinfo/Indian/Christmas

step3:

$ rm localtime

cross check now:

/etc # ll loc*
-rw-r--r-- 1 root root 407 Jan 21  2018 locale.conf

step4: Select the time zone to be maintained

$ cd /usr/share/zoneinfo/



/usr/share/zoneinfo # ls
Africa      Atlantic   Chile    Eire     Factory  GMT-0      Iceland      Jamaica    Mexico   NZ-CHAT   posixrules  ROK        US            zone.tab
America     Australia  CST6CDT  EST      GB       GMT+0      Indian       Japan      MST      Pacific   PRC         Singapore  UTC           Zulu
Antarctica  Brazil     Cuba     EST5EDT  GB-Eire  Greenwich  Iran         Kwajalein  MST7MDT  Poland    PST8PDT     Turkey     WET
Arctic      Canada     EET      Etc      GMT      Hongkong   iso3166.tab  Libya      Navajo   Portugal  right       UCT        W-SU
Asia        CET        Egypt    Europe   GMT0     HST        Israel       MET        NZ       posix     ROC         Universal  zone1970.tab

Step 5: here i need to set time zone as KUWAIT as per my client server geographical location.

/usr/share/zoneinfo/Asia # ls
Aden       Baghdad  Calcutta    Dili         Hovd       Kashgar       Macao         Omsk        Saigon         Tbilisi        Ulan_Bator
Almaty     Bahrain  Chita       Dubai        Irkutsk    Kathmandu     Macau         Oral        Sakhalin       Tehran         Urumqi
Amman      Baku     Choibalsan  Dushanbe     Istanbul   Katmandu      Magadan       Phnom_Penh  Samarkand      Tel_Aviv       Ust-Nera
Anadyr     Bangkok  Chongqing   Famagusta    Jakarta    Khandyga      Makassar      Pontianak   Seoul          Thimbu         Vientiane
Aqtau      Barnaul  Chungking   Gaza         Jayapura   Kolkata       Manila        Pyongyang   Shanghai       Thimphu        Vladivostok
Aqtobe     Beijing  Colombo     Harbin       Jerusalem  Krasnoyarsk   Muscat        Qatar       Singapore      Tokyo          Yakutsk
Ashgabat   Beirut   Dacca       Hebron       Kabul      Kuala_Lumpur  Nicosia       Qyzylorda   Srednekolymsk  Tomsk          Yangon
Ashkhabad  Bishkek  Damascus    Ho_Chi_Minh  Kamchatka  Kuching       Novokuznetsk  Rangoon     Taipei         Ujung_Pandang  Yekaterinburg
Atyrau     Brunei   Dhaka       Hong_Kong    Karachi    Kuwait        Novosibirsk   Riyadh      Tashkent       Ulaanbaatar    Yerevan

Step 6: Navigate to /etc/again

and execute the below command

/etc # ln -s /usr/share/zoneinfo/Asia/Kuwait localtime

Step 7: verify once

/etc # ll loc*
-rw-r--r-- 1 root root 407 Jan 21  2018 locale.conf
lrwxrwxrwx 1 root root  31 Sep 26 12:39 localtime -> /usr/share/zoneinfo/Asia/Kuwait


$date
Thu Sep 26 12:41:19 +03 2019

Wednesday, 25 September 2019

Rename directory in linux

/install # ll
total 8
drwxrwxrwx 2 root root 4096 Aug 28  2018 .snapshot
drwxr-xr-x 2 root root 4096 Sep 25 12:06 test



$ mv test tests

drwxrwxrwx 2 root root 4096 Aug 28  2018 .snapshot
drwxr-xr-x 2 root root 4096 Sep 25 12:06 tests


 cd tests
:/install/tests # ll
total 0

Sunday, 22 September 2019

Thursday, 19 September 2019

FAIL: NIECONN_REFUSED (Connection refused), NiRawConnect failed in plugin_fopen(0


hec01v039747:vo0adm 31> pwd
/sapmnt/VO0/exe/uc/linuxx86_64


 sapstartsrv pf=/usr/sap/VO0/SYS/profile/VO0_ASCS01_vhxy0vo0cs -D



 pf -ef | grep -i sap

CORRECT>ps -ef | grep -i sap (y|n|e|a)? yes
root      1617     1  0 Sep13 ?        00:01:35 /usr/sap/hostctrl/exe/saphostexec pf=/usr/sap/hostctrl/exe/host_profile
sapadm    1662     1  0 Sep13 ?        00:08:14 /usr/sap/hostctrl/exe/sapstartsrv pf=/usr/sap/hostctrl/exe/host_profile -D
root      1840     1  0 Sep13 ?        00:18:43 /usr/sap/hostctrl/exe/saposcol -l -w60 pf=/usr/sap/hostctrl/exe/host_profile
vo0adm   12100     1  2 11:48 ?        00:00:00 sapstartsrv pf=/usr/sap/VO0/SYS/profile/VO0_ASCS01_vhxy0vo0cs -D
vo0adm   12143  7266  0 11:48 pts/1    00:00:00 grep -i sap


/sapmnt/VO0/exe/uc/linuxx86_64
./sapstartsrv pf=/usr/sap/VO0/SYS/profile/VO0_D00_vhxy0vo0ci -D


hec01v039747:/ # ps -ef | grep -i sap
root      1617     1  0 Sep13 ?        00:01:35 /usr/sap/hostctrl/exe/saphostexec pf=/usr/sap/hostctrl/exe/host_profile
sapadm    1662     1  0 Sep13 ?        00:08:15 /usr/sap/hostctrl/exe/sapstartsrv pf=/usr/sap/hostctrl/exe/host_profile -D
root      1840     1  0 Sep13 ?        00:18:46 /usr/sap/hostctrl/exe/saposcol -l -w60 pf=/usr/sap/hostctrl/exe/host_profile
vo0adm   12100     1  0 11:48 ?        00:00:01 sapstartsrv pf=/usr/sap/VO0/SYS/profile/VO0_ASCS01_vhxy0vo0cs -D
vo0adm   14087     1  0 11:56 ?        00:00:00 sapstart pf=/usr/sap/VO0/SYS/profile/VO0_ASCS01_vhxy0vo0cs
vo0adm   14106 14087  0 11:56 ?        00:00:00 ms.sapVO0_ASCS01 pf=/usr/sap/VO0/SYS/profile/VO0_ASCS01_vhxy0vo0cs
vo0adm   14107 14087  0 11:56 ?        00:00:02 enq.sapVO0_ASCS01 pf=/usr/sap/VO0/SYS/profile/VO0_ASCS01_vhxy0vo0cs
vo0adm   16586     1  0 12:07 ?        00:00:01 ./sapstartsrv pf=/usr/sap/VO0/SYS/profile/VO0_D00_vhxy0vo0ci -D
root     17305 11496  0 12:10 pts/3    00:00:00 grep --color=auto -i sap



Login with root

hec01v039747:/usr/sap/hostctrl/exe # ./sapcontrol -nr 01 -function Start

hec01v039747:/usr/sap/hostctrl/exe # ./sapcontrol -nr 00 -function Start


Referances:
1.

3.https://blogs.sap.com/2015/09/07/how-to-solve-nieconnrefused-issues-during-sapcontrol-execution/

Wednesday, 18 September 2019

Tuesday, 17 September 2019

How to sort files by date

[root@localhost ~]# ls -lt

total 100 -rw-r--r--. 1 root root 0 Apr 26 10:52 file.txt drwxr-xr-x. 2 root root 4096 Apr 24 09:10 data -rw-------. 1 root root 2689 Apr 9 02:44 anaconda-ks.cfg -rw-r--r--. 1 root root 41364 Apr 9 02:44 install.log -rw-r--r--. 1 root root 9154 Apr 9 02:41 install.log.syslog drwxr-xr-x. 2 root root 4096 Apr 8 21:18 Music drwxr-xr-x. 2 root root 4096 Apr 8 21:18 Pictures drwxr-xr-x. 2 root root 4096 Apr 8 21:18 Videos drwxr-xr-x. 2 root root 4096 Apr 8 21:18 Desktop drwxr-xr-x. 2 root root 4096 Apr 8 21:18 Documents drwxr-xr-x. 2 root root 4096 Apr 8 21:18 Downloads drwxr-xr-x. 2 root root 4096 Apr 8 21:18 Public drwxr-xr-x. 2 root root 4096 Apr 8 21:18 Templates

how to check last line in the updating file in linux

tail -f

how to give read,write & execute rights to all the files in the directory

chmod -R 777 <folder_name>

Saturday, 14 September 2019

User administration in SAP BASIS

1.Good reference for user administration in ECC systems. 
2. Good reference for user administration in portal systems.




SYBASE: How to update sybase database patches


How to apply patches to sybase
Tags:
  • sybase_ase
  • migration_to_ase_15
  • sybase
  • sap_sybase_ase
  • sap_sybase


Procedure - apply patches to sybase
1. Download the software from the SAP Service Marketplace
2. Prepare the upgrade
3. Update the ASE software
4. Perform post-upgrade tasks
5. Update the ODBC and JDBC drivers
6. Restart the SAP system



Recommendation: Perform a file system backup of the ASE software directory (<drive>:\sybase\<SID>) before you update the software.

1. Download the software from the SAP Service Marketplace
              Download the latest software patch from the SAP Service Marketplace.
a) Open the SAP Software Download Center at http://service.sap.com/swdc.
b) Choose "Support Packages and Patches" -> "Browse our Download Catalog".
c) Choose "Sybase Products" -> "Sybase ASE FOR BUSINESS SUITE" -> "Sybase ASE 15.7 FOR BUS. SUITE".
Choose your platform and "Downloads".
d) Unpack the software package to a local temporay directory.
                       File ASE157SPxx_x.SAR contains the ASE server software (xx is a two or three-digit number and refers to the current ASE patch level).
                       File DBCLNT157SPxx_x.SAR contains the ODBC and JDBC drivers.
                       Since the ASE installation has to be performed as the ASE software owner syb<sid>, it is recommended that you unpack the file as user syb<sid>.
                       Copy the downloaded files to a temporary directory. Unpack the file ASE157SPxx_x.SAR using the command:
                       SAPCAR -xvf ASE157SPxx_x.SAR
                       Do not unpack the file DBCLNT157SPxx_x.SAR.


2. Preparation for the upgrade
a) Perform a file system backup fo the software installation directory %SYBASE% (<drive>:\sybase\<SID>).
b) Check the database version before the update.
                       Log on to the operating system with user syb<sid>. Open an administrator cmd shell and type:
                       sqlsrvr.exe --sbssav
                       sqlsrvr.exe --version
                       Make a note of the current version for later comparison.
                       Recommendation: Unlock the 'sa' account in ASE before you start the ASE upgrade. Log in to ASE using the account 'sapsso' with isql and execute the command:
                       sp_locklogin 'sa','unlock'
c) Stop the SAP system and the ASE server; use user <sid>adm.
                       Shut down the SAP system and the ASE server using the SAP Management Console. Alternatively, shut down the ASE server by stopping the services Sybase BCKServer _<SID>_BS and Sybase SQLServer _<SID>.
                       Use the Task Manager to check if the processes sqlsrvr.exe and bcksrvr.exe owned by user syb<sid> have stopped running.
                       The ASE server must be offline during the update. Also none of the utilities (for example 'isql') must be in use. Otherwise files would be locked by the running database processes.

3. Update the ASE software
              You can use either the command line installer 'setupConsole.exe' or the graphical ASE installer.
a) Using the command line installer
                       Download the file dbsrvresp_update.txt which is attached to this note. Put it into the temporary directory where you unpacked the ASE Software. As user syb<sid> open an administrator command shell, switch to the temporary directory. Call the executable setupConsole.exe with the following parameters (the command must be entered on one line at the command prompt):
                       .\setupConsole.exe -f <TMPDRIVE>:\<PATH_TO_TMPDIR>\dbsrvresp_update.txt -i silent -DUSER_INSTALL_DIR=<SYBDRIVE>:\sybase\<DBSID> -DAGREE_TO_SYBASE_LICENSE=true
                       Replace <DBSID> with your SAP System ID, replace <SYBDRIVE> with the drive where your ASE software is installed.
                       Replace <TMPDRIVE> and <PATH_TO_TEMPDIR> as it applies to your system (the temporary folder with installable ASE software is located).
                       When the install process has finshed, check the installer log file ASESuite.log which is located in directory %SYBASE%\log.
b) Using the GUI installer
                       As user syb<sid> open an administrator command shell, switch to the temporary directory. Call the executable setupConsole.exe with the following parameters (the command must be entered on one line at the command prompt):
                       .\setup.exe -DINSTALL_USER_PROFILE=USER -DDO_NOT_CREATE_SHORTCUT=TRUE -DREGISTER_UNINSTALLER_WINDOWS=FALSE
                       In the installer GUI window, select the Sybase home directory <drive>:\sybase\<SID> for the update and click "Next". Confirm that you want to perform the installation in an existing directory. Select "Yes" when you are asked if you want to update the product.
                       If installing ASE 15.7 SP100 and higher the GUI install displays a dialog box 'Choose Update Adaptive Server'. Do not choose this option. Click "Next" until the GUI procedure finishes.
                       Depending on the upgrade history of the installation, the ASE installer might not display the dialog box asking whether you want to update the product.
Instead a dialog box is displayed asking whether you want to install 'Typical', 'Full' or 'Custom'. Choose custom mode and mark the check boxes as follows:
    • In the Adaptive Server Enterprise feature group uncheck 'Additional ASE language modules' (unless you do need any additional language support).
    • In the 'Open Client' feature group choose DB client (leave all other checkboxes unchecked).
    • Set the checkbox for the jConnect feature.
    • In the feature group 'sysam License Utilities' uncheck 'SySam License Server'.
    • In the feature group 'Sybase Control Center' set the checkbox for 'Remote Command and Control Agent for Adaptive Server'. Leave all other checkboxes in the group unchecked.
                       In the 'License Type' screen choose 'Install Licensed Copy'. Agree to the license terms in the following screen. Choose product edition 'Enterprise Edition' and License Type 'Unknown'. Do not configure email alerts and click 'Next'. In the 'Configure new servers' dialog, leave everything unchecked and select 'Next'.                       If a dialog box "Remember passwords after connecting to servers" is displayed, select the option suitable to your business needs. We recommend you to choose "Disable".                       When the install process has finished, check the installer log file ASESuite.log which is located in directory %SYBASE%\log.                      
4. Perform post upgrade tasks
a) Restart the ASE server.
                       Start the services Sybase BCKServer _<DBSID>_BS and Sybase SQLServer _<DBSID>.                       Review the ASE error log file for correct execution (open the file <drive>:\sybase\<SID>\ASE-15_0\install\<SID>.log).                       If the ASE Job Scheduler was not disabled before you performed the upgrade, you may see an error message similar to the one below in the ASE error log:                       kernel  Initializing Job Scheduler Task
kernel  Installed Job Scheduler sequencer code version 0.29 - 29 tokens
server  Error: 11031, Severity: 16, State: 1
server  Execution of rule check_jsc_state failed because of errors parsing the source text in syscomments during upgrade. Please drop and recreate dbo.check_jsc_state.
kernel  JS : Exception 3602 raised.
kernel  JS : js__excute got the Exception                       You can ignore this error at this point.
b) Log on to the operating system with user syb<sid>, connect to ASE with isql and temporarily unlock user "sa".
                       sp_locklogin 'sa', 'unlock'
c) Execute the Sybase installation scripts.
                       After the installation of the software, execute the following scripts that adapt ASE system catalog tables. Log in as user 'syb<sid>' and switch to directory                       <drive>:\sybase\<SID>\ASE-15_0\<scripts>                       Run the script 'instmstr':                       isql -X -Usa -S<SID> -iinstmstr -o<output file>                       Check <output file> for errors.                       Check <drive>:\sybase\<SID>\ASE-15_0\install\<SID>.log for errors.                       Repeat these steps for the following scripts:
    • instcomm
    • instmsgs.ebf
    • installjsdb
    • installdbextend
    • installdbccdb (optional, necessary only if you configured the dbcc database)
d) Execute the script 'syb_update_db.TXT' which is attached to this note.
                       Copy the script to a temporary directory (e.g. the temporary directory to which you copied the Sybase software package). Change to that directory and execute the script:
                       $>isql -X -Usa -S<SID> -e -i syb_update_db.TXT -o sybupd_out.txt
                       Review the generated output file for correct execution.
                       For more information on the script, see SAP Note 1602547.
e) Restart the job scheduler. Log in to ASE with isql with the Sybase account 'sapsa' and execute the command:
                       sp_configure "enable job scheduler", 1
                       exec sybmgmtdb..sp_sjobcontrol '' , 'start_js'
f) Lock user "sa" again. Log in to ASE with isql with the Sybase account 'sapsso' and execute the command:
                       sp_locklogin 'sa', 'lock'
g) Remove the newly installed sample client library applications according to SAP Note 1598817 (optional).
5. Update of the ODBC and JDBC drivers
              The SAP system does not have to be stopped when you copy the new ODBC and JDBC software to the global directory.
a) Log in as user <sid>adm.
b) Perform a file system backup of the directory
                       <drive>:\usr\sap\<SID>\SYS\global\syb\NTAMD64\
c) Copy the file DBCLNT157SPxx_x.SAR to the directory
                       <drive>:\usr\sap\<SID>\SYS\global\syb\NTAMD64\
d) Unpack the DBCLNT157SPxx_x.SAR file using the command:
                       <DRIVE>:\usr\sap\<SID>\SYS\global\syb\NTAMD64\$>SAPCAR -xvf DBCLNT157SPxx_x.SAR
              With DBCLNT157SP05_0. SAR, the driver name was changed from jconn3d.jar to jconn3.jar, and jconn4d.jar to jconn4.jar, respectively. Update the JDBC driver and reconfigure your Java stack to use this JDBC driver with the changed name, see SAP Note 867976.
6. Restart the SAP system
              Log in as user <sid>adm and restart the SAP system through the SAP Management Console.



Security: improve your user Master Record Accuracy with Hidden Fields

By default,some user master record fields in Transaction SU01 are not displayed.for better accuracy enter custom data to better classify your master data.

This post especially useful for the SAP customers, who do not have SAP ERP HCM (Human Capital Management).

Note: By following the below steps,Maintaining the perner number,company code, department,personnel area etc. is also possible. You can gather all the information by tables USR02,USR21,ADCP,ADR6 ,V_USERNAME and USER_ADDR.



Here's How

Step 1: Login to respective system.

step 2: Execute T-code: SU01

step 3: click on Edit button.
           Here i'm using DDIC user, use your user name as per your requirement.

             

step 4: Default screen obtain with the above step.                                                                                                                                                                                                                               

Step5: click on the button as shown below.


step 6:Then the hidden fields are displayed. maintain the hidden fields and SAVE. for the better accuracy of user Master data.




Friday, 13 September 2019

SAP MC


1153713 - Problems with SAP Management Console (Java)

we all know that, SAP recently made obsolete startsap all , startsap DB, startsap R3 cmds.
and bring new commands called

  • HDB start
  • HDB stop                                

Note:Above two commands for database start and stop, if your DB is HANA.
  • ./sapcontrol -nr 00 -function Start   
  • ./sapcontrol -nr 01 -function Stop 

Note: for start and stop Application, where 00 - PAS
                                                                       01 - CI/CS



But to monitor all the system at one single place. SAP introduced new tool called SAP MC.

To access SAP MC tool:

use the below link in your browser. where java applet work, Because SAP MC is java based tool.


http://192.168.28.54:50013/sapmc/sapmc.html?SID=ECQ&NR=00&HOST=ECCQA 

here 

          192.168.28.54 - local ip of host.
          00  - Dialog instance number
          ECQ - SID
          NR -   is instance number of dialog instance again
         Hostname - name of the host with in the network.


for https use the below link:

        https://192.168.28.54:50014/sapmc/sapmc.html?SID=ECQ&NR=00&HOST=ECCQA 


How it looks like:

  1. update the link with your exact value and paste in browser (internet explorer)


http://192.168.28.54:50013/sapmc/sapmc.html?SID=ECQ&NR=00&HOST=ECCQA 

      2.Then the screen prompts for java run permission screen. conform it.
      3.Below screen will appears.
4.To all new system in SAP MC.click the above highlighted button in the above screenshot. Then the below screen will appears. Provide the SAP system details instance Nr. Host ip and check the check box for message server and finally finish button.      
5.finally the monitoring,start,stop,restart,log monitoring  in case of unexpected download times, can be done through this SAP MC.by just right click on the SID in SAP MC.



6. In the below highlighted operating system tabthe data of the SAP system like disk space left,operating system version and other system specific information can be seen here.

  
 
For BASIS consultants who are working for one specific customer, with this SAP MC tool they can monitor all the sap applications status in one place.

Note:it will work for Linux based Operating systems also.



Wednesday, 11 September 2019

Security2:How to perform mass changes in SAP Easy access menu

As soon as user login in to SAP system, the first screen on the left is SAP EASY ACCESS screen.

This post will describes, how to perform mass changes to SAP EASY ACCESS MENU.

                        Fig1:SAP EASY ACCESS

1. Login to respective system, where the mass customization of SAP EASY ACCESS is required.

2.From the SAP EASY ACCESS SCREEN, click on Extras-->settings-->check the check box-->Display technical names.

As a result of this, the technical name of each transaction will be available.


                 Fig2:Enable of technical name display.

3.Table AGR_DATEU - contains the personal setting of user as shown in Fig 2:

4.Through the below function module. Can enable Display technical names of mass users.

                    PRGN_SET_BROWSER_OPTIONS_USER - -  >Flag 4 - - >X


                                   


5. The below ABAP code is mandatory for enabling the mass along with the above step.
   


REPORT Z_SET_MENU.
TABLES : USR02.
DATA: T_USR TYPE TABLE OF USR02,
 W_USR TYPE USR02.
SELECT-OPTIONS: TOP_USR FOR USR02-BNAME.
CHECK TOP_USR-low <> SPACE.
SELECT * INTO TABLE T_USR
 FROM USR02
 WHERE BNAME IN TOP_USR.
LOOP AT T_USR INTO W_USR.
 CALL FUNCTION ‘PRGN_SET_BROWSER_OPTIONS_USER’
 EXPORTING
 UNAME = W_USR-BNAME
 FLAG4 = ‘X’.
ENDLOOP