Wednesday, September 24, 2014

How to use SAPCAR tool

Most of SAP installation files are delivered in compressed form. The files are compressed in order to make them smaller and therefore better stored on installation media in so called archive. In particular SAP is using their tool to do compression related stuff. The toll is called SAPCAR (formerly CAR). It works with files of extensions like *.CAR or *.SAR. Basically the tool is very similar to gzip tool very known from Linux/Unix like OS. Location of the tool on OS WINDOWS is usually in folder: x:\usr\sap\\DVEBMGS00\exe.

Lately I had to use this tool quite often so I thought I prepare for myself short guide with most used parameters of SAPCAR as an reference for me.

1. Information about SAPCAR and environment:
sapcar h

It shows basic information on SAP kernel release, compilation info, supported SAP environment and OS information.

2. Extracting files from archive:
sapcar –xvf archive –R directory

e.g. sapcar -xvf "c:\tmp\SAPCRYPTOLIB_36-10010888.SAR"
Extracts archive into current folder of SAPCAR

3. List of files contained in archive:
sapcar –tvsf archive

e.g. sapcar -tvsf "c:\tmp\SAPCRYPTOLIB_36-10010888.SAR"

4. Verify the archive:
sapcar –dvf archive

To test of the archive is consistent.

5. Create new archive:
sapcar –c archive file1 file2 ..

e.g. sapcar -cf c:\tmp\myarchive.sar c:\tmp\RADDBDIF.NSP

6. Append files to existing archive:
sapcar –avf archive file1 file2 ..

e.g. sapcar –avf c:\tmp\myarchive.sar c:\tmp\sapcpp47.dll

No comments: