Hello colleagues,
If you are facing the task of updating test data with production data of SAP FC, I will try to help you solve it. Below you will find my experience.
Environment:
SAP Financial Consolidation 10.1 (production and test server)
Windows Server
SAP HANA 2.0
High-level steps:
- Determine a schema in SAP HANA which is used by a production data source
- Check the size of an exported schema in SAP HANA
- Multiply by two the size of the exported scheme, that's how much free space should be on the servers (production and test SAP HANA server)
- Stop the production data source
- Export the schema to FS of the production SAP HANA server
- Start the production data source
- Move the export from the production SAP HANA server to test (see step 3)
- Stop the test data source
- (Optional) Export the test schema to FS of the test SAP HANA server
- Import the export (step 7) to the test schema on the test server
- Check size of imported tables (CT_FACT_DATA)
- Start the test data source
- Connect to the test data source via SAP FC application as user with admin permissions
- Change production server names to test server name in Address book section, in General options -> External links, in General options -> Transfers
Some extra info about the steps:
- Open SAP FC administration console ( https://<server_name>/FCWebAdmin/Default.aspx?TimezoneOffset=120 ), click on a data source -> Configuration -> Find User ID in Database configuration string field
- SAP Note 1969700 -> Data -> Schemas , check the row Total under the schema name
- Increase or create temp directories in the production and test SAP HANA server
- Open SAP FC administration console, click on a data source -> click Data source options -> click Stop data source
EXPORT "<schema_name>"."*" AS BINARY INTO '<dir_for_export>' WITH THREADS 10 ,
You need to have permissions to export the schema or to log in as schema owner user.
If the export will stop with "Export aborted due to concurrent operations", please re-execute script again or set threads to 1.
- Open SAP FC administration console, click on a data source -> click Data source options -> click Start data source
scp -r <dir_export> <user>@<test_server>:<dir_target>
- Open SAP FC administration console, click on a data source -> click Data source options -> click Stop data source
- (Optional) see step 5
IMPORT "<prod_schema_name>"."*" FROM '<dir_target(see step 7)>' WITH REPLACE THREADS 4
You need to have permissions to import the schema or to log in as schema owner user.
If your target test schema has a different name:
IMPORT "<prod_schema_name> "."*" FROM '<dir_target(see step 7)>' WITH REPLACE THREADS 4 RENAME SCHEMA <prod_schema_name> TO <test_schema_name>
- See step 2 and compare the test schema after the import with the production schema
- Open SAP FC administration console, click on a data source -> click Data source options -> click Start data source
- Run Financial Consolidation application (Windows) and log in with admin permissions
- Change production server names to test server name in Address book section, in General options -> External links, in General options -> Transfers
Check /sapmnt/log size after import process (SAP HANA creates a lot of logs during these changes). Run manually SAP HANA log backup under <sid>adm user:
hdbcons
>log backup
Once the log backup process is complete (SYSTEMDB tenant -> Backup and Recovery -> Open Backup Console), run manually cleanup of old log files (SQL in <SID> tenant):
ALTER SYSTEM RECLAIM LOG
Release SAP HANA memory after all operations by running command under <sid>adm user:
hdbcons
>resman shrink
Run "Disk space allocation and fragmentation information" report (1969700) and check FRAG_PCT for indexservice, if the value more than 20, run defragmentation procedure (SQL in <SID> tenant):
ALTER SYSTEM RECLAIM DATAVOLUME '<host>:<port_indexserver>' 120 DEFRAGMENT
Useful links:
SAP Notes:
2033956 - How to create/copy a test environment from production? - FC
1969700 - SQL Statement Collection for SAP HANA
How to Export and Import the SAP HANA Schema
Creating a Data Source
EXPORT Statement (Data Import Export)
Import Schemas, Tables, and Other Catalog Objects