Skip to Content
Author's profile photo Florian Lamml

SAP MaxDB System Copy Script

Hello,

my name is Florian and I have been working in the SAP Basis since 2004. Due to my activity I have created some scripts which I would like to present here.

Most of the time I was a SAP Basis Consultant at various companies with different systems and databases.

The first step is my SAP MaxDB System Copy Script with which you can make a system copy of the SAP MaxDB under Linux/Unix via pipe as far as possible automatically (Create Pipe, Create Backup, Transfer Backup, Rename, Truncate, Export, Import etc.).

In addition, certain data can be exported beforehand and imported again after the copy.

Script on GitHub

Suggestions for improvement etc. are welcome

  • Automatic checks at the beginning

Automatic System Checks

  • Summary with different database versions

Summary with different DB version

  • Summary with stopped target database

Summary with offline target DB

  • Information at the end (in log file)

Finish in Logfile

Prerequisites

  • ssh communication between source and target without password (authorized_keys(2)) for both sidadm
    via “ssh-keygen -t rsa -b 2048” and “.ssh/authorized_keys2” (only source –> target)
    –> ssh sourceadm@sourcehost must work without password
    –> ssh targetadm@targethost must work without password
  • the target database is large enough (automatic check)
  • copy this script to the source host and set the execution right
  • XUSER DEFAULT for ABAP/JAVA DB user (SAP or SAPDB) must be available
  • if passwords from source and target are different, XUSER for copy can not be used
  • the source database must be in operational state ONLINE, the target database must be able to start in operational state ADMIN
  • adjust the configuration of source and target system in this script
  • best use with screen tool for Unix/Linux

Features

  • automatic function and prerequisites check
  • backup to 2 parallel PIPE
  • can use compressed and uncompressed backup (default uncompress)
  • root is not needed
  • copy status bar with size, transfered, left and speed (5 second update)
  • automatic size check
  • dd over ssh from source to target
  • ssh encryption default cipher is aes192-ctr
  • automatic rename database to target
  • automatic export of custom tables (incl. templates of the most common)
  • you can use a custom database user or XUSER for backup and restore

 

Maybe you can use the script in your landscape and save time. If you are interested, I can also present other scripts or other topics, especially about SAP MaxDB on AIX.

In the future I will do more and more with the HANA on SLES.

Assigned Tags

      Be the first to leave a comment
      You must be Logged on to comment or reply to a post.