Xavier's Blog A website about SAP BC and admin tasks

MySQL : Open access from outside

janvier 4

Because your application on a remote server had to connect to the server that host your MySQL database, or you want to administrate remotely your MySQL DB you had to know for security purposes, remote access is not allowed by default.

So, first you have to change the settings in the /etc/mysql/my.cnf file :

nano /etc/mysql/my.cnf

You had to look for bind-address setting. By default bind-address = 127.0.0.1. So you have to remplace the address which will be authorized to connect from. Only one address can be set. If you want to connect from every ip address, you had to set 0.0.0.0

Save the new file.

Run PhpmyAdmin. Click on Privileges Tab and edit your database user.

In the Login Information frame, in host, instead of localhost set % then save by pressing Execute.

Back to SSH run :

/etc/init.d/mysql stop
/etc/init.d/mysql start

 

Debian, Apache : Virtualhosts management

janvier 2

Creating a Apache Virtualhost allow you to manage several web site or subdomains.

Pre requisite : Apache is already installed and your domain name is already resolved by your DNS (check your DNS using ping command).

We will create a file to maintain the virtual hosts settings, ie :

nano /etc/apache2/sites-available/berthier.net

Copy/paste the following block in your file, replacing the domain name by your :

<VirtualHost www.berthier.net:80>
ServerAdmin postmaster@berthier.net
DocumentRoot /var/www/berthier.net/
CustomLog /var/log/apache2/berthier.net.log
LogLevel warn
</VirtualHost>

 VirtualHost : The address you want to process. IP or star (*) are also allowed.

ServerAdmin : The website admin email

DocumentRoot : Where your files can be found (html, php… website root)

CustomLog : Optionnaly, where the system will write the log file

Loglevel : Verbose level of logs (debug | info | notice | warn | error | crit | alert | emerg)

 

You can copy/past the block as many as needed, in the same or different files. Save your file.

Create a symbolic link from site-enabled directory to site-available directory

cd /etc/apache2/sites-enabled/

ln -s ../sites-available/berthier.net

Restart Apache

/etc/init.d/apache2 restart

Unix script for manual Oracle archive log shipping

décembre 27

Description – UNIX Script to manually log ship Oracle Archive files.

/* UNIX Script to manually ship archive logs from one server to another server, this
becomes very handy in server migration scenarios where downtime needs to be minimized and automatic
automatic log-shipping architecture is not in place*/

#!/usr/bin/ksh
ftp -ivn <ip-address> <<!
quote user ora<sid>
quote pass <password>
lcd /oracle/<SID>/oraarch
cd /oracle/<SID>/oraarch
binary
mput <SID>*
close
bye
!

Transform Rows Into Columns in Excel

décembre 27

Sometimes, when creating your Microsoft Excel table, you suddenly realize that the row you created should have been a column instead!

Easy steps:
Select the data of the row which you want to convert into a column
Copy the data by using Ctrl ‘C’
Put the cursor on the cell where the data is to be copied
Right click the mouse and select the ‘Paste Special’ option
Select the ‘Transpose’ check box
Click ‘Ok’
The data that was in the rows (horizontally) will be copied into the columns (vertically)
Follow the steps in reverse order to move the data from columns to rows

Some usefuls programs

décembre 20

To run from SE38 transaction :

RSPARAM : get instance parameters

RSORAREL  : To get Oracle Database realease

SHOWCOLO : Display all available colors

SHOWICON : Display all available icons

- RSBDCOS0 : Execute OS command

- RSBDCSUB : Process batch input session automatically

RSBTCDEL : Delete batch jobs

RSCONN01 : Start SAPCONNECT job send process

RSPO0041 : Delete old spool requests

RSTRANSP : Transport variants

RSTXPDFT4 : Convert spool request to pdf

RSUSR003 : check login/password parameters

RSUSR006 : List users with incorrect logons

Start/stop/query a remote Windows service

décembre 19

Just use the fllowing commands :

net use * \\ip_address\ipc$ « admin_password » /user: »Administrator »

Then you can use the SC command :

sc \\ip_address query service_name
sc \\ip_address start service_name
sc \\ip_address stop service_name

Change a Unix password [AIX]

septembre 14

From root account :

echo « user:mdp » | /usr/bin/chpasswd
pwdadm -f NOCHECK user_to change

SAP Support ports list via SAPRouter

août 28

Here is the list of ports SAP Support can ask you to open, through SAPRouter :  [To be completed]

NameSAP Note #DescriptionPort
R/3 Support
812732
HTTP Connect - URL Access
592085
Netviewer (Full Access)
1036616
Netviewer (Show Only)
VNC Connection
LoadRunner
807951
JAVA DEBUG
545519
JAVA DEBUG URL
Windows Terminal Server
605795
3389
Citrix MetaFrame
701588
T.120 NetMeeting
356635
Pcanywhere
100740
Telnet Connection
37001
23
SSH Connection
22
AS/400-5250 Connection
79411
J2EE Telnet Admin

767071
BW RFC Connection
195715
BW GUI Connection
195715
Earlywatch
Remote Consulting
Upgrade Assistant
125971
SAPinst-GUI
707848
SAP-DB Connection
202344
Integration Directory
800267
Integration Repository
800267
TCC Service Download
R/2 Connection
TREX/BIA connection
1058533

Uploading files to SAP Servers from local machine using SAP GUI

août 14

You don’t have access to your SAP server filesystem and need to upload file to it.

You can use SXDA_TOOLS transaction.

Fill the following screen like shown :

SXDA_TOOLS

Click Copy button.

Enter the path and filename from your presentation server (your SAPGui/local machine).
Enter the path and filename of your application server (your SAP server).
No conversion needed.

SXDA_CopyFiles

The file is copied to the SAP server. Owner is <sid>adm.

Add a directory on AL11

août 14

You want to add a directory managed in AL11, to view or tranfert files.

Launch AL11 transaction :

AL11

Select a full line, then click on the Configure button.

AL11 Configure

Enter the directory path, the parameter name and the server name (or all). Click on Save button

« Older Entries