[go: up one dir, main page]

DEV Community

Ashwin Sharma P
Ashwin Sharma P

Posted on • Originally published at Medium

SAP Basis snippets #6

saplikey command

To run saplikey command, switch to <sid>adm user.

su - <sid>adm
Enter fullscreen mode Exit fullscreen mode

The saplikey command follows the below syntax.

saplikey pf=<profile> [trace=<level>] <command>
Enter fullscreen mode Exit fullscreen mode

Here in <profile> we give our instance profile path.

The <command> parameter takes the below listed values.

-help => displays the usage text
-version => displays the version of the license key library
-get => displays system information along with hardware key
-number => fetches installation number
-install <filename> => Install permanent license keys from a file
-show => Display all installed license keys
-temp <product> => Creates a temporary license key for the given product
-delete <SID> <HW Key> <product> => deletes license keys

So, to get the hardware key of a system, use the get command as follows.

saplikey pf=<instance profile path> -get 
Enter fullscreen mode Exit fullscreen mode

To list out existing licenses (both valid and invalid) in a system, we use the show command. (NOTE: Here the hardware keys for which the licenses are generated would be displayed. So, the hardware key here and the one obtained from -get command will differ if the license is invalid).

saplikey pf=<instance profile path> -show
Enter fullscreen mode Exit fullscreen mode

Deleting an existing license is done as given below.

saplikey pf=<instance profile path> -delete <SID> <Hardware key> <Product mentioned in license key>
Enter fullscreen mode Exit fullscreen mode

To install a new license, we first login to SAP marketplace. Then go to license keys option. Then generate and download the required license.

Place the downloaded file in any path in the host (Here for example we placed it under /usr/sap/).

Then use saplikey install command.

saplikey pf=<profile> -install /usr/sap/license.txt
Enter fullscreen mode Exit fullscreen mode

Top comments (0)