Vous êtes sur la page 1sur 9

Command Line Driven Transporting Using the tp

Command
DECEMBER 3, 2009
WESLEY TOBLER
1 COMMENT
SAP BASIS, SAP CONSULTANTS BLOG
BASIS, BASIS/NETWEAVER, DATAXSTREAM, DXS, NETWEAVER, SAP, SAP
BASIS, STMS, TP, TRANSPORT, WESS TOBLER

STMS is a very powerful transaction in the BASIS world. The whole transport system in SAP is
paramount to its functionality. 99% of the time, you will use STMS for your transport
needs. What of that last 1%? Sometimes it becomes more efficient, or just safer, to have a little
more manual control.

It is possible to add transport requests to the buffer, and even import them via the CLI
(Command Line Interface). Keep in mind, whenever working on an instance at the OS level,
you should be logged in as [sid]adm.
To add transports to the buffer:
tp addtobuffer [transport number] [SID] Client=[client number]
pf=/usr/sap/trans/bin/TP_DOMAIN_[DOMAIN_SID].PFL
If I wanted to add transport number DV1K907046 to the buffer for Q01 client 400 and the
transport domain controller was DV1 the string would look like this:
tp addtobuffer DV1K907046 Q01 Client=400 pf=/usr/sap/trans/bin/TP_DOMAIN_DV1.PFL
To import transports via CLI:
tp pf=/usr/sap/trans/bin/TP_DOMAIN_[DOMAIN_SID].PFL import [transport number] [SID] U128 client=400
Since Ive added DV1K907046 to the buffer, I can now import it with this string:
tp pf=/usr/sap/trans/bin/TP_DOMAIN_DV1.PFL import DV1K907046 Q01 U128 client=400
It is also possible to create shell or batch scripts from these commands to do multiple transports
at one time. Ive found that this is when CLI tp management is most effective.
Using your favorite text editor, simply stack the commands ontop of each other:
tp addtobuffer DV1K907046 Q01 Client=400 pf=/usr/sap/trans/bin/TP_DOMAIN_DV1.PFL
tp addtobuffer DV1K907047 Q01 Client=400 pf=/usr/sap/trans/bin/TP_DOMAIN_DV1.PFL
tp addtobuffer DV1K907048 Q01 Client=400 pf=/usr/sap/trans/bin/TP_DOMAIN_DV1.PFL
....

Then save as either a .sh for Unix or .bat for Windows.


The batching approach works for both adding to the buffer and for actual import. Its best to
seperate each task (addtobuffer in one script, import in another).

Basis Tricks: How to Reset SAP Buffers


NOVEMBER 13, 2015
DAVID BEST
NO COMMENTS
BASIS TRICKS, SAP BASIS, SAP CONSULTANTS BLOG
BASIS, BASIS TRICKS
As an SAP Basis Administrator, you may occasionally wish to reset
SAP buffers in an ABAP Application Server to guarantee that data is
read from the database.

CAUTION: If you reset SAP buffers, there may be unintended consequences. It is very likely
that system performance will suffer, and worse problems may arise. These transactions should
only really be used if you are sure of what you are doing and are unable to restart the system to
solve the problem.

For example, resetting the number range buffer can lead to skipped document numbers. This
isnt a technical problem, but could lead to legal compliance issues.

To reset SAP buffers, enter the value of the appropriate transaction


code from the list below.

/$SYNC -- Resets the buffers of the application server


/$CUA -- Resets the CUA buffer of the application server
/$TAB -- Resets the TABLE buffers of the application server
/$NAM -- Resets the nametab buffer of the application server
/$DYN -- Resets the screen buffer of the application server
/$ESM -- Resets the Exp./ Imp. Shared Memory Buffer of the application server
/$PXA -- Resets the Program (PXA) Buffer of the application server.

It is also possible to reset the user buffer in transaction SU56 using menu path Authorization
Values -> Reset User Buffer

What are the TP commands & R3trans


commands
TP commands:

nge request>: The complete objects in the request from the source system will be transported.
This command also Used by SAP System when it releases a request.
tp r3e <change request>: R3trans export of one transport request.
tp sde <change request>: Application defined objects in one transport request can be
exported.
tp tst <change request><SAP system >: The test import for transport request can be done using
this command.
tp createinfo <change request>: This command creates a information file that is
automatically done during the export.
tp verse <request>: This command creates version creates versions of the objects in
the specified request.
tp showbuffer <sid>: Shows all the change requests ready to be imported to the target
system.
tp count <sid>: Using this command users can find out the number of requests
in the buffer waiting for import.

tp go <sid>: This command shows the environment variables needed for the
connection to the database
of the <sid> or target system.
s <sid>: All the values of modifiable tp parameters in the global parameter file. The default value is
shown for parameters that
Tp showbuffer<sID> : show all change requests ready to be imported to the target
system
Tp count<SID> number of requests in the buffer waiting for import
Tp importall<SID>: Imports all the request from buffer to the target system
Tp put<SID> imports all the request from buffer to the target system and locks
the system
tp sapstart <sid>: To start the R/3 system.
tp stopsap <sid>: To stop the R/3 system.
tp dbstart <sid>: To start the database.
tp dbstop <sid>: To stop the database
>: This command locks the system for all the users except SAP* and DDIC. The users that
have already logged on are not affected by the call.
tp unlocksys <sid>: This command unlocks the system for all the users.
tp lock_eu <sid>: This command sets the system change option to "system can
not be changed" tmporarily.
tp unlock_eu <sid>: This command unlocks the system for all the changes.
sid>: This command starts a complete backup using R3trans command. It uses
/usr/sap/trans/backup directory for the backup

R3trans commands:
R3trans -d : This command is used to check the database connection .
R3trans -u <int>: Unconditional mode can be used as we have seen in the above
example.
R3trans -v : This is used for verbose mode. It writes additional details to the log
file
R3trans -i <file>: This command directly imports data from data file without a
control file.
R3trans -l <file>: This provides output of a table of contents to the log file.
R3trans -n : This option provides a brief information about new features of
R3trans.
R3trans t: This option is used for the test mode. All modifications in the
database are rolled back
This command is used for a complete backup. we will see in the next paragraph how to use the
Control file for the backup.
R3trans bd: This command is used for a delta backup if the user does not want
a complete backup.
R3trans bi: This option will display backup information

Import SAP Transport Request at OS


Level
1. Make sure the transport request is released from the source system. Log onto the target
system as <SID>adm.

2. To add the transport request to the buffer (Single command line).

tp addtobuffer <TRANSPORT-REQUEST> <SID> Client=<CLIENT-NUMBER>

pf=/usr/sap/trans/bin/TP_DOMAIN_<DOMAIN_SID>.PFL

Example:

tp addtobuffer DEV12345 QAS Client=000

pf=/usr/sap/trans/bin/TP_DOMAIN_DEV.PFL
3. To import the transport request (Single command line).

tp pf=/usr/sap/trans/bin/TP_DOMAIN_<DOMAIN_SID>.PFL

import <TRANSPORT-REQUEST> <SID> U128 client=<CLIENT-NUMBER>

Example:

tp pf=/usr/sap/trans/bin/TP_DOMAIN_DEV.PFL

import DEV12345 QAS U128 client=000

What are the most important OS level


Commands in sap? Sap Os level
commands
dpmon d Dispatcher queue monitor

Sapdba (up to SAP R/3 -4.7)/ brtools database administration

PS Running work process

ps -eaf|grep dw process overview

ps -eaf|grep ora check oracle service is running

Ps eaf | grep dw kill -9 Kill work process

msmon pf=profile path name=sid to check the message server status

gwmon pf=profile path nr=num to check the gateway status

Ps eaf | grep lsnrctl Listener status

Rslgview pf =-r ft | pg System logs

Disp + work v to check the version of r3 kernel

R3trans d ,tnsping Checking the connection with database

Df k File system monitor

Du k Display all directories and size of current directory

Svrmgrl SQL prompt and database connection


Connect internal//(old versions)
--------------------------------------------- -------------------------------------------------
Sqlplus SQL prompt and database connection
/as sysdba (new versions)

Saplicence -get to get hardware key

saplicense -install to install license

sappfpar all pf=profile path display all profile parameters

sappfpar check path=profile path checks the required space for memory

memlimits to check the available space for heap and swap


memory

telnet Remote system login

telnet to check the remote sap system is up and running


<ipaddress><dispatcherportnum>

ftp file transfer protocol

rcp remote copy of files

Start/stop sap Start / stop Sap instance

ping check destination host reachable

niping check connection between server and a client by


transferring packets

systeminfo check the configuration of system

Ps -aef Processes status

lsps -a Swap space

topas Memory

Swap Space Bottleneck During SAP


Operation
Symptom

Diverse error messages that refer to memory bottlenecks, or, more precisely, a swap space bottleneck.
For example, System Panic; cmemreserve: reservation overrun; ENOMEM, Not enough core; ENOSPC,
No space left on device; SIGDANGER (under AIX only). In the SAP System, the SAP system log
message "no memory of class perm" is output.
This problem can occur with SAP processes and external processes as well. The relevant process cannot
allocate anymore heap memory. This can lead to the database operation being ended or SAP work
processes being stopped.
Error messages in the SAP System appear in the developer trace files dev_disp, dev_w<n> in the
system log and in dumps. The following messages may
appear: TSV_TNEW_;._NO_ROLL_MEMORY; NO_MEM; NO_MEMORY; RESIZE_EM_ALLOC_ERROR, Storag
e class PERM. This problem mostly occurs if background jobs are active with large amounts of
data. Possible Causes

There is no more swap space available

The highest value for one of the SAP profile parameters that limit the swap space usage has been
exceeded. In this case, the following parameters are
relevant:abap/heap_area_dia, abap/heap_area_nondia and abap/heap_area_total.

The operating system limits for the process size (segment size) have been exceeded. For example, no
more that 256 MB can be assigned under AIX and no more than 384 under SINIX.Corrective
action Increase the swap space or decrease the SAP Extended Memory. If the swap space already
corresponds to the SAP recommendations, 1.5 to 2 GB may still be required. There should always be
several hundred MB of free swap space available. You can reduce the maximum swap space need of the
SAP System by reducing the value of parameterabap_heap_area_total. You can also distribute the load
onto several application servers and increase the roll area. Check if the maximum process size (operating
system parameters) is sufficient.

CCMS Monitoring Authorizations


A SAP user requires certain privileges to read CCMS metrics. When defining a SAP CCMS monitor in
SiteScope you must specify a user who has XMI autorization to be able to login to the CCMS server and
retrieve metrics. Authorizations are collected in SAP profiles, and the following profiles include XMI
authorization:
S_A.SYSTEM
PD_CHICAGO
S_WF_RWTEST
SAP_ALL
Again, when defining a SAP CCMS monitor in SiteScope you must specify a user who has one or more of
these profiles assigned to it. One way to test if a user has such authorization is to try and issue
transaction RZ20 in the SAP GUI and see if the CCMS monitor sets can be displayed.

Transport Guide :: Tips for Different


SAP Objects
Question: How can I transport certain SAP objects?

Here are tips for different objects:

LSMW: There are 2 ways for transporting LSMW data from a system to another.
1. 1. Export/import this method gives you the opportunity to select the subprojects or objects you want to transfer.
LSMW -> Extras -> Export project

2. 2. Transport request with this method, you can transport a LSMW project in full (you can not select the objects you
want). With this method, the project will be transported as any other SAP object in a transport order. LSMW -> Extras ->
Create change request

Program variants

If you have several program variants in a development system that you want to transport, use the
following method to transport them:
Execute program 'RSTRANSP' (via se38) and inform the program and/or variant names (you can
transport variant of several programs in one shot).

Layout In some transactions, one can save layout of the screen (sort, filter, ... criteria).

These layouts can be transported: In the required transaction, when your layouts have been saved, go to
Settings -> Layout -> Layout Management. Select the desired layouts and go to Layout -> Transport...
There you can add your layouts in existing TO or create a new one.

Database data

In some unusual cases, you might have to transport data of a SAP table.
Go to transaction SE16, select your entries and go to Table entry -> Transport entries. It's only possible
for some tables...
If you cannot do it that way,you have to create a Workbench transport order with transaction SE10.
When created, click on it, go in menu Request/task -> Object list -> Display object list.

Go in modification mode and add a new line with:

PgmID = R3TR
Obj = TABU
Object name = Name of your table

Double-click on the created line and, depending on your need, put '*' in the key field or double-click on it
and select the key you need to transport.

Queries

Queries, datasets and user groups can be exported/imported between the systems using the
Program RSAQR3TR.

Report template (ALV variants)

There is a button or somewhere in the menu Change/Select/Save/Manage Layout.


Go to Manage Layout, than Layout menu/ Transport.

SAPSCRIPT Files Transport

Use the program RSTXSCRP to upload and Download the SAPSCRIPT files to different systems

Transport SAPSCRIPT

Use the Program RSWBO052 to create the Transport Request for a SAPSCRIPT, In the Selection screen of
the program, give R3TR - FORM - Give the Form name and press Execute button, it will ask the
Development Class and the transport Request No.
Standard texts

Standard texts used in SAPScript(created with transaction SO10) can be included in transport orders. You
have to create a Workbench transport order with transaction SE10. When created, click on it, go in menu
Request/task -> Object list -> Display object list. Go in modification mode and add a new line with:

PgmID = R3TR
Obj = TEXT
Object name = TEXT,,ST,

Example :
R3TR / TEXT / TEXT,YMM_MEDRUCK_MAIN_16_EC,ST,F

Vous aimerez peut-être aussi