Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

New_Client_Copy_Tool_1735966670

Download as pdf or txt
Download as pdf or txt
You are on page 1of 15

New Client Copy Tool

Overview

With SAP_BASIS 7.54 (SAP S/4HANA 1909), SAP delivers new client management tools based on new
common architecture. They are a complete redesign of the previous client copy (transac ons SCCL,
SCC9, SCC5, ...). The new tools replace the old client copy and also offer new func ons. They are
op mized for increased performance, process automa on and stability. The log of the client copy has
also been completely revised and is now much more meaningful and easier to read, so that
troubleshoo ng is much easier.

There are also new tools to compare clients and to determine the size of clients. With SAP_BASIS
7.55, the client export and client import have been expanded to include the op on of expor ng /
impor ng so-called "snapshots".

In this blog I'll will introduce you to the following tools:

 New Local Client Copy

 New Remote Client Copy

 New Client Export and Import using Transports or Snapshots

 New Client Size Es ma on Tool

 New Client Comparison

Why a new Client Copy Tool?

The client copy tool was originally developed in the 1990s. Since then, it has been further developed
and maintained, but more and more fundamental problems came to light, especially with regard to
new cloud processes, which required a new solu on.

Therefore, at the end of 2017, the development of a new client copy tool began. With SAP_BASIS
7.54 (S/4HANA 1909), the new tool was delivered to customers for the first me in 2019. With
SAP_BASIS 7.55 (S/4HANA 2020) the client export and the client import were also converted to the
new architecture. With SAP_BASIS 7.55 Service Pack 1, transac on SCC1 is finally moved to the new
architecture.

Compared to the old Client Copy Tool, the number of code statements went from over 25,000 to less
than half with a significantly expanded range of func ons such as the comparison tool. The new
Client Copy Tool today has a unit test code coverage of over 94% over the en re coding.

Improvements

The new tool solves conceptual problems of the old client copy and is characterized by increased
stability compared to its predecessor.
Execu on from a third Client. It is no longer necessary to start the client copy in the target client.
Instead, this can now be started in a neutral third client (usually client 000). This increases efficiency
and ensures that no users romp around in the target client during the client copy. The use of the user
SAP * and restart of the applica on server to enable the user is no longer necessary.

Execu on from Third Client

HANA Op miza on. The new tool is op mized for use with HANA. Our tests showed that the new
Local Client Copy is about 10x faster than the old tool. The new Remote Copy was up to 5 mes
faster than the old tool in our tests. Instead of first loading the data onto the applica on server for a
local copy, the data remains on the database during a local client copy by using an INSERT FROM
SELECT statement.

INSERT (Target Client) FROM SELECT (Source Client)


Client Copy Op mizer. The new Client Copy Tool has implemented an op mizer for empty and
unchanged tables. At the beginning of each client copy, the tool reads the HANA database sta s cs.
It then checks whether a table in the database is completely empty in all clients. If this is the case,
this table can be skipped in the delete and copy phase. The op mizer also checks whether a table
has been changed since the last client copy on the database. If a table has not changed since the last
client copy and the last client copy had the same source and target clients, this table can also be
excluded from the delete and copy phase. This op miza on is par cularly useful for regular copies of
test clients or in the event of an aborted client copy.

Handling of very large tables. In order to be able to deal with very large database tables, the Client
Copy was enhanced to include a spli er algorithm. This splits very large database tables by
genera ng WHERE condi ons, which can then be copied by different processes in parallel. This
ensures that the alloca on limit in HANA and ABAP is not exceeded during the copy process.
Furthermore, this algorithm increases the performance, since very large tables can be copied by
several processes at the same me.

Table Spli ng Algorithm generates WHERE-Condi ons for Parallel Processing

Class-based Exit Framework. Exits are now based on class interfaces and now run in an isolated
environment. By using interfaces, there is now a clear interface between the Client Copy Tool and the
exits. Running in an isolated environment ensures that a broken exit cannot crash the en re Client
Copy Tool. With SAP_BASIS 756 exits are executed in parallel processes.

Old exits are s ll supported and executed via a wrapper exit. If you have an old exit, please contact
SAP to receive support in implemen ng the new exit framework. You can find more informa on
about exits in the client copy sec on.

Renovated Log. Finally, the client copy log (transac on SCC3) was completely revised and replaced
by a clearer solu on. The logs are shown in tabs. In addi on to the well-known "Client View", there is
now a "Timeline View" and a view for each copy mode (local copy, remote copy, etc.). Different
columns show the exit status, the table copy status and a general message status. This makes it
possible to assess the success of a client copy at a glance. With SAP_BASIS 756, SCC3 supports the
display of the client size based on the data collected by the Client Size Es ma on Tool and the Client
Copy Tool.

New Client Copy Log Transac on (SCC3)

Tasklist Support. All of the new copy processes presented here now offer execu on via task lists. The
task lists can either be started from the corresponding transac on or directly using transac on
STC01.

Client Tools

SAP delivers various client tools:

 Local Client Copy for a copy within the same system

 Remote Client Copy for a copy from another system to the local system

 Client Dele on for the dele on of a client

 Client Export and Client Import for the export and import of clients in transport requests or
client snapshots (new feature)

 Copy from Transports (SCC1N) for copying Customizing Objects within the same system.

Client Copy

There are two types of client copies:


 Local Client Copy
The local client copy takes place within a system. The local client copy is started via
transac on SCCLN.

 Remote Client Copy


The remote client copy copies data from an external system to another client in the target
system using RFC. The process is always started from the target system. The remote client
copy is started via transac on SCC9N.

Differences between Local and Remote Client Copy

The process flow of the local and remote client copy is basically the same. However, there are some
special features to consider with the remote copy that do not occur with a local copy:

 O en the DDIC table defini ons differ between the source and target systems due to
different releases. Before each remote copy, the Client Copy Tool compares the DDIC table
defini ons and rules out incompa ble tables. A table is e.g. incompa ble if a field in the
target system that is available in the source system is missing or has a shorter data type.

 While exits run in the analysis phase of a local copy in the target system and target client, the
same phase is executed in the source client for a remote copy in the source system.

Client Copy Phases


The new client copy runs in four phases:

1. Ini aliza on Phase


In the first phase the tool ini alizes the list of all relevant tables, the client lock objects, the
exit handler and many other smaller objects.

2. Analysis Phase
In the second phase, all client copy exits are executed. Exits can exclude certain tables from
the copy, request emptying or even explicitly include tables into the list of tables to be
copied.
A er all exits finished, the finalized list of tables to be deleted and copied is saved in the
database. If the op on to split tables is ac vated, very large database tables are analyzed for
processing in parallel processes and broken down into smaller work packages.

3. Delete and Copy Phase


The actual dele on and copying process takes place in this phase. First, all tables in the
target client are deleted. The data is then copied from the source client to the target client.
A er all tables have been finished the source client gets unlocked.

4. Post Processing Phase


Finally, the postprocessing exits run. Typically, these convert data or generate objects that
are dependent on the data.

New Features
The New Client Copy has the following new features:

 Split Large Tables


 Copy Individual Tables

 Op ons to tolerate failed Exits and Tables

 Simultaneous execu on of several client copies in the same system (from SAP_BASIS 756)

For more details please check sec on "Processing Op ons" in this blog.

Client Dele on
The new client dele on is started via transac on SCC5N. It has the same phases as the client copy.
The client can be deleted directly from the client list (accessible via transac on SCC4) using the
"Delete from System Table T000" se ng. In contrast to the old client dele on, the transac on must
be started from another client and no longer from the client to be deleted.

Client Export and Import


The client export and client import process have also been completely revised. The basic idea of this
process is to freeze a client on an "external" data carrier so that it can then be imported into another
or several target systems. Exports enable a client to be frozen at a specific point in me.

The old Client Copy Tool previously only allowed exports using transport requests. With SAP_BASIS
755 there is now a further op on for expor ng to "Client Table Snapshots". These are saved in the
database of the expor ng system and can be imported into the import system via an RFC connec on.
Compared to transport requests, the snapshots offer increased performance and greater flexibility in
usability. The list of all snapshots can be viewed in transac on SCC3.

Please note: Exports that were carried out with the old tool are not compa ble with the new tool
and vice versa.

Copy Data from Transports


The transac on SCC1 was revised as the last client tool. The new transac on is released for
customers from 2020 SP01.

Please note that the transac on was already delivered with SP00 but is not yet func onal.

With the help of SCC1N it is possible to copy customizing objects recorded in transport requests to
several target clients. This can be a local transport request or an imported transport request from
another system.

In contrast to transac on SCC1, SCC1N can be executed in any client. The log has been completely
revised analogous to the client copy log. Based on the feedback from internal customers, addi onal
selec on parameters were added.

Transac on SCC1N is a further development of the old transac on SCC1 and the old report
RSCC_SCC1_BATCH. As a result, compared to the old SCC1, a large number of new parameters are
available. If you want to copy transport requests that have not been released with SCC1N as in SCC1,
proceed as follows:

 In the "Export / Import Time of the Transport Request" group, select the "Local Import /
Update Date" radio bu on.
 If it is a mandatory field, enter a date that is far in the past in the "Export / Import Date"
field.You can find further informa on about SCC1N in my SCC1N blog post.

Comparison Tool
A new product is delivered with the comparison tool. It allows the comparison of clients, client table
snapshots or client templates in any combina on. The Comparison Tool can be used to compare
customizing or en re clients. The comparison tool is started using transac on SCC_COMPARE.

Comparison Modes
The Comparison Tool offers three comparison modes:

 Checksum Comparison. In this mode, the comparison tool selects the data of both
comparison objects, creates a checksum and finally compares the checksums. In the case of
different checksums, differences were found between the two objects. The checksum
comparison is the fastest method for comparing two objects, but it does not offer any
possibility to compare the data.

 Detailed Comparison. In this mode the comparison tool selects the data of both comparison
objects and compares them line by line. The data records are divided into the following
categories:

1. Data that only exist in comparison object 1,

2. Data that only exist in comparison object 2,

3. Data with an iden cal key but different non-key field values and

4. Data records that are completely iden cal.

 Store as Template Container. Like the Detailed Comparison. However, the comparison result
is saved in a template container.

Note: Please note that the Comparison Tool is not designed to compare very large database tables
and drill down into these tables. We only recommend a checksum comparison for these tables.

Data sources
The Comparison Tool offers the selec on of several data sources for selec ng the tables to be
compared:

 Profile. Please note that SAP does not deliver a comparison tool.

 Individual table list. You can compare any tables with one another. With a remote
comparison, even client-independent tables can be compared with one another.

 Run Id. Tables from a previously executed client copy.

Comparison Results

A er a successful comparison run, you can view the result on the next screen or on tab
"Comparison" of transac on SCC3. You can see the result of the comparison on the "Compared
Tables" tab. By double-clicking on the table name, you can drill down to the compared data and
check the differences in detail.

Comparison Run Result

Client Size Es ma on

The Client Size Es ma on Tool allows you to es mate the size of individual tables or an en re client.
The tool calculates the client's disk size using the following formula:

Table Size = Table Disk Size on the database / Total Number of table rows * Number of rows in the
examined client

The actual data in the client is not considered here. HANA internal compression is not considered
here as well. In the case of tables with fields of dynamic length, the algorithm can therefore only
offer an orienta on value.

The Client Size Es ma on Tool is started using transac on SCC_CLIENT_SIZE.


Client Size Es ma on Tool

As of SAP_BASIS 756, the Client Size Es ma on Tool runs automa cally with every client copy. The
size of all clients can then be checked in transac on SCC3.

Client Copy Log

The protocol transac on SCC3 was completely renovated. The transac on is now completely tab-
based. Logs are now stored in the database instead of the file system.

Overview Screen

While a client copy is running you will always find a summary of the current status of the client copy
on the first tab. This shows you informa on about the current running process, the source and target
clients and the progress of dele on and copying.

First Tab showing Ac ve Process while Client Copy is running

Otherwise you will find an overview of all clients in the system on the first tab. With a double click
you can select a client in order to have a closer look at all processes carried out in this client. With
this click you will automa cally be directed to the second tab.
SCC3 Overview Screen

The so-called "Timeline View" is new. On this tab you can see all the processes carried out by the tool
in descending chronological order.

This is followed by several tabs with detailed views for the local client copy, the remote client copy,
client dele ons, client export, client import, transport request copies, client comparison and finally
the client table snapshots and client template containers.

Detailed Log

A double click takes you from the overview list to the detailed view of a log. On the first tab "Log
Header" you can see a general overview of the current mode, the selected profile, the clients
concerned, the exit status and the process status.
Processed Tables of a Client Copy
Here is an overview of the most important tabs:

 Log Header. Overview of the current mode, the selected profile, the clients concerned, the
exit status and the process status.

 Op ons. List of the se ngs made on the selec on screen.

 Table sta s cs. Overview of the number of emp ed and copied tables and the number of
deleted and copied data records. In addi on, you can see the number of skipped tables on
the tab because they were either empty on the database or were already copied from a
previous client copy.

 General Messages. General messages returned by the Client Copy Tool.

 Exit Messages. Messages issued by exits.

 Processed tables. Overview of all tables processed by the Client Copy Tool. The current
progress of the copying process during a client copy can also be tracked on this tab.

 Included/Excluded Tables. List of all tables integrated or excluded by the Client Copy Tool or
by exits. If a table was copied or not copied, you can find out the reason here. In the case of
remote copies, you will also see all tables on this tab that cannot be copied due to
incompa ble DDIC structures.

 Disk Space. Es ma on of the deleted and copied data volume (see also under Client Size
Es ma on Tool).

 Run me. Exact lis ng of the run me of the individual client copy phases. This tab is
par cularly useful for performance analysis.

 Exit Execu on. List of all executed exit methods. Each exit returns a status of its successful
execu on. The run me of each exit is logged on this tab.

 Exit Defini on. List of exit defini ons as they were valid at the me the process was
executed.

 Segmenter. List of tables examined by the segmenter for their division into intervals. The tab
provides more informa on about the run me of the segmenter and the number of intervals
generated.

 Packages. Tables are always processed in blocks in packets. At the end of the processing of a
packet, a COMMIT WORK takes place. Depending on the size of the tables in a package, it can
contain between one and a thousand tables. Packages are the basis of paralleliza on
because a package of tables is always locked and processed by a parallel process. On this tab
you can see the list of all packages and their current processing status.

Log Administra on

The transac on SCC3_ADMIN was published with SAP_BASIS 755 SP01. In contrast to SCC3,
SCC3_ADMIN offers further func ons for dele ng logs, snapshots and containers.

Dele on of old Logs


Especially in systems with many recurring client copies, I recommend regular cleaning up of the log
tables, as the log tables can become very large.

Since several data records are wri en to the database for each table copied by the Client Copy Tool,
we recommend dele ng old logs that are no longer required at regular intervals. With SAP_BASIS
755, transac on SCC3 has been expanded to include a delete func on for client copy logs. For this
purpose, a delete bu on has been integrated into the table on the "Timeline View" tab.

With release SAP_BASIS 755 Service Pack 1, this func on is moved to transac on SCC3_ADMIN. This
ensures that transac on SCC3 remains a read-only transac on.

Using the Log Cleanup Tool is more convenient than dele ng individual logs. This can be called up in
SCC3_ADMIN via the menu item "Goto" -> "Log Cleanup". The tool enables the dele on of logs older
than <n> days, whereby a minimum number of the last logs can be kept per client. The Log Cleanup
Tool can also be started from the SAP_CLIENT_LOG_CLEANUP task list.

Dele on of Snapshots/Container

Snaphots and containers can be deleted on the "Client Table Snapshot" or "Client Template
Container" tab using the corresponding toolbar bu on. There is also the
SAP_CLIENT_CONTAINER_DELETE task list for the regular dele on of old objects. This can be started
using transac on STC01.

Client Table Snapshots

With SAP_BASIS 755, SAP delivers client table snapshots and client template containers for the first
me. Client table snapshots are local objects that are stored in tables of delivery class "L" (temporary
data).

What are snapshots?

Snapshots are based on the Remote Client Copy table copying algorithm and allow any database
table to be backed up. A snapshot can have any name and store any number of tables. The data of
each individual table is stored as a serialized RAWSTRING in several database tables.

With the help of a checksum on the serialized data, the data of each table is stored centrally once
across all snapshots. With a regular backup of an en re client, only the delta between two backups
would take up addi onal storage space, since an iden cal checksum would only save the same data
once under the same key (checksum) with two or more snapshots.

Usage

Snapshots are especially relevant for client export and client import. You can export an en re client
or individual database tables to a snapshot using the Client Export Tool (SCC8N). Un l now, the Client
Export Tool could only export into Transport Requests.

In contrast to the transport request, snapshots have several advantages. This makes them easier to
use because they are stored in the system's database and not in the applica on server's file system.
Containers can be imported into other systems via an RFC connec on (similar to Remote Client
Copy). Containers are saved with op mized storage space. In addi on, crea ng and impor ng a
snapshot takes less than half the me than using transport requests.

This makes containers par cularly suitable as an alterna ve to client export and import with
transport requests and for freezing test clients that can be restored over and over again.

With the help of the comparison tool it is possible to compare the data of a snapshot with the
current data in the client.

Processing Op ons

The Client Copy Tools come with mul ple processing op ons:

 Test Mode. The program logic of the client copy is completely performed, without wri ng or
dele ng in the database, so the behavior of a client copy is simulated. A complete log is
created (display with transac on SCC3).

 Lock Source Client. Locks the Source Client while performing a Client Copy.
In case this op on is enabled the client copy tool locks the source client for users. Users s ll
logged on will not be thrown out of the client but logon to the client is no longer possible. To
ensure data consistency we strongly recommend to keep this op on always enabled.

 Tolerate Failed Exits. Ignore failed Client Copy Applica on Exits while performing a client
copy.
In case this op on is enabled failed exits will not cancel the client copy process.

 Tolerate Failed Tables. Ignores Table Dele on-/Copy Errors.


In case this op on is enabled failed table dele on-/copy-opera ons will not cancel the client
copy process. All other tables will be processed.

 Use Exclusive Locks. Use of exclusive database table locks.


In case this op on is enabled the client copy tool sets an exclusive lock on each table being
copied. This reduces the memory footprint in the database and speeds up the database
opera on. As long as the table is locked exclusively any other tool cannot update the
database table. Therefore, we recommend disabling this op on in case the system is s ll
used by other users while performing the client copy.

 Split Large Tables. Split Large Tables while performing a client copy.
In case this op on is enabled the client copy splits up large tables into smaller units for
performing the copy-opera on in parallel processes. This avoids that the database runs out
of memory and enables the client copy tool to perform copy-opera ons in parallel processes.
It is recommended to enable this op on by default.
 This op on is permanently ac vated as of SAP_BASIS 756 and is therefore no longer available
on the selec on screen.

 Copy Incompa ble Tables (RFC). Copies tables from remote systems, even if their structure
is not iden cal.
Tables having different structures will be copied even in case of data loss. This applies for
example for tables in case at least one column is only available in the source system but not
in the target system. All incompa ble Tables which will be copied anyhow are documented in
the client copy protocol.

 If this op on is disabled: Below is the rule list for a table to be marked


"INCOMPATIBLE" by the client copy tool.

 The table must be present in both source and target system.

 If the table exists in both systems, then the key fields should be the same.

 The field list in both systems should be the same, however the posi on of
the fields can be different.

 The data type of all the fields must be the same.

 The length of the fields must not be shorter in the target system. It can be
greater or same length.

o If this op on is enabled: The tables not falling in the below rule list will be marked
"INCOMPATIBLE" and will be skipped/excluded from copy.

 The table must be present in both source and target system.

 If the table exists in both systems, then the key fields should be the same.

 The field list can differ. That is, missing fields are ignored, and matching field
data will be copied

 The data type of the matching fields must be the same

 The length of the fields must not be shorter in the target system. It can be
greater or same length.

 Automated Import Postprocessing. Executes the import post-processing (transac on SCC7N)


automa cally immediately a er an exported client got imported. If ac vated, you no longer
need to manually call transac on SCC7N a er impor ng an exported client. This op on is
only available for Client Export to a Transport Request.

 Release Transport Requests on Client Export. Releases the transport requests at the end of
the export process. The exported Transport Requests will be released immediately as part of
the client export process.This op on is only available for Client Export to a Transport
Request.

 Use Mode Vector/All Languages. Use Export Op on LSM-Mode = Vector and export all
languages on transport release.This op on is only available for Client Export to a Transport
Request.

You might also like