September 14, 2016

Deleting network profiles on Windows 10

The only way I found to delete network profiles from Windows is directly from the registry on path HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkList\Profiles:

September 6, 2016

Testing SFAPI credentials

Useful tool directly from SSFF to validate credentials:

September 5, 2016

Updating jobs owners, creators and step users in tables TBTCO and TBTCP

In many projects I have been requested at some stage to update all jobs to use the proper batch user, and in some particular cases the clients decided that they wanted the owner and creator of the job to be updated too.

I have designed below queries to accomplish such task directly on TBTCO and TBTCP tables:

May 12, 2016

SAP Java Applications - No connection to data source * available. All * pooled connections are in use and * connection requests are currently waiting

A client developing custom Java applications faced the following error while testing one of their apps:

[EXCEPTION] No connection to data source SAPSIDDB available. All 50 pooled connections are in use and 7 connection requests are currently waiting. The connection pool size might need to be adjusted.

April 4, 2016

List of important Transaction codes to create IDocs

Transaction code
WE30 Used to create the Basic Idoc type
WE20 For creating partner profile
WE81 To create message type
WE82 Used to associate the message type and the idoc type
WE21 To create the port
SM59 To give the name of the logical destination
WE41 To create Outbound Process Code
WE02 To check the status of IDOC
WE05 To check the status of IDOC
WE42 To create Inbound Process Code
BD51 To define the function module characteristics 


March 1, 2016

Scripts to check SQL connection strings

 Some powershell functions I wrote to test SQL Connection strings:

Describing a table in Microsoft SQL

If you would be using Oracle the easiest way to obtain the definition/description of a table is using the "descr [tablename]" SQL command.

However in microsoft such command does not exist, the most similar to Oracle's descr is the stored procedure sp_help, and you can call it as "sp_help [tablename]" or "exec sp_help [tablename]" while using Microsoft SQL Server Studio, and the output you should obtain will be similar to this:

February 5, 2016

SAP SUM does not launch due to java policy access denied errors

When running SUM application sometimes you could face the following error when trying to execute the application theough the browser:

Just click on details and you will find the most common problem is access denied due to java policy problems:

The solution consists in modifying the java.policy file located in C:\Program Files\Java\jre7\lib\security and/or the user profile folder by adding a line allowing the class that is getting denied:

Once you save the file just try to execute the JNLP again theough the browser and it should work.

January 25, 2016

The adventures of moving to windows 10: Cannot configure it to never sleep.

One of the firsts problems I faced with windows 10 was that no matter what power plan configuration I use it always goes to sleep after two minutes (even after changing the sleep timing to never).

The solution was quite easy, it was just modifying the registry as follows and then adjusting the new option that appears on the power plan.

December 1, 2015

OpenNebula in a server with two network interfaces. Organizing the traffic with iproute2

During the installation of OpenNebula in our sandbox server we decided that it would be proper to split the traffic between the two network interfaces, one for administration, and one for the VMs traffic to the physical network.

There are many ways of handling the traffic, but for our convenience we decided to use the iproute2 routes and rules.

Exporting a list with details of the volumes of a server/computer in xml format to replicate the volumes in other machine

We were doing a massive datacenter migration, and it included lots of databases (And the respective applications).
As the approach we used was migration the C drive using a migration tool, and then restoring the datafiles to the new servers, we had to create all the mountpoints manually. Doing the preparation of the mountpoints manually would be totally crazy (As we have more than 150 databases, and some of them have up to 40 datafiles), I created the following script that generates some XMLs, and a report with the necessary information and instructions to automate the preparation of the disks.

Make PowerGUI 3.0 work with CLRVersion 4.0*

To force PowerGUI to run for .NET v4.0 place a configuration file called ScriptEditor.exe.config in the installation directory with these contents: By default, PowerGUI is intended to be used with Microsoft PowerShell 2.0. To work with Microsoft PowerShell 3.0 for testing purposes, run the following command-lines for PowerGUI Administrative Console and PowerGUI Script Editor:
AdminConsole.exe –version 3.0 ScriptEditor.exe –version 3.0

More info:

Changing the default shell in Linux (More specifically, Debian)

It always happens to me that after I install a new server I create my non-root user and I cannot remember the command to change the default shell of my user.

So, just as a self reminder, the command to change the default shell is chsh -s


chsh -s /bin/bash
The second, and more aggressive option is to change the default shell for further user creations by changing the default config file. For this we have to modify the /etc/default/useradd file by changing the SHELL variable with the shell we want to be default, for example:
... SHELL=/bin/bash ...


Disabling SSH password authentication for a user

We decided that for our servers it would be a good idea to disable SSH password authentication for the root user and only permit PGP keys authentication, as we store the keys to login with the root user in a GnuK token in case of emergency.

The story is pretty short, it requires to simply create a match rule in the /etc/ssh/sshd_config file:

Match User root PasswordAuthentication no
There is always a second (And better option if you have many users using PGP keys as the authentication method), creating a rule for a group:
Match Group SSHNoPwdAuth PasswordAuthentication no

November 30, 2015

Problems with Java lincenses during system copy

When copying java SAP systems using the standard tools we had two issues with the old licenses stored on the system:

  1. Temp licence cannot be installed as the system was already provided with an installation number: