/var/tmp/logs/hdblcm.log
Helping you to protect your tomorrow
Wednesday, 26 February 2020
Tuesday, 25 February 2020
Saturday, 22 February 2020
Local Client Copy
local client copy
Pre- requisites for local client copy:
- Check the size of client using report rsspacecheck.
- Test run will be advice to check actual time taken by client copy.
- Lock the source client/Target client to avoid inconsistency (so that No new entries of recorded while performing the client copy).
- Suspended all background job with report BTCTRNS1.
- make rdisp/max_wprun_time =0, in profile parameters using RZ10 t-code. if the client copy is performing with Dialog work processes not background.
Steps to perform local client copy:
- create logic system. eg: CLNT<SID><Client no>,clntdev600
- Create client in SCC4 ( just entry in table T000).
- Set the value of parameter login/no_automatic_user_sapstar to 0.
- Restart SAP Application.
- Login to newly created client with userid: sap* and password as pass.
- Change password for the user SAP* for better security reasons.
- Execute local client copy with t-code SCCL. As in step 2 only client created with out any standard tables & standard table will be copy here from source client.if it is implementation project source client will be 000.
- Select correct profile for client copy.
- Check logs in SCC3.
Note: Lock the source system,to not update any record while performing client copy.To avoid inconsistency.
Client Administration in SAP BASIS
Here are the list of T-code that involve in Client Administration in SAP BASIS
- BDLS - To rename the existing logical system name(CLNT<SID><client no.>).
- BD54 or SALE - To create new logical system (CLNT<SID><client no.>).
- SCC1 - To move Transport requests in between clients with in the system.
- SCCL - TO perform local client copy.
- SCC3 - To view the logs of on- going client copy and status of previous client copies .
- SCC4 - To create new client( just an entry in table T000).
- SCC5 - To delete exist client in SAP system. Need to login same client to which need to delete.
- SCC7 - To perform post client import. which makes run time adoption of client import data.
- SCC8 - To export exist client data.
- SCC9 - To perform remote client copy.
- STMS_IMPORT - To import Transport request, Which is obtained by client export.
- SCU0 - To perform client compare between two clients
Monday, 17 February 2020
Wildcards in Linux scripting
Types of wildcards
Note: Delete files with wildcards might happens. if file names are standard naming conversion.
eg: dd-mm-yyyy.log
- ? - exactly place wildcard.
- * - multiple place wildcard.
use of wildcards in Linux scripting:
- Act like filter.
- copy,remove,list files and print output files(>) based on filter applied in wildcards.
eg: dd-mm-yyyy.log
Saturday, 15 February 2020
Functions and it significance in Linux scrpiting
Functions:
why functions:
- Don't repeat the same lines of code again and again can be achieved.
- Reduce of script length.
- Maintenance of scripts in case of issue is easy with scripts. Because of single entry maintenance in entire script.
Thumb rules in the Function:
- Must be defined before call.
- Function syntax basically consists of two parts:
2. calling function.
-----------------------------------------------------------------------------------------------------------------------
#Syntax for 1.defining function:
#Method-1
function function_name ( ) {
#code
}
-----------------------------------------------------------------------------------------------------------------------
#Method-2
function_name ( ) {
#code
}
--------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------
#2.calling function. To call or execute the function which already defined,just mention #function_name in the line of the script.
real time example:1
#!/bin/bash1
function hello( ) {
echo "HELLO!!!"
}
hello #calling the function
output:
HELLO!!!
Real time example 2: with position parameters
#script
#/bin/bash
function hello ( ) {
echo "hello $2"
}
hello ram sam zam # calling function
output:
hello sam
#script
#/bin/bash
function hello ( ) {
echo "hello $2"
}
hello ram sam zam # calling function
output:
hello sam
Friday, 14 February 2020
Log volumes are full in HDB
Log Volume is Full and the Database Doesn’t Accept any new Requests
If the log_mode is set to legacy the logvolume keeps all log segments since the last full backup in the logvolume.
If no backups are performed the logvolume can run out of space.
Solution
1. Stop the database:
HDB stop
2. Change into the folder mnt00001 of the logvolume (Default: /usr/sap//global/hdb/log):
cd /usr/sap//global/hdb/log/mnt00001
3. You have to move one of the logvolumes temporarily to another volume where enough space is available.
You should free at least 2 GB of space to ensure that the database has enough space to start.
To find out the space consumption of each volume execute:
du -sh
4. Move a volume which consumes at least 2 GB of space (e.g. hdb00003)
to a volume with enough free space,
e.g. to the data volume (Default: /usr/sap//global/hdb/data):
mv hdb00003 /usr/sap//global/hdb/data
5. Create a symbolic link to the new folder in the old location:
ln -s /usr/sap//global/hdb/data/hdb00003 /usr/sap//global/hdb/log/mnt00001/hdb00003
6. Start the database (HDB start) and perform a backup
7. Use the following SQL-Statement to clean up the logvolume:
ALTER SYSTEM RECLAIM LOG;
8. Stop the database again and remove the symbolic link:
rm -f /usr/sap//global/hdb/log/mnt00001/hdb00003
9. Move the log volume back to its original location:
mv /usr/sap//global/hdb/data/hdb00003 /usr/sap//global/hdb/log/mnt00001
10. Start the database (HDB start)
ref: 1679938 – Log Volume is full (log mode = legacy)
If the log_mode is set to legacy the logvolume keeps all log segments since the last full backup in the logvolume.
If no backups are performed the logvolume can run out of space.
Solution
1. Stop the database:
HDB stop
2. Change into the folder mnt00001 of the logvolume (Default: /usr/sap//global/hdb/log):
cd /usr/sap//global/hdb/log/mnt00001
3. You have to move one of the logvolumes temporarily to another volume where enough space is available.
You should free at least 2 GB of space to ensure that the database has enough space to start.
To find out the space consumption of each volume execute:
du -sh
4. Move a volume which consumes at least 2 GB of space (e.g. hdb00003)
to a volume with enough free space,
e.g. to the data volume (Default: /usr/sap//global/hdb/data):
mv hdb00003 /usr/sap//global/hdb/data
5. Create a symbolic link to the new folder in the old location:
ln -s /usr/sap//global/hdb/data/hdb00003 /usr/sap//global/hdb/log/mnt00001/hdb00003
6. Start the database (HDB start) and perform a backup
7. Use the following SQL-Statement to clean up the logvolume:
ALTER SYSTEM RECLAIM LOG;
8. Stop the database again and remove the symbolic link:
rm -f /usr/sap//global/hdb/log/mnt00001/hdb00003
9. Move the log volume back to its original location:
mv /usr/sap//global/hdb/data/hdb00003 /usr/sap//global/hdb/log/mnt00001
10. Start the database (HDB start)
ref: 1679938 – Log Volume is full (log mode = legacy)
Tuesday, 11 February 2020
host connectivity check using Linux scripts using exit code
cat
connect_check.sh
#!/bin/bash
HOST="google.com"
ping -c 4
$HOST
if [ "$?" -eq "1" ] #exit code test
condition
then
echo
" $HOST is reachable "
else
echo
" $HOST unreachable "
fi
Output
./connect_check.sh
PING
google.com (172.217.17.78) 56(84) bytes of data.
From
10.188.34.2 icmp_seq=1 Destination Host Unreachable
From
10.188.34.2 icmp_seq=2 Destination Host Unreachable
From
10.188.34.2 icmp_seq=3 Destination Host Unreachable
From
10.188.34.2 icmp_seq=4 Destination Host Unreachable
---
google.com ping statistics ---
4 packets
transmitted, 0 received, +4 errors, 100% packet loss, time 2998ms
google.com is reachable
Position parameters in linux scripts
#!/bin/bash
echo
"check your employee details: "
echo
" running '$0'"
echo
" SAP employee id: '$1'"
echo
" TCS employee id: '$2'"
echo
" Contact number: '$3'"
echo
" TCS cubic number: '$4'"
echo
" Building : '$5'"
echo
" location : '$6'"
echo
" job role : '$7'"
echo
" ODC: '$8'"
echo
" Name: '$9'"
echo
" date: '${10}'" #from 10 th position parameter on wards 's{10}' is mandatory.
Output
Hostname:/install
# ./pp.sh CXX9350 1XX1350 8XXXXXX2 8 victor Bangalore BASIS 7 Naveen
11_02_2020
check
your employee details:
running './pp.sh'
SAP employee id: 'CXX9350'
TCS employee id: '1XX1350'
Contact number: '8XXXXXX2 '
TCS cubic number: '8'
Building : 'victor'
location : 'Bangalore'
job role : 'BASIS'
ODC: '7'
Name: 'Naveen'
date: '11_02_2020'
Monday, 10 February 2020
Read command in linux
Good Reference:
https://www.youtube.com/watch?v=QW-stV8aW_U
To pass SID details in to scripts:
#!/bin/bash
echo "enter the SID :"
read SID
echo "the SID you enter is $SID"
Method 2 of passing dynamic parameter in to scripts
cat test2.sh
#!/bin/bash
read -p "enter your SID: " SID
echo " conform your SID as $SID"
https://www.youtube.com/watch?v=QW-stV8aW_U
To pass SID details in to scripts:
#!/bin/bash
echo "enter the SID :"
read SID
echo "the SID you enter is $SID"
OUTPUT:
Hostname:/install/ ./test1.sh
enter the SID :
RAM
the SID you enter is RAM
Method 2 of passing dynamic parameter in to scripts
cat test2.sh
#!/bin/bash
read -p "enter your SID: " SID
echo " conform your SID as $SID"
Sunday, 9 February 2020
Friday, 7 February 2020
Wednesday, 5 February 2020
Tuesday, 4 February 2020
importance of interpreter in the scripts
An interpreter executes the commands in the scripts
- Before executing any script, make sure that it is having 755 file permission rights
- Make sure about the shebang use in script. in case of miss match of shebang the scripts won't execute completely.if you are not aware of shebang concept make use of .sh as extension for you script.
How exactly need to write shell scripts.
A script is a series of commands to execute particular task.
usually we will make use of scripts, while performing the routine tasks or regular tasks to make them automate.
Subscribe to:
Posts (Atom)