AMOS 22.12 Installation Guide
AMOS 22.12 Installation Guide
Version: 22.12
Date: 01.12.2022
© 2022 Swiss Aviation Software Ltd.
1. AMOS Installation Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.1 Installation Guide Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.2 Preparation of the Operation System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.2.1 Preparing Linux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.2.1.1 Application Server Preparation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.2.1.2 SAP ASE Database Server Preparation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.2.1.3 PostgreSQL Database Server Preparation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
1.2.2 Preparing Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
1.2.2.1 Application Server Preparation (Windows) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
1.2.2.2 SAP ASE Database Server Preparation (Windows) . . . . . . . . . . . . . . . . . . . . . . . 21
1.2.2.3 PostgreSQL Database Server Preparation (Windows) . . . . . . . . . . . . . . . . . . . . . 23
1.3 Database Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
1.3.1 Installing SAP ASE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
1.3.1.1 ASE Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
1.3.1.2 ASE Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
1.3.1.3 ASE Backup & Recovery for Linux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
1.3.1.4 ASE Backup & Recovery for Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
1.3.2 Installing Oracle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
1.3.2.1 Oracle DBMS Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
1.3.3 Installing PostgreSQL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
1.3.3.1 PostgreSQL Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
1.3.3.2 PostgreSQL Backup & Recovery Scripts for Linux . . . . . . . . . . . . . . . . . . . . . . . . 80
1.3.3.3 PostgreSQL Backup & Recovery Scripts for Windows . . . . . . . . . . . . . . . . . . . . . 92
1.4 AMOS Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
1.4.1 AMOS Server Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
1.4.1.1 AMOS Config Server tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
1.4.1.1.1 AMOS Server Installation with Oracle on Linux . . . . . . . . . . . . . . . . . . . . . . 108
1.4.1.1.2 AMOS Server Installation with Oracle on Windows . . . . . . . . . . . . . . . . . . . 121
1.4.1.1.3 AMOS Server Installation with PostgreSQL on Linux . . . . . . . . . . . . . . . . . . 134
1.4.1.1.4 AMOS Server Installation with PostgreSQL on Windows . . . . . . . . . . . . . . . 136
1.4.1.1.5 AMOS Server Installation with SAP ASE on Linux . . . . . . . . . . . . . . . . . . . . 138
1.4.1.1.6 AMOS Server Installation with SAP ASE on Windows . . . . . . . . . . . . . . . . . 140
1.4.1.2 AMOS Server start . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
1.4.2 AMOS Client Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
1.4.3 Basic AMOS Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
1.4.4 System Integration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
1.4.4.1 Linux boot scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154
1.4.4.2 Microsoft Windows Integration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
1.4.4.2.1 Installing the AMOS Windows Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
1.4.4.2.2 Maintaining the AMOS Windows Service . . . . . . . . . . . . . . . . . . . . . . . . . . . 165
1.5 Document Information Installation Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
3/167
SWISS-AS.COM
4/167
New pg_restore script parameters: PostgreSQL Backup & Recovery Scripts for Linux
SYNC_WEBDRIVE_EXCLUDE_FILE (only Linux) PostgreSQL Backup & Recovery Scripts for Windows
IGNORE_INDEX_TABLESPACE
Overview
This document contains information on how to install a new AMOS environment and how to perform the basic
configuration. This includes the operating system preparation, the installation and configuration of a database
server and the installation of the application server and client. The following picture illustrates a typical productive
AMOS installation.
System Requirements
SWISS-AS.COM
5/167
Please refer to the AMOS Software Version & Hardware Guidelines (PDF) for details regarding the currently
supported platforms. The support of server platforms is mainly driven by the availability of Sybase, Oracle or
PostgreSQL for a particular operating system.
SWISS-AS.COM
6/167
SWISS-AS.COM
7/167
Preparing Linux
Please take the following considerations into account when preparing the guest operating system:
the instructions regarding the database server preparation described hereafter are only valid for servers that
run SAP ASE (formerly know as Sybase ASE) and PostgreSQL.
if the application and the database server run on the same host, the system needs to meet both
requirements.
if multiple servers are used, the user/group names and IDs should be the same on all host.
requirements of additional interfaces (e.g. flightlog / financial interfaces) are not included.
SWISS-AS.COM
8/167
for multiple AMOS servers running on the same host, the corresponding parameters have to be cumulated
systems used for release change tests should have similar setup as the production in order to provide
comparable performance
we recommend to keep the free space on applic drive always greater than twice the java memory allocated
to AMOS. This is to avoid the drive to be full in case of a Java heap dump creation.
AMOS uses /tmp as default temporary folder on Linux, it is recommended to allocate enough space on that
folder accordingly depending on the AMOS usage. Having a separate mount point should be considered.
Type XS S M L XL XXL
Hardware Requirements
Memory 6 GB 8 GB 10 GB 10 GB 18 GB 24 GB
/webdrive (Linux) or E:\webdrive (Windows) 100 GB 100 GB 300 GB 300 GB 500 GB 500 GB
user amos amos The user that runs the application server
SWISS-AS.COM
9/167
Networking
The following list shows all relevant network parameters:
Miscellany
The following Linux settings need to be configured additionally:
timezone UTC
disable SELinux
RedHat: register in RHN
install package fontconfig.x86_64
install package p7zip.x86_64
install package at.x86_64
install cups to make server printers available from AMOS
configure open files in /etc/security/limits.conf (ulimit -n) to 65536 for user amos
amos soft nofile 65536
amos hard nofile 65536
configure number of user processes in /etc/security/limits.conf (ulimit -u)to 4096 for user am
os
SWISS-AS.COM
10/167
kernel. 0
randomize_va
_space
vm. ['max memory' in MB] / Huge page memory used by the database server, see
nr_hugepages [Hugepages size in MB] + 5 below for more information
fs.aio-max-nr (disk i/o structures + max async i Total number of system-wide reservable I/O descriptors.
/os per engine) * max online The relation to ASE parameters is as follows:
engines
fs.aio-max-nr=(disk i/o structures + max
async i/os per engine) * max online engines
Linux default 1048576
net.ipv4. 60
tcp_keepalive
_intvl TCP Keepalive settings to avoid database connection to
be closed unexpectedly
net.ipv4. 5
tcp_keepalive
_probes
net.ipv4. 60
tcp_keepalive
_time
SWISS-AS.COM
11/167
user sybase amos sybase The user that runs the database server
and backup scripts
If multiple servers are used, the user/group names and IDs should be the same on all host.
Networking
The following list shows all relevant network parameters:
SWISS-AS.COM
12/167
allow external access via SSH. SSH access between hosts is also recommended in order to transfer files
(backups, etc...)
Miscellany
The following Linux settings need to be configured additionally:
timezone UTC
disable SELinux
RedHat: register in RHN
Memory settings in Linux depend on how the Sybase database server allocates shared memory: either with Huge
Pages or not. By default ASE tries to allocate memory using Huge Pages but falls back to normal memory pages if
Huge Pages are not available. For database instances with high memory (> 3 GB), Huge Pages are recommended.
In Linux, the Huge Page size is 2 MB per default (see: cat /proc/meminfo | grep Hugepagesize). Set the
kernel parameter vm.nr_hugepages to the calculated number of Huge Pages. For example, if the ASE
parameter 'max memory' is set to 10'000 MB the corresponding kernel parameter in /etc/sysctl.conf will be
set to:
vm.nr_hugepages=5005
Calculate the amount of memory that the sybase Linux user can lock into its address space. The memlock
setting is specified in KB and must match the memory size of the number of Huge Pages that ASE should be
able to allocate.
lockable memory=(#Huge Pages * Huge Page size in KB)
Verify that the soft and hard values in KB of memlock that are configured in /etc/security/limits.
conf are set to the calculated value. For example, if the ASE parameter 'max memory' is set to 10'000 MB
the memlock parameters need to be configured as:
sybase soft memlock 10250240
sybase hard memlock 10250240
According RedHat, THP is not recommended for database workloads (see https://access.redhat.com/documentation
/en-us/red_hat_enterprise_linux/6/html/performance_tuning_guide/s-memory-transhuge).
SWISS-AS.COM
13/167
Example of /etc/default/grub:
GRUB_CMDLINE_LINUX="crashkernel=auto rd.lvm.lv=vg_root/lv_root rd.lvm.lv=vg_root/swap rhgb quiet
transparent_hugepage=never"
SWISS-AS.COM
14/167
vm. grep ^VmPeak /proc/$(head -1 Huge page memory used by the database server, to be
nr_hugepages $PGDATA/postmaster.pid)/status configured once PostgreSQL is running and had some load
net.ipv4. 60
tcp_keepalive_
intvl TCP Keepalive settings to avoid database connection to be
closed unexpectedly
net.ipv4. 5
tcp_keepalive_
probes
net.ipv4. 60
tcp_keepalive_
time
user postgres amos postgres The user that runs the database
server and backup scripts. Make
sure to create a system user
account.
SWISS-AS.COM
15/167
If multiple servers are used, the user/group names and IDs should be the same on all host.
Syntax example:
passwd postgres
For each AMOS environment hosted on the server, one partition must be created.
For example for a server with training, acceptance and migration, the following partitions are needed:
SWISS-AS.COM
16/167
use the ext4 or xfs file systems for DBMS data, transaction log and backup storage.
Networking
The following list shows all relevant network parameters:
Miscellany
The following Linux settings need to be configured additionally:
timezone UTC
disable SELinux
Install pigz and bc packages to have all Swiss AS backup scripts features
RedHat: register in RHN
SWISS-AS.COM
17/167
Preparing Windows
Please take the following considerations into account when preparing the guest operating system:
the instructions regarding the database server preparation described hereafter are only valid for servers that
run SAP ASE (formerly know as Sybase ASE) and PostgreSQL.
if the application and the database server run on the same host, the system needs to meet both
requirements.
if multiple servers are used, the user/group names and IDs should be the same on all host.
requirements of additional interfaces (e.g. flightlog / financial interfaces) are not included.
SWISS-AS.COM
18/167
for multiple AMOS servers running on the same host, the corresponding parameters have to be cumulated
systems used for release change tests should have similar setup as the production in order to provide
comparable performance
we recommend to keep the free space on applic drive always greater than twice the java memory allocated
to AMOS. This is to avoid the drive to be full in case of a Java heap dump creation.
AMOS uses /tmp as default temporary folder on Linux, it is recommended to allocate enough space on that
folder accordingly depending on the AMOS usage. Having a separate mount point should be considered.
Type XS S M L XL XXL
Hardware Requirements
Memory 6 GB 8 GB 10 GB 10 GB 18 GB 24 GB
/webdrive (Linux) or E:\webdrive (Windows) 100 GB 100 GB 300 GB 300 GB 500 GB 500 GB
SWISS-AS.COM
19/167
amos This is the user that runs the service of the AMOS application server and related Windows scheduled
_servi tasks.
ce
The administrator permissions are not required, however the user must have full control on parent folder
of AMOS application folder (e.g: D:\applic) and the webdrive location (e.g. E:\webdrive).
This service user must have the right ‘Log on as a service’ on the local machine. This logon right strictly
applies only to the local computer and must be granted in the Local Security Policy.
In case it does not have administrator permissions, this user must be a member of the Windows local
groups "Performance Log Users" and "Performance Monitor Users".
The password for this user must not expire. Having separate application server and database server the
use of domain user is recommended to fully operate the Swiss-AS backup & recovery scripts.
amos This user is required for installation and support. This user needs temporary administrator right during
_sys the inital installation and whenever the service needs to be re-installed.
D:\applic This is the application server's parent directory AMOS and ASE executables
E:\webdrive The AMOS webdrive directory The AMOS webdrive location (if local)
Networking
The following list shows all relevant network parameters:
Miscellany
Size of Pagefile.sys should be set to half of the physical memory and minimum 4GB.
Disable UAC (user account control)
Disable antivirus check for the AMOS application folder
Install 7Zip
Install Visual C++ Redistributable Packages for Visual Studio 2015. Note that this package is language
specific.
Install or update .NET Framework runtime to version 4.7 or newer
SWISS-AS.COM
20/167
SWISS-AS.COM
21/167
To operate the Swiss-AS backup & recovery scripts the following user is required:
User Description
In case it does not have administrator permissions, this user must be a member of the Windows local
groups "Performance Log Users" and "Performance Monitor Users".
The password for this user must not expire. Having separate application server and database server the
use of domain user is recommended to fully operate the Swiss-AS backup & recovery scripts.
C:\ OS installation
Networking
The following list shows all relevant network parameters:
SWISS-AS.COM
22/167
Miscellany
Size of Pagefile.sys should be set to half of the physical memory and minimum 4GB.
Disable UAC (user account control)
Disable antivirus check for the database backup folder
Install 7Zip
One of the following packages is required depending on the Windows Server version you are operating
SWISS-AS.COM
23/167
To operate the Swiss-AS backup & recovery scripts the following user is required:
User Description
In case it does not have administrator permissions, this user must be a member of the Windows local
groups "Performance Log Users" and "Performance Monitor Users".
The password for this user must not expire. Having separate application server and database server the
use of domain user is recommended to fully operate the Swiss-AS backup & recovery scripts.
Note: "Modify" permissions need to be granted to local system user "Network Service"
Note: "Modify" permissions need to be granted to local system user "Network Service"
Networking
The following list shows all relevant network parameters:
SWISS-AS.COM
24/167
Miscellany
Size of Pagefile.sys should be set to half of the physical memory and minimum 4GB.
Disable UAC (user account control)
Disable antivirus check for the database backup folder
SWISS-AS.COM
25/167
Database Installation
SWISS-AS.COM
26/167
Installation Requirements
The SAP ASE installation files can be downloaded from the customer portal on www.swiss-as.com.
Before the server installation can actually start, several parameters need to be defined:
the operating system time zone: the database server and the application server use the operating system
time. Swiss AS recommends to run all servers on UTC time. If the time or timezone is changed after the
installation, data inconsistencies are likely to occur.
the host name, domain name and IP address: for all servers, a static IP and DNS entry need to be defined.
The installation file required to set up the ASE servers should be located in a temporary directory, e.g. /applic/install
for Linux and D:\applic\install for Windows. This file is a compressed archive of the directory of the setup tool. To
install ASE follow these steps:
SWISS-AS.COM
27/167
ASE Installation
The installation file required to set up the ASE servers should be located in a temporary directory, e.g. /applic/install
for Linux and D:\applic\install for Windows. This file is a compressed archive of the directory of the setup tool. To
install ASE follow these steps:
In console and GUI mode, the following information has to be entered in the setup tool.
Choose Product Features: select Adaptive Server Enterprise, Open Client, DB-Library and SySAM License
Utilities. For Windows only : install also Interactive SQL
Software License Type Selection: Install licensed copy of Sybase Adaptive Server Enterprise Suite
End-user License Agreement: Europe,Middle East, and Africa – General. Type 'back' and press ENTER to
skip the LICENSE AGREEMENT.
Sybase Software Asset Management License: Continue installation without a license key
Product Licenses:
Product Edition is Enterprise Edition
License type is: AR : OEM Application Deployment Server License
Sybase Software Asset Management Notification: No
Pre-Installation Summary:
Pre-Installation Summary
Please Review the Following Before Continuing:
Product Name:
Sybase Adaptive Server Enterprise Suite Install
Folder:
/applic/sap_ase
Product Features:
Adaptive Server Enterprise,
Open Client,
DB-Library,
SySAM License Utilities,
Disk Space Information (for Installation Target):
Required: 1,596,898,051 Bytes
Available: 16,057,884,672 Bytes
After the installation of the ASE software, the setup tool allows you to create new instances of ASE servers:
Adaptive Server, Backup Server, XP Server
SWISS-AS.COM
28/167
Page Size: 4K
Enable PCI: no
SWISS-AS.COM
29/167
SWISS-AS.COM
30/167
ASE Configuration
Windows Environments
All required environment variables related to database tools like isql and the database server are set globally upon
the installation of the SAP ASE software. No further configuration is required.
Linux Environments
In Linux, the required environment variables related to database tools like isql and the database server needs to be
set for the Linux user 'sybase'. By sourcing script SYBASE.sh from the ASE installation directory all environment
variables will be set. The environment variable DSQUERY that defines the default SAP ASE instance name needs
to added this script.
export DSQUERY=<ASE instance name>
For example, append following line to SYBASE.sh for ASE instance AMOS:
export DSQUERY=AMOS
Include this script in the sybase Linux user's /home/sybase/.bashrc to make sure the environment variables are set
upon login:
source /applic/sap_ase/SYBASE.sh
SWISS-AS.COM
31/167
After the configuration of the tempdb cache in step 5, the remaining memory can be used for the default data
cache. Use the following statement to determine the remaining memory:
sp_configure "memory"
The result of this command shows how much memory is left for configuration, for example:
itAn additional 3895942 K bytes of memory is available for reconfiguration. This is the difference
between 'max memory' and 'total logical memory'.
<DBName>_<DeviceType><DeviceNumber>
For a database named prod this would result in the following device names:
If you need to add new data devices to the database, just increase the device number. In this case the second data
device would be called:
SWISS-AS.COM
32/167
the database size of the target database needs to be at least the same size as the source database
the device structure (the sequence of data and log devices in a database) of the target database must be
identical to the structure of the source
So this needs to be taken into consideration when creating any new database. It is best practice to enlarge all other
databases as well after you enlarged the prod database to keep the structure similar. As a recommendation, the
device size should not exceed 20 GB to increase disk I/O performance. Please refer to the Sybase Standards
document for default device sizing : ASE Configuration
For example:
disk init name="prod_data1", physname="/data/prod_data1.dat", size="5000M"
For example:
create database prod on prod_data1 = "20000M" log on prod_log1 = "2000M"
SWISS-AS.COM
33/167
To increase the database size, a data or log device needs to be added (appended) to the database using the
following SQL command:
alter database <dbname> on <additional data device name> = "<size in MB>M" log on <additional log device
name> = "<size in MB>M"
Note that usually only data devices will be appended as the transaction log is purged regularly. The corresponding
SQL command looks like this:
alter database <dbname> on <additional data device name> = "<size in MB>M"
For example:
alter database prod on prod_data2 = "20000M" log on prod_log1 = "2000M"
Note that it is also possible to increase an existing device and alter the database to use the additional space.
Please refer to the ASE documentation regarding the SQL syntax.
Tempdb Database
During the creation of a ASE instance, a temporary database called tempdb is created automatically. The tempdb
uses the same device for both data and transaction log. For better performance, device options dsync and directio
need to be switched off for tempdb devices and a separate log device needs to be added:
disk init name="tempdb_log1",physname="/log/tempdb_log1.dat",size="1000M",dsync=false,directio=false
go
sp_deviceattr tempdbdev,"directio",false
go
Please refer to the ASE Configuration document for details. Tempdb fragments referencing the master database
need to be removed for best performance
use tempdb
go
sp_dropsegment "system", tempdb, master
go
sp_dropsegment "default", tempdb, master
go
sp_dropsegment "logsegment", tempdb, master
go
SWISS-AS.COM
34/167
Regarding device size, device naming and database options please refer to ASE Configuration Database Standards
document.
The following picture illustrates the usage of server logins and database users in AMOS.
SWISS-AS.COM
35/167
Naming Convention
It is recommended to include the database name in the login name as every AMOS instance (ergo every database)
uses a separate set of server login and database user. For example, 'amosuser_prod' for the production
environment or 'amosuser_test'.for a test environment. Additionally, AMOS requires the login name to be equal to
the database user name.
In the AMOS user database, the corresponding database user needs to be added using the following SQL
commands:
use <database name>
go
sp_adduser <login name>,<database user name>
go
For example:
SWISS-AS.COM
36/167
The database users can be created as part as the database wizard available from AMOS 19.6. More
information can be found in AMOS Server Installation.
----------------- ------------
edition EE
license type AR
smtp port 25
SWISS-AS.COM
37/167
------------- --------------
PE EE
LT AR
ME null
MC null
MS null
MM null
CP null
AS A
For example, to initially set the 'sa' login's password (which is empty after installation) to 'myNewPassword' use the
following SQL command:
sp_password null,myNewPassword
go
SWISS-AS.COM
38/167
Note: From SAP ASE 15.7 and higher, the 'sa' login's password is already set during installation so that this step
might not be required.
After that, you must reboot the Sybase server twice for character conversion to take effect ! Please use the
following instructions and log every step you make. Don't forget to backup your databases and the ASE directory.
SWISS-AS.COM
39/167
50 4 bin_roman8 Binary ordering, for use with the HP Roman8 character set (roman8).
Character sets not displayed here need to be installed before they can be used in the database server's
configuration. The default character set currently used by the database server is configured with parameter 'default
character set id'. To display the current setting use the followin SQL command:
sp_configure 'default character set id'
go
Parameter Name Default Memory Used Config Value Run Value Unit Type
In this example the default id is 1 which corresponds to the iso_1 character set.
Compared to the previous result of this query, two more rows should be visible now. E.g. for character set 'utf8':
SWISS-AS.COM
40/167
50 4 bin_roman8 Binary ordering, for use with the HP Roman8 character set (roman8).
50 190 bin_utf8 Binary sort order for the ISO 10646-1, UTF-8 multibyte encoding character set (utf8).
Run the following SQL commands to change the default character set. 190 is the id of the new character set 'utf8' to
be used.
sp_configure 'enableunicode conversions', 1
go
sp_configure 'default character set id', 190
go
Note: the ASE instance has to be rebooted twice for this change to take effect ! The first time the ASE
instance is rebooted after changing the default character set, all the system indexes will be verified automatically
and the database server will shut down automatically.
Changing to a multibyte character set makes the management of text data more complicated. A text value can be
large enough to cover several pages; therefore, ASE must be able to handle characters that span page boundaries.
To do so, ASE requires additional information on each of the text pages. The database administrator or table owner
must run dbccfix_text on each table that has text data to calculate the new values needed. To see the names of all
tables that contain text data in a particular database, use SQL command:
select sysobjects.name from sysobjects, syscolumns where syscolumns.type = 35 and sysobjects.id = syscolumns.
id
go
The database administrator or table owner must run SQL command dbccfix_text to calculate the new values
needed. The table named must be in the current database. dbccfix_text opens the specified table, calculates the
character statistics required for each text value, and adds the statistics to the appropriate page header fields. This
process can take a long time, depending on the number and size of the text values in a table. dbccfix_text can
generate a large number of log records, which may fill up the transaction log. dbccfix_text performs updates in a
series of small transactions so that if a log becomes full, only a small amount of work is lost. If you run out of log
space, clear out your log. Then restart dbccfix_text, using the same table that was being upgraded when the
original dbccfix_text halted. Each multibyte text value contains information that indicates whether it has been
upgraded, so dbccfix_text upgrades only the text values that were not processed in earlier passes.
SWISS-AS.COM
41/167
Remove XP Server
ASE XP Server should be disabled as it can be a security breach. Once you have access to the database SA user
you can run any command on that server and therefore run arbitrary commands to manipulate it.
SWISS-AS.COM
42/167
SWISS-AS.COM
43/167
Introduction
Swiss-AS provides linux bash scripts for the backup and recovery of ASE databases used by AMOS. The script's
configuration need to be adapted to the customer's AMOS environment so that they can be used either manually or
scheduled via cron. All scripts make use of a configuration file that stores all required parameters and a so called
toolboxes which are files that define particular functions. Usually, only the configuration files need to be changed by
the customer in order to get the script running.
The latest version of the backup and recovery scripts can be downloaded via the Swiss AS customer portal.
General Notes
Predefined Configuration files : each script requires a specific set of parameters stored in a configuration file.
A template of each of the three configuration files (backup.cfg, recovery.cfg and logship.cfg) is provided
together with the backup, recovery and logshipping scripts and the toolbox files.
General Toolbox : the toolbox file toolbox.sh defines generic functions used in the backup and recovery
scripts. By default the toolbox file is located in the same directory as the corresponding script.
ASE Toolbox : the toolbox file sybase.toolbox.sh defines ASE specific functions used in the backup and
recovery scripts. By default the toolbox file is located in the same directory as the corresponding script.
Introduction
General Notes
Backup Scripts
Functions
Usage
Configuration Parameters
System Requirements
Recovery Script
Functions
Usage
Configuration Parameters
System Requirements
Logshipping Scripts
Functions
Usage
Configuration Parameters
System Requirements
Backup Scripts
The scripts to create database backups are called syb_backup.sh and syb_dump_trans.sh :
SWISS-AS.COM
44/167
syb_backup.sh : creates a set of backup files of one or more user databases and all system databases of a
given ASE instance.
syb_dump_trans.sh : creates an incremental backup file of one or more user database and truncates the
transaction log of all system databases of a given ASE instance. The backup file is added to the current
backup set
A configuration file (by default etc/backup.cfg) and the toolbox files toolbox.sh and sybase_toolbox.sh are
required by those scripts.
Functions
Full backup script provides the following features:
the backup file is added to the current backup set and is identified by a sequence number and a process ID
by default all databases that are part of the full backup (see syb_backup.ps1) are included, but particular
databases can be omitted
truncates the transaction log of all system databases instead of an incremental backup
the script prevents multiple simultaneous executions
performs check of the configuration parameters before creating backup sets
creates entries in AMOS table in order to monitor the backup via AMOS control center
creates and archives a log file for each run
parses sybase log for errors in order to monitor them in AMOS Monitoring
Usage
The scripts syntax is:
syb_backup.sh [-c | -h | -i| -f <config file> ]
syb_dump_trans.sh [-c | -h | -f <config file> ]
Without the option –f the script uses the configuration file etc/backup.cfg.
Options:
-c : let the script check the configuration only. No backup set is created.
-h : shows the usage
-i : force logshipping script to reload the remote database
SWISS-AS.COM
45/167
-f file : the script uses file as configuration file. Without this option the file etc/backup.cfg is used
by default.
The required toolbox files need to be located in the same directory as the script itself.
Configuration Parameters
The script requires the following configuration parameters that need to be defined in the script's configuration file.
By default the configuration file is etc/backup.cfg or it can be provided using option -f.
Parameter Description
DSPASS The sa login's password file (a restricted access to this file is strongly recommended)
NO_TRAN_DATABAS Names ot the user databases you do not want to backup (space separated)
ES
RETENTION_DAYS Amount of days (n * 24h) backup sets shall be stored prior to deletion.
NUMBER_OF_STRIP The dump can be split into "stripes" to accelerate the backup process. DEFAULT: 2
ES
SWISS-AS.COM
46/167
LOG_RETENTION_D Amount of days (n * 24h) log files shall be stored prior to deletion.
AYS
If set to 0, all log files will be kept
RECOVER_LOCKFILE Name of the recovery lockfile (to check if a load of the database is processing).
INFORMATION_FOL Folder where the AMOS information files are located. See "server1.info.cfg" config file
DER for further information
DUMP_WITH_SA Defines if the target database has to be onlined with standby access. This parameter
needs to
DUMP_WITH_SA_REC The transaction log dumped with standby access does not contain the non-commited
transactions, therefore it is
Default: 4
DUMP_PASSWORD Defines the password used to encrypt the dump. If empty the dump is not encrypted.
System Requirements
The Linux user that runs the backup script needs to have the correct permissions on the required files and
directories.
Recovery Script
SWISS-AS.COM
47/167
The script to recover a database from a full backup is called syb_recover.sh. It loads a set of full database backup
files into a user database of a given ASE instance. Additionally it remaps AMOS users to ASE logins and restarts
the corresponding AMOS server to enforce the reactivation of the AMOS maintenance key. This requires a
password-less SSH login to the host of the AMOS server. A configuration file (by default etc/recovery.cfg) and the
toolbox files toolbox.sh and sybase_toolbox.sh are required by this script.
Functions
The script provides the following features:
it loads a full backup from one or more backup files and onlines the database. It can also load transaction
dumps located in a specific folder.
AMOS users are remapped to Sybase logins
AMOS parameters for the client title and background image can be customized
AMOS workflows and AIM config can be disabled
the AMOS masterkey file is copied from the source to the target AMOS server
the target AMOS server is previously stopped and restarted at the end to enforce the recovery of the AMOS
maintenance key from local maintenance key backup
allows to trigger pre- and post-scripts for further customization
the script prevents multiple simultaneous executions
allows to save the printer settings and the keystore after the reload of the database
performs check of the configuration parameters before creating backup sets
creates and archives a log file for each run
Usage
The script's syntax is:
syb_recover.sh [-c | -h | -f <config file> ]
Without the option –f the script uses the configuration file etc/recovery.cfg.
Options:
The required toolbox files need to be located in the same directory as the script itself.
Configuration Parameters
Parameter Description
SWISS-AS.COM
48/167
ENV
RECOVER The sa login's password file (a restricted access to this file is strongly recommended)
_DSPASS
OVERWRI Overwrites last session log file or keep it and appends. DEFAULT: Y
TE_LOGFI
LE
SWISS-AS.COM
49/167
RECOVER
_AMOS
RECOVER The directory where are located the incremental backups to be loaded after the full dump
_DIR_TRA
NS
RECOVER Backup files of a backup set (Windows powershell: comma separated, Linux bash: space
_FILES separated)
KEEP_KE Defines if the environment which is recovered will keep its kexytore. [ Y / N ]. DEFAULT: N
YSTORE
This feature shall not be used in case the source and target AMOS environment are on different
versions
There will be one file per version and environment. Each time the script is executed it will export
the configuration of the environment for the environment version. If the file already exists it will be
overwritten. Filename: <db_name>_<version>_export_config.zip
The initial export for an environment and a version will be archived/persisted to another filename
(to prevent it from being overwritten). Filename: initial_save_<db_name>_<version>_export_config.
zip
SWISS-AS.COM
50/167
AMETERS Define which configuration will not be overwritten by the restore. If you don't specify any
configurations, everything gets imported.
Be sure to put the configs in quotation marks and separate them with only a comma (e.g.,
"KEYSTORE,WEBSERVICE_CONFIG").
USER_AND_LICENCES
PARAMETERS
KEYSTORE
CUSTOMIZE_APPLICATIONS
WEBSERVICE_CONFIG
FORM_CONFIGURATION
CLEANUP_JOBS
AIM_CONFIGURATION
WORKFLOW_CONFIGURATION
SCHEDULED_TASKS
POST_SC A script that will be triggered after the database has been loaded, before AMOS is restarted
RIPT
BACKUP_ Name of the backup lockfile (to check if a backup of the database is processing).
LOCKFILE
Must be the same as defined in backup.cfg.
RECOVER Defines the password used to decrypt the dump. If empty, assuming the dump is not encrypted.
_DUMP_P
ASSWORD
System Requirements
The Linux user that runs the recovery script needs to have the correct permissions on the required files and
directories. Additionally, a password-less SSH login is required between the user running the recovery script and
the user running the target AMOS server (see ssh-keygen for details). The AMOS maintenance key on the target
AMOS instance has to be backed up previously in order to allow automatic maintenance key recovery.
Logshipping Scripts
The scripts used for log shipping are called logship_full.sh and logship_inc.sh. They are usually called
automatically by the full and incremental backup scripts but can also be used manually. They copy a set of backup
files to a remote server and load them into the target database. A configuration file (by default etc/logship.cfg) and
the toolbox files toolbox.sh and sybase_toolbox.sh are required by these scripts.
SWISS-AS.COM
51/167
Functions
The script logship_full provides the following features:
it copies and loads a set of full backup files from a local directory into a remote database. The remote server
is usually used as a standby system.
removes old backup files on the remote server
the script prevents multiple simultaneous executions
performs check of the configuration parameters
synchronizes the AMOS application server and webdrive directories with the remote server
creates and archives a log file for each run
archives logship scripts old log files
it copies and loads a set of incremental backup files into the remote database
the backup file of an incremental backup that has been loaded successfully is archived
the script prevents multiple simultaneous executions
performs check of the configuration parameters
creates and archives a log file for each run
archives logship scripts old log files
Usage
The scripts syntax is:
logship_full.sh <logship init [Y/N]> [-c | -h | -f <config file> ] <backup file1> <backup
file2> ...
logship_inc.sh [-c | -h | -f <config file> ]
Without the option –f the script uses the configuration file etc/logship.cfg.
Options:
The required toolbox files need to be located in the same directory as the script itself.
Configuration Parameters
Parameter Description
SWISS-AS.COM
52/167
SHIP_LOG_RETENTION_D Amount of days (n * 24h) log files shall be stored prior to deletion.
AYS
If set to 0, all log files will be kept
SHIP_DUMP_PASSWORD Defines the password used to decrypt the dump. If empty, assuming the dump is
not encrypted.
SWISS-AS.COM
53/167
System Requirements
The Linux user that runs the recovery script needs to have the correct permissions on the required files and
directories. Additionally, a password-less SSH login is required between the user running the logship scripts and the
user running the target AMOS and DB servers (see ssh-keygen for details).
SWISS-AS.COM
54/167
Introduction
Swiss-AS provides powershell for the backup and recovery of ASE databases used by AMOS. The script's
configuration need to be adapted to the customer's AMOS environment so that they can be used either manually or
scheduled via the task scheduler. All scripts make use of a configuration file that stores all required parameters and
a so called toolboxes which are files that define particular functions. Usually, only the configuration files need to be
changed by the customer in order to get the script running.
The latest version of the backup and recovery scripts can be downloaded via the Swiss AS customer portal.
General Notes
Predefined Configuration files : each script requires a specific set of parameters stored in a configuration file.
A template of each of the three configuration files (backup.cfg.ps1, recovery.cfg.ps1 and logship.cfg.ps1) is
provided together with the backup, recovery and logshipping scripts and the toolbox files.
General Toolbox : the toolbox file toolbox.ps1 defines generic functions used in the backup and recovery
scripts. By default the toolbox file is located in the same directory as the corresponding script.
ASE Toolbox : the toolbox file sybase_toolbox.ps1 defines ASE specific functions used in the backup and
recovery scripts. By default the toolbox file is located in the same directory as the corresponding script.
Powershell execution policy : to be able to run powershell scripts on a host, the execution policy needs to be
adjusted (see Set-ExecutionPolicy command). It is possible the change the policy to the whole server or only
for one script execution (see ByPass execution policy)
Introduction
General Notes
Backup Scripts
Functions
Usage
System Requirements
Recovery Script
Functions
Usage
Configuration Parameters
System Requirements
Logshipping Scripts
Usage
Configuration Parameters
System Requirements
Introduction
General Notes
Backup Scripts
Functions
Usage
System Requirements
Recovery Script
SWISS-AS.COM
55/167
Functions
Usage
Configuration Parameters
System Requirements
Logshipping Scripts
Usage
Configuration Parameters
System Requirements
Backup Scripts
The scripts to create database backups are called syb_backup.ps1 and syb_dump_trans.ps1 :
syb_backup.ps1 : creates a set of backup files of one or more user databases and all system databases of
a given ASE instance.
syb_dump_trans.ps1 : creates an incremental backup file of one or more user database and truncates the
transaction log of all system databases of a given ASE instance. The backup file is added to the current
backup set
A configuration file (by default etc/backup.cfg.ps1) and the toolbox files toolbox.ps1 and sybase_toolbox.ps1
are required by those scripts.
Functions
Full backup script provides the following features:
the backup file is added to the current backup set and is identified by a sequence number and a process ID
by default all databases that are part of the full backup (see syb_backup.ps1) are included, but particular
databases can be omitted
truncates the transaction log of all system databases instead of an incremental backup
the script prevents multiple simultaneous executions
performs check of the configuration parameters before creating backup sets
creates entries in AMOS table in order to monitor the backup via AMOS control center
creates and archives a log file for each run
parses sybase log for errors in order to monitor them in AMOS Monitoring
SWISS-AS.COM
56/167
Usage
The scripts syntax is:
syb_backup.ps1 [-CheckConfig [$true|$false] | -Help [$true|$false] | -LogshipInit [$true|$false]
| -ConfigFile <config file> ]
syb_dump_trans.ps1 [-CheckConfig [$true|$false] | -Help [$true|$false] | -ConfigFile <config
file> ]
Without the option –ConfigFile the script uses the configuration file etc/backup.cfg.ps1.
Options:
-CheckConfig : let the script check the configuration only. No backup set is created.
-Help : shows the usage
-LogshipInit : force logshipping script to reload the remote database
-ConfigFile file : the script uses file as configuration file. Without this option the file etc/backup.cfg.
ps1 is used by default.
The required toolbox files need to be located in the same directory as the script itself.
Parameter Description
DSPASS The sa login's password file (a restricted access to this file is strongly recommended)
NO_TRAN_DATABAS Names ot the user databases you do not want to backup (comma separated)
ES
RETENTION_DAYS Amount of days (n * 24h) backup sets shall be stored prior to deletion.
NUMBER_OF_STRIP The dump can be split into "stripes" to accelerate the backup process. DEFAULT: 2
ES
SWISS-AS.COM
57/167
COMPRESSED Dumps can be compressed to save disk space. [ $true / $false ], DEFAULT: $true
LOG_RETENTION_D Amount of days (n * 24h) log files shall be stored prior to deletion.
AYS
If set to 0, all log files will be kept
RECOVER_LOCKFILE Name of the recovery lockfile (to check if a load of the database is processing).
INFORMATION_FOL Folder where the AMOS information files are located. See "server1.info.cfg" config file
DER for further information
DUMP_WITH_SA Defines if the target database has to be onlined with standby access. This parameter
needs to
be enabled if you use the report connection in AMOS. [ $true / $false ], DEFAULT:
$false
DUMP_WITH_SA_REC The transaction log dumped with standby access does not contain the non-commited
transactions, therefore it is
Default: 4
DUMP_PASSWORD Defines the password used to encrypt the dump. If empty the dump is not encrypted.
SWISS-AS.COM
58/167
System Requirements
The Windows user that runs the backup script needs to have the correct permissions on the required files and
directories.
Recovery Script
The script to recover a database from a full backup is called syb_recover.ps1. It loads a set of full database
backup files into a user database of a given ASE instance. Additionally it remaps AMOS users to ASE logins and
restarts the corresponding AMOS server to enforce the reactivation of the AMOS maintenance key. A configuration
file (by default etc/recovery.cfg.ps1) and the toolbox files toolbox.ps1 and sybase_toolbox.ps1 are required by
this script.
Functions
The script provides the following features:
it loads a full backup from one or more backup files and onlines the database. It can also load transaction
dumps located in a specific folder.
AMOS users are remapped to Sybase logins
AMOS parameters for the client title and background image can be customized
AMOS workflows and AIM config can be disabled
the AMOS masterkey file is copied from the source to the target AMOS server
the target AMOS server is previously stopped and restarted at the end to enforce the recovery of the AMOS
maintenance key from local maintenance key backup
allows to trigger pre- and post-scripts for further customization
the script prevents multiple simultaneous executions
allows to save the printer settings and the keystore after the reload of the database
performs check of the configuration parameters before creating backup sets
creates and archives a log file for each run
Usage
The script's syntax is:
syb_recover.ps1 [-CheckConfig [$true|$false] | -Help [$true|$false] | -ConfigFile <config file>
]
Without the option –ConfigFile the script uses the configuration file etc/recovery.cfg.ps1.
Options:
-CheckConfig : let the script check the configuration only. No backup is loaded.
-Help : shows the usage
-ConfigFile file : the script uses file as configuration file. Without this option the file etc/recovery.
cfg.ps1 is used by default.
The required toolbox files need to be located in the same directory as the script itself.
SWISS-AS.COM
59/167
Configuration Parameters
Parameter Description
RECOVER The sa login's password file (a restricted access to this file is strongly recommended)
_DSPASS
OVERWRI Overwrites last session log file or keep it and appends. DEFAULT: $true
TE_LOGFI
LE
SWISS-AS.COM
60/167
RECOVER Target AMOS server (could be the same if AMOS and Sybase are on the same host)
_AMOS_L
OCAL
RECOVER
_AMOS
RECOVER The directory where are located the incremental backups to be loaded after the full dump. Default :
_DIR_TRA $null
NS
RECOVER Backup files of a backup set (Windows powershell: comma separated, Linux bash: space
_FILES separated)
DISABLE_ Defines if AMOS workflows need to be disabled. [$true / $false]. DEFAULT : $true
WORKFLO
WS
DISABLE_ Defines if AIM configuration needs to be deleted. [$true / $false], DEFAULT : $true
AIM_CON
FIG
KEEP_KE Defines if the environment which is recovered will keep its keystore. [$true / $false]. DEFAULT:
YSTORE $false
This feature shall not be used in case the source and target AMOS environment are on different
versions
There will be one file per version and environment. Each time the script is executed it will export
the configuration of the environment for the environment version. If the file already exists it will be
overwritten. Filename: <db_name>_<version>_export_config.zip
SWISS-AS.COM
61/167
The initial export for an environment and a version will be archived/persisted to another filename
(to prevent it from being overwritten). Filename: initial_save_<db_name>_<version>_export_config.
zip
Be sure to put the configs in quotation marks and separate them with only a comma (e.g.,
"KEYSTORE,WEBSERVICE_CONFIG").
USER_AND_LICENCES
PARAMETERS
KEYSTORE
CUSTOMIZE_APPLICATIONS
WEBSERVICE_CONFIG
FORM_CONFIGURATION
CLEANUP_JOBS
AIM_CONFIGURATION
WORKFLOW_CONFIGURATION
SCHEDULED_TASKS
POST_SC A script that will be triggered after the database has been loaded, before AMOS is restarted
RIPT
BACKUP_ Name of the backup lockfile (to check if a backup of the database is processing).
LOCKFILE
Must be the same as defined in backup.cfg.ps1
RECOVER Defines the password used to decrypt the dump. If empty, assuming the dump is not encrypted.
_DUMP_P
ASSWORD
System Requirements
The Windows user that runs the recovery script needs to have the correct permissions on the required files
and directories (including remote ones).
The AMOS maintenance key on the target AMOS instance has to be backed up previously in order to allow
automatic maintenance key recovery.
AMOS Config server tool is remotely executed on the target AMOS host, so make sure WinRM is well
configured regarding Java Memory consumption.
SWISS-AS.COM
62/167
Logshipping Scripts
The scripts used for log shipping are called logship_full.ps1 and logship_inc.ps1. They are usually called
automatically by the full and incremental backup scripts but can also be used manually. They copy a set of backup
files to a remote server and load them into the target database. A configuration file (by default etc/logship.cfg.ps1)
and the toolbox files toolbox.ps1 and sybase_toolbox.ps1 are required by these scripts.
Usage
The scripts syntax is:
logship_full.ps1 [-CheckConfig [$true|$false] | -Help [$true|$false] | -ConfigFile <config
file> ] | -LogshipInit [$true|$false] | -FileNames "<backup file1>","<backup file2>",...
logship_inc.ps1 [-CheckConfig [$true|$false] | -Help [$true|$false] | -ConfigFile <config file>
]
Without the option –ConfigFile the script uses the configuration file etc/logship.cfg.ps1.
Options:
-CheckConfig : let the script check the configuration only. No file is transferred.
-Help : shows the usage
-ConfigFile file : the script uses file as configuration file. Without this option the file etc/logship.cfg
is used by default.
-LogshipInit: force to reload the remote database
-FileNames "<backup file1>","<backup file2>" : all database backup files to be reloaded in the
remote database.
The required toolbox files need to be located in the same directory as the script itself.
Configuration Parameters
Parameter Description
SHIP_LOG_RETENTION_DAYS Amount of days (n * 24h) log files shall be stored prior to deletion.
SWISS-AS.COM
63/167
SHIP_DUMP_PASSWORD Defines the password used to decrypt the dump. If empty, assuming the dump
is not encrypted.
System Requirements
The Windows user that runs the recovery script needs to have the correct permissions on the required files and
directories (including remote ones).
Introduction
Swiss-AS provides powershell for the backup and recovery of ASE databases used by AMOS. The script's
configuration need to be adapted to the customer's AMOS environment so that they can be used either manually or
scheduled via the task scheduler. All scripts make use of a configuration file that stores all required parameters and
a so called toolboxes which are files that define particular functions. Usually, only the configuration files need to be
changed by the customer in order to get the script running.
The latest version of the backup and recovery scripts can be downloaded via the Swiss AS customer portal.
SWISS-AS.COM
64/167
General Notes
Predefined Configuration files : each script requires a specific set of parameters stored in a configuration file.
A template of each of the three configuration files (backup.cfg.ps1, recovery.cfg.ps1 and logship.cfg.ps1) is
provided together with the backup, recovery and logshipping scripts and the toolbox files.
General Toolbox : the toolbox file toolbox.ps1 defines generic functions used in the backup and recovery
scripts. By default the toolbox file is located in the same directory as the corresponding script.
ASE Toolbox : the toolbox file sybase_toolbox.ps1 defines ASE specific functions used in the backup and
recovery scripts. By default the toolbox file is located in the same directory as the corresponding script.
Powershell execution policy : to be able to run powershell scripts on a host, the execution policy needs to be
adjusted (see Set-ExecutionPolicy command). It is possible the change the policy to the whole server or only
for one script execution (see ByPass execution policy)
Introduction
General Notes
Backup Scripts
Functions
Usage
System Requirements
Recovery Script
Functions
Usage
Configuration Parameters
System Requirements
Logshipping Scripts
Usage
Configuration Parameters
System Requirements
Introduction
General Notes
Backup Scripts
Functions
Usage
System Requirements
Recovery Script
Functions
Usage
Configuration Parameters
System Requirements
Logshipping Scripts
Usage
Configuration Parameters
System Requirements
Backup Scripts
The scripts to create database backups are called syb_backup.ps1 and syb_dump_trans.ps1 :
syb_backup.ps1 : creates a set of backup files of one or more user databases and all system databases of
a given ASE instance.
SWISS-AS.COM
65/167
syb_dump_trans.ps1 : creates an incremental backup file of one or more user database and truncates the
transaction log of all system databases of a given ASE instance. The backup file is added to the current
backup set
A configuration file (by default etc/backup.cfg.ps1) and the toolbox files toolbox.ps1 and sybase_toolbox.ps1
are required by those scripts.
Functions
Full backup script provides the following features:
the backup file is added to the current backup set and is identified by a sequence number and a process ID
by default all databases that are part of the full backup (see syb_backup.ps1) are included, but particular
databases can be omitted
truncates the transaction log of all system databases instead of an incremental backup
the script prevents multiple simultaneous executions
performs check of the configuration parameters before creating backup sets
creates entries in AMOS table in order to monitor the backup via AMOS control center
creates and archives a log file for each run
parses sybase log for errors in order to monitor them in AMOS Monitoring
Usage
The scripts syntax is:
syb_backup.ps1 [-CheckConfig [$true|$false] | -Help [$true|$false] | -LogshipInit [$true|$false]
| -ConfigFile <config file> ]
syb_dump_trans.ps1 [-CheckConfig [$true|$false] | -Help [$true|$false] | -ConfigFile <config
file> ]
Without the option –ConfigFile the script uses the configuration file etc/backup.cfg.ps1.
Options:
-CheckConfig : let the script check the configuration only. No backup set is created.
-Help : shows the usage
-LogshipInit : force logshipping script to reload the remote database
SWISS-AS.COM
66/167
-ConfigFile file : the script uses file as configuration file. Without this option the file etc/backup.cfg.
ps1 is used by default.
The required toolbox files need to be located in the same directory as the script itself.
Parameter Description
DSPASS The sa login's password file (a restricted access to this file is strongly recommended)
NO_TRAN_DATABAS Names ot the user databases you do not want to backup (comma separated)
ES
RETENTION_DAYS Amount of days (n * 24h) backup sets shall be stored prior to deletion.
NUMBER_OF_STRIP The dump can be split into "stripes" to accelerate the backup process. DEFAULT: 2
ES
COMPRESSED Dumps can be compressed to save disk space. [ $true / $false ], DEFAULT: $true
SWISS-AS.COM
67/167
If enabled, generate one log file per execution. If disabled, use one single file and
append results to it.
LOG_RETENTION_D Amount of days (n * 24h) log files shall be stored prior to deletion.
AYS
If set to 0, all log files will be kept
RECOVER_LOCKFILE Name of the recovery lockfile (to check if a load of the database is processing).
INFORMATION_FOL Folder where the AMOS information files are located. See "server1.info.cfg" config file
DER for further information
DUMP_WITH_SA Defines if the target database has to be onlined with standby access. This parameter
needs to
be enabled if you use the report connection in AMOS. [ $true / $false ], DEFAULT:
$false
DUMP_WITH_SA_REC The transaction log dumped with standby access does not contain the non-commited
transactions, therefore it is
Default: 4
DUMP_PASSWORD Defines the password used to encrypt the dump. If empty the dump is not encrypted.
System Requirements
The Windows user that runs the backup script needs to have the correct permissions on the required files and
directories.
Recovery Script
The script to recover a database from a full backup is called syb_recover.ps1. It loads a set of full database
backup files into a user database of a given ASE instance. Additionally it remaps AMOS users to ASE logins and
restarts the corresponding AMOS server to enforce the reactivation of the AMOS maintenance key. A configuration
file (by default etc/recovery.cfg.ps1) and the toolbox files toolbox.ps1 and sybase_toolbox.ps1 are required by
this script.
SWISS-AS.COM
68/167
Functions
The script provides the following features:
it loads a full backup from one or more backup files and onlines the database. It can also load transaction
dumps located in a specific folder.
AMOS users are remapped to Sybase logins
AMOS parameters for the client title and background image can be customized
AMOS workflows and AIM config can be disabled
the AMOS masterkey file is copied from the source to the target AMOS server
the target AMOS server is previously stopped and restarted at the end to enforce the recovery of the AMOS
maintenance key from local maintenance key backup
allows to trigger pre- and post-scripts for further customization
the script prevents multiple simultaneous executions
allows to save the printer settings and the keystore after the reload of the database
performs check of the configuration parameters before creating backup sets
creates and archives a log file for each run
Usage
The script's syntax is:
syb_recover.ps1 [-CheckConfig [$true|$false] | -Help [$true|$false] | -ConfigFile <config file>
]
Without the option –ConfigFile the script uses the configuration file etc/recovery.cfg.ps1.
Options:
-CheckConfig : let the script check the configuration only. No backup is loaded.
-Help : shows the usage
-ConfigFile file : the script uses file as configuration file. Without this option the file etc/recovery.
cfg.ps1 is used by default.
The required toolbox files need to be located in the same directory as the script itself.
Configuration Parameters
Parameter Description
RECOVER_DSPASS The sa login's password file (a restricted access to this file is strongly recommended)
SWISS-AS.COM
69/167
OVERWRITE_LOGFILE Overwrites last session log file or keep it and appends. DEFAULT: $true
RECOVER_AMOS_LOC Target AMOS server (could be the same if AMOS and Sybase are on the same host)
AL
RECOVER_AMOS
RECOVER_DIR_TRANS The directory where are located the incremental backups to be loaded after the full
dump. Default : $null
RECOVER_FILES Backup files of a backup set (Windows powershell: comma separated, Linux bash:
space separated)
DISABLE_WORKFLOWS Defines if AMOS workflows need to be disabled. [$true / $false]. DEFAULT : $true
DISABLE_AIM_CONFIG Defines if AIM configuration needs to be deleted. [$true / $false], DEFAULT : $true
KEEP_KEYSTORE Defines if the environment which is recovered will keep its keystore. [$true / $false].
DEFAULT: $true
This feature shall not be used in case the source and target AMOS environment are
on different versions
KEEP_PRINTERS_SETT Defines if the environment which is recovered will keep its printers settings. [$true /
INGS $false]. DEFAULT: $false
POST_SCRIPT A script that will be triggered after the database has been loaded, before AMOS is
restarted
SWISS-AS.COM
70/167
BACKUP_LOCKFILE Name of the backup lockfile (to check if a backup of the database is processing).
RECOVER_DUMP_PAS Defines the password used to decrypt the dump. If empty, assuming the dump is not
SWORD encrypted.
System Requirements
The Windows user that runs the recovery script needs to have the correct permissions on the required files
and directories (including remote ones).
The AMOS maintenance key on the target AMOS instance has to be backed up previously in order to allow
automatic maintenance key recovery.
AMOS Config server tool is remotely executed on the target AMOS host, so make sure WinRM is well
configured regarding Java Memory consumption.
Logshipping Scripts
The scripts used for log shipping are called logship_full.ps1 and logship_inc.ps1. They are usually called
automatically by the full and incremental backup scripts but can also be used manually. They copy a set of backup
files to a remote server and load them into the target database. A configuration file (by default etc/logship.cfg.ps1)
and the toolbox files toolbox.ps1 and sybase_toolbox.ps1 are required by these scripts.
Usage
The scripts syntax is:
logship_full.ps1 [-CheckConfig [$true|$false] | -Help [$true|$false] | -ConfigFile <config
file> ] | -LogshipInit [$true|$false] | -FileNames "<backup file1>","<backup file2>",...
logship_inc.ps1 [-CheckConfig [$true|$false] | -Help [$true|$false] | -ConfigFile <config file>
]
Without the option –ConfigFile the script uses the configuration file etc/logship.cfg.ps1.
Options:
-CheckConfig : let the script check the configuration only. No file is transferred.
-Help : shows the usage
-ConfigFile file : the script uses file as configuration file. Without this option the file etc/logship.cfg
is used by default.
-LogshipInit: force to reload the remote database
-FileNames "<backup file1>","<backup file2>" : all database backup files to be reloaded in the
remote database.
The required toolbox files need to be located in the same directory as the script itself.
Configuration Parameters
Parameter Description
SWISS-AS.COM
71/167
SHIP_LOG_RETENTION_DAYS Amount of days (n * 24h) log files shall be stored prior to deletion.
SHIP_DUMP_PASSWORD Defines the password used to decrypt the dump. If empty, assuming the dump
is not encrypted.
SWISS-AS.COM
72/167
System Requirements
The Windows user that runs the recovery script needs to have the correct permissions on the required files and
directories (including remote ones).
SWISS-AS.COM
73/167
Installing Oracle
General Note
Generally, the responsibility of the technical database support lies with the customer. Support within the following
areas of Oracle database administration will not be provided by Swiss-AS on standard support services, but can be
requested on an individual basis via RfS:
SWISS-AS.COM
74/167
1. a privileged user for AMOS server connections. This user's schema will be used to store AMOS tables.
Privileges are defined in a database role that will be granted to
this user. When using multiple AMOS instances, all privileged database users can be granted the same role.
2. an unprivileged user for common AMOS user connection.
The database role and the users have to be created on the database level. Both users have to be registered
afterwards in the amos_config_server command line tool (Menu 7 – Set database user for AMOS server). During
the registration all the required table permissions will be granted to the unprivileged user. Do not grant rights directly
to a user, but always to the appropriate role. Compare the following scripts.
--AMOS_SERVER_R
--Grant user operations
GRANT CREATE USER TO "AMOS_SERVER_R";
GRANT ALTER USER TO "AMOS_SERVER_R";
GRANT DROP USER TO "AMOS_SERVER_R";
GRANT ALTER SESSION TO "AMOS_SERVER_R" WITH ADMIN OPTION;
GRANT CREATE SESSION TO "AMOS_SERVER_R" WITH ADMIN OPTION;
GRANT ANALYZE ANY TO "AMOS_SERVER_R";
--Grant create database objects
GRANT CREATE TABLE TO "AMOS_SERVER_R";
GRANT CREATE TRIGGER TO "AMOS_SERVER_R";
GRANT CREATE ROLE TO "AMOS_SERVER_R";
GRANT CREATE PROCEDURE TO "AMOS_SERVER_R";
GRANT CREATE SEQUENCE TO "AMOS_SERVER_R";
GRANT CREATE JOB TO "AMOS_SERVER_R";
--GRANT tuning information
GRANT ADVISOR TO "AMOS_SERVER_R";
GRANT ADMINISTER SQL TUNING SET TO "AMOS_SERVER_R";
GRANT SELECT ANY DICTIONARY TO "AMOS_SERVER_R";
GRANT MANAGE SCHEDULER TO "AMOS_SERVER_R";
GRANT MANAGE ANY QUEUE TO "AMOS_SERVER_R";
GRANT GATHER_SYSTEM_STATISTICS TO "AMOS_SERVER_R";
SWISS-AS.COM
75/167
SWISS-AS.COM
76/167
--Example:
CREATE USER "AMOS_PRIV_U" IDENTIFIED BY "AMOS_PRIV_PW" DEFAULT TABLESPACE "AMOSDAT" TEMPORARY TABLESPACE
"TEMP";
GRANT UNLIMITED TABLESPACE TO "AMOS_PRIV_U";
GRANT "AMOS_SERVER_R" TO "AMOS_PRIV_U";
GRANT CONNECT TO "AMOS_PRIV_U";
--Example:
CREATE USER "AMOS_UNPRIV_U" IDENTIFIED BY "AMOS_UNPRIV_PW" DEFAULT TABLESPACE "AMOSDAT" TEMPORARY TABLESPACE
"TEMP";
GRANT CONNECT TO "AMOS_UNPRIV_U";
GRANT "AMOS_USER_R" TO "AMOS_UNPRIV_U";
One option could be to include the AMOS environment name in the database user's name as every AMOS instance
uses separate database users. Another would be to give each DB Service name an environment distinguisher.
Oracle Parameters
SWISS-AS.COM
77/167
SWISS-AS.COM
78/167
Installing PostgreSQL
General Note
Generally, the responsibility of the technical database support lies with the customer. Support within the following
areas of PostgreSQL database administration will not be provided by Swiss-AS on standard support services, but
can be requested on an individual basis via RfS:
SWISS-AS.COM
79/167
PostgreSQL Configuration
1. a privileged user for AMOS server connections. This user will own all AMOS database objects.
2. an unprivileged user for common AMOS user connection.
The database users can be created as part as the database wizard available from AMOS 19.6. More information
can be found in AMOS Server Installation.
PostgreSQL Parameters
Refer to the Database Standards documentation for details.
SWISS-AS.COM
80/167
SWISS-AS.COM
81/167
Introduction
Swiss-AS provides shell scripts for the backup and recovery of PostgreSQL databases used by AMOS. The scripts
configuration needs to be adapted to the customer's AMOS environment so that they can be used either manually
or scheduled via the task scheduler. All scripts make use of a configuration file that stores all required parameters
and a so called toolboxes which are files that define particular functions. Usually, only the configuration files need to
be changed by the customer in order to get the script running.
The latest version of the backup and recovery scripts can be downloaded via the Swiss AS customer portal.
General Notes
Predefined Configuration files : each script requires a specific set of parameters stored in a configuration file.
A template of each of the four configuration files (basebackup.cfg, recovery.cfg, dump.cfg and restore.cfg) is
provided together with the basebackup, recovery, dump and restore scripts and the toolbox files.
General Toolbox : the toolbox file pg_toolbox.sh defines generic functions used in the backup and recovery
scripts. By default the toolbox file is located in the same directory as the corresponding script.
PostgreSQL Toolbox : the toolbox file pg_toolbox_postgres.sh defines PostgreSQL specific functions used in
the backup and recovery scripts. By default the toolbox file is located in the same directory as the
corresponding script.
Introduction
General Notes
Dump script
Function
Usage
Configuration Parameters
System Requirements
Restore script
Function
Usage
Configuration Parameters
System Requirements
Basebackup script
Function
Usage
Configuration Parameters
System Requirements
Recovery script
Function
Usage
Configuration Parameters
System Requirements
SWISS-AS.COM
82/167
Dump script
The script to create database dump is called pg_dump.sh. It creates a set of backup files of one or more user
databases and all system databases of a given PostgreSQL instance.
A configuration file (by default etc/dump.cfg) and the toolbox files pg_toolbox.sh and pg_toolbox_postgres.sh
are required by those scripts.
Function
Dump script provides the following features:
Usage
The scripts syntax is:
pg_dump.sh [-c | -h | -f <config file>]
Without the option -f the script uses the configuration file etc/dump.cfg.
Options:
-c : let the script check the configuration only. No backup set is created.
-h : shows the usage
-f <config file> : the script uses <config file> as configuration file. Without this option the file etc/dump.cfg is
used by default.
The required toolbox files (pg_toolbox.sh and pg_toolbox_postgres.sh) need to be located in the same directory as
the script itself.
Configuration Parameters
The script requires the following configuration parameters that need to be defined in the script's configuration file.
Parameter Description
SWISS-AS.COM
83/167
RETENTION_DAYS Amount of days (n * 24h) backup sets shall be stored prior to deletion.
ATTENTION : increasing this value will cause more load on the server.
RECOVER_LOCKFILE Name of the recovery lockfile (to check if a load of the database is being
processed).
System Requirements
The user that runs the backup script needs to have the correct permissions on the required files and directories.
You should execute the script using the postgres login.
Restore script
SWISS-AS.COM
84/167
The script to restore a database from a database backup is called pg_restore.sh. The backup can be either a
dump created by pg_dump.sh, or a backup stored in a pgBackRest repository.
It loads a database backup into a user database of a given PostgreSQL instance.
Additionally it remaps the AMOS users and restarts the corresponding AMOS server to enforce the reactivation of
the AMOS maintenance key.
A configuration file (by default etc/restore.cfg) and the toolbox files pg_toolbox.sh and pg_toolbox_postgres.sh
are required by this script.
Function
The script provides the following features:
Usage
The scripts syntax is:
pg_restore.sh [-c | -h | -f <config file> ]
Without the option -f the script uses the configuration file etc/restore.cfg.
Options:
The required toolbox files need to be located in the same directory as the script itself.
Configuration Parameters
The script requires the following configuration parameters that need to be defined in the script's configuration file.
Parameter Description
SWISS-AS.COM
85/167
RECOVER_
POSTGRES
_ENV
SWISS-AS.COM
86/167
KEEP_KEY If it is set to "Y", the environment which is recovered will keep its keystore. [ Y / N ] DEFAULT : N
STORE
Deprecated from AMOS 21.6. Ignored if KEEP_CONFIG is enabled.
There will be one file per version and environment. Each time the script is executed it will export
the configuration of the environment for the environment version. If the file already exists it will be
overwritten. Filename: <db_name>_<version>_export_config.zip
The initial export for an environment and a version will be archived/persisted to another filename
(to prevent it from being overwritten). Filename:
initial_save_<db_name>_<version>_export_config.zip
Be sure to put the configs in quotation marks and separate them with only a comma (e.g.,
"KEYSTORE,WEBSERVICE_CONFIG").
SWISS-AS.COM
87/167
USER_AND_LICENCES
PARAMETERS
KEYSTORE
CUSTOMIZE_APPLICATIONS
WEBSERVICE_CONFIG
FORM_CONFIGURATION
CLEANUP_JOBS
AIM_CONFIGURATION
WORKFLOW_CONFIGURATION
SCHEDULED_TASKS
KEEP_PRIN Defines if the environment which is recovered will keep its printers settings. [ Y / N ] DEFAULT: N
TERS_SET
TINGS
POST_SCRI A script that will be triggered after the database has been loaded, before AMOS is restarted
PT
SYNC_WEB Defines if AMOS webdrive will be copied from source to target. [ Y / N ] DEFAULT : N
DRIVE
ATTENTION : this will cause the target webdrive to be overwritten
IGNORE_IN Defines whether the indexes must be restored in the dedicated tablespace [Y / N]. DEFAULT: N
DEX_TABL
ESPACE
BACKUP_L Name of the backup lockfile (to check if a backup of the database is processing).
OCKFILE
Must be the same as defined in dump.cfg
System Requirements
The user that runs the recovery script needs to have the correct permissions on the required files and
directories (including remote ones, see ssh-keygen for details).
You should execute the script using the postgres login.
The AMOS maintenance key on the target AMOS instance has to be backed up previously in order to allow
automatic maintenance key recovery.
Basebackup script
The script to create database basebackups is called pg_basebackup.sh. This full backup is used to take base
backups of a running PostgreSQL database cluster. These are taken without affecting other clients to the database,
and can be used both for point-in-time recovery and as the starting point for a log shipping or streaming replication
SWISS-AS.COM
88/167
standby servers. For more information about such PostgreSQL features, please refer to the official documentation ht
tps://www.postgresql.org/docs/current/continuous-archiving.html and https://www.postgresql.org/docs/current/warm-
standby.html.
pg_basebackup makes a binary copy of the database cluster files, while making sure the system is put in and out of
backup mode automatically. Backups are always taken of the entire database cluster; it is not possible to back up
individual databases or database objects. For individual database backups, a tool such as pg_dump must be used.
A configuration file (by default etc/basebackup.cfg) and the toolbox files pg_toolbox.sh and pg_toolbox_postgre
s.sh are required by those scripts.
Function
Basebackup script provides the following features:
Usage
The scripts syntax is:
pg_basebackup.sh [-c | -h | -f <config file>]
Without the option -f the script uses the configuration file etc/basebackup.cfg.
Options:
-c : let the script check the configuration only. No backup set is created.
-h : shows the usage
-f <config file> : the script uses <config file> as configuration file. Without this option the file etc/basebackup.
cfg is used by default.
The required toolbox files (pg_toolbox.sh and pg_toolbox_postgres.sh) need to be located in the same directory as
the script itself.
Configuration Parameters
The script requires the following configuration parameters that need to be defined in the script's configuration file.
Parameter Description
SWISS-AS.COM
89/167
RETENTION_DAYS amount of days (n * 24h) backup sets shall be stored prior to deletion.
Must be greater than 0
System Requirements
The user that runs the backup script needs to have the correct permissions on the required files and directories.
You should execute the script using the postgres login.
pigz and bc commands must be installed to use the parallelized backup, from PostgreSQL 10 onwards.
Recovery script
The script to restore a database from a basebackup is called pg_recover.sh. It recreates a complete PostgreSQL
instance from a backup taken with pg_basebackup.
SWISS-AS.COM
90/167
Depending on the use case, it also remaps the AMOS users and restarts the corresponding AMOS server to
enforce the reactivation of the AMOS maintenance key
A configuration file (by default etc/recovery.cfg) and the toolbox files pg_toolbox.sh and pg_toolbox_postgres.
sh are required by this script.
Function
The script provides the following features:
it recreates a complete PostgreSQL instance from a basebackup (typically created by pg_basebackup script)
Replay WAL until a specified time given as a parameter
Database users are remapped as per AMOS configuration.
AMOS workflows are disabled and AIM config is deleted
the AMOS masterkey file is copied from the source to the target AMOS server
the target AMOS servers are previously stopped and restarted at the end to enforce the recovery of the
AMOS maintenance key from local maintenance key backup
allows to trigger pre- and post-scripts for further customization
the script prevents multiple simultaneous executions
performs check of the configuration parameters before creating backup sets
creates and archives a log file for each run
Usage
The scripts syntax is:
pg_recover.sh [-c | -h | -f <config file> ]
Without the option –f the script uses the configuration file etc/recovery.cfg.
Options:
The required toolbox files need to be located in the same directory as the script itself.
Configuration Parameters
The script requires the following configuration parameters that need to be defined in the script's configuration file.
Parameter Description
SWISS-AS.COM
91/167
RECOVER_DIR_WAL The directory where are located the incremental backups to be loaded after
the full dump
RECOVER_SAVE_DIR The save directory where to backup the postgres instance (to recover in
case of problem)
System Requirements
The user that runs the recovery script needs to have the correct permissions on the required files and
directories (including remote ones
see ssh-keygen for details).
You should execute the script using the postgres login.
The AMOS maintenance key on the target AMOS instance has to be backed up previously in order to allow
automatic maintenance key recovery.
SWISS-AS.COM
92/167
SWISS-AS.COM
93/167
Introduction
Swiss-AS provides powershell scripts for the backup and recovery of PostgreSQL databases used by AMOS. The
scripts configuration needs to be adapted to the customer's AMOS environment so that they can be used either
manually or scheduled via the task scheduler. All scripts make use of a configuration file that stores all required
parameters and a so called toolboxes which are files that define particular functions. Usually, only the configuration
files need to be changed by the customer in order to get the script running.
The latest version of the backup and recovery scripts can be downloaded via the Swiss AS customer portal.
General Notes
Predefined Configuration files : each script requires a specific set of parameters stored in a configuration file.
A template of each of the four configuration files (basebackup.cfg.ps1, recovery.cfg.ps1, dump.cfg.ps1 and
restore.cfg.ps1) is provided together with the basebackup, recovery, dump and restore scripts and the
toolbox files.
General Toolbox : the toolbox file pg_toolbox.ps1 defines generic functions used in the backup and recovery
scripts. By default the toolbox file is located in the same directory as the corresponding script.
PostgreSQL Toolbox : the toolbox file pg_toolbox_postgres.ps1 defines PostgreSQL specific functions used
in the backup and recovery scripts. By default the toolbox file is located in the same directory as the
corresponding script.
Powershell execution policy : to be able to run powershell scripts on a host, the execution policy needs to be
adjusted (see Set-ExecutionPolicy command). It is possible the change the policy to the whole server or only
for one script execution (see ByPass execution policy)
Introduction
General Notes
Dump script
Function
Usage
Configuration Parameters
System Requirements
Restore script
Function
Usage
Configuration Parameters
System Requirements
Basebackup script
Function
Usage
Configuration Parameters
System Requirements
Recovery script (Beta only)
Function
Usage
Configuration Parameters
System Requirements
SWISS-AS.COM
94/167
Dump script
The script to create database dump is called pg_dump.ps1. It creates a set of backup files of one or more user
databases and all system databases of a given PostgreSQL instance.
A configuration file (by default etc/dump.cfg.ps1) and the toolbox files pg_toolbox.ps1 and pg_toolbox_postgres.
ps1 are required by those scripts.
Function
Dump script provides the following features:
Usage
The scripts syntax is:
pg_dump.ps1 [-CheckConfig [$true|$false] | -Help [$true|$false] | -ConfigFile <config file>]
Without the option –ConfigFile the script uses the configuration file etc/dump.cfg.ps1.
Options:
-CheckConfig : let the script check the configuration only. No backup set is created.
-Help : shows the usage
-ConfigFile file : the script uses file as configuration file. Without this option the file etc/dump.cfg.ps1 is used
by default.
The required toolbox files need to be located in the same directory as the script itself.
Configuration Parameters
The script requires the following configuration parameters that need to be defined in the script's configuration file.
Parameter Description
PGPASSFILE Path to the password file. Needs to be readable by the user who executes the
script.
SWISS-AS.COM
95/167
RETENTION_DAYS Amount of days (n * 24h) backup sets shall be stored prior to deletion.
GLOBALS_BACKUP Perform also a dump of global objects (roles and tablespaces), no databases.
DEFAULT: $true
RECOVER_LOCKFILE Name of the recovery lockfile (to check if a load of the database is processing).
INFORMATION_FOLDER Folder where the AMOS information files are located. See "server1.info.cfg"
config file for further information
DATABASE_BACKUP_MO Enable the backup monitoring in AMOS Control Centre (APN2137 ). Default: $true
NITORING
System Requirements
The Windows user that runs the backup script needs to have the correct permissions on the required files and
directories.
SWISS-AS.COM
96/167
Restore script
The script to recover a database from a full backup is called pg_restore.ps1. It loads a database dump into a user
database of a given PostgreSQL instance. Additionally it remaps the AMOS users and restarts the corresponding
AMOS server to enforce the reactivation of the AMOS maintenance key. A configuration file (by default etc/restore.
cfg.ps1) and the toolbox files pg_toolbox.ps1 and pg_toolbox_sybase.ps1 are required by this script.
Function
The script provides the following features:
Usage
The scripts syntax is:
pg_restore.ps1 [-CheckConfig [$true|$false] | -Help [$true|$false] | -ConfigFile <config file> ]
Without the option –ConfigFile the script uses the configuration file etc/restore.cfg.ps1.
Options:
-CheckConfig : let the script check the configuration only. No backup set is created.
-Help : shows the usage
-ConfigFile file : the script uses file as configuration file. Without this option the file etc/restore.cfg.ps1 is used
by default.
The required toolbox files need to be located in the same directory as the script itself.
Configuration Parameters
The script requires the following configuration parameters that need to be defined in the script's configuration file.
Parameter Description
SWISS-AS.COM
97/167
PGPASSFI Path to the password file. Needs to be readable by the user who executes the script.
LE
See https://www.postgresql.org/docs/current/libpq-pgpass.html for more information
OVERWRI Overwrites last session log file or keep it and appends. DEFAULT: $true
TE_LOGFI
LE
RECOVER
_AMOS
SWISS-AS.COM
98/167
VERBOSE All restore information are displayed. [$true / $false]. DEFAULT : $false
DISABLE_ Defines if AMOS workflows need to be disabled. [$true / $false]. DEFAULT : $true
WORKFLO
WS
DISABLE_ Defines if AIM configuration needs to be disabled. [$true / $false], DEFAULT : $true
AIM_CONF
IG
KEEP_KE Defines if the environment which is recovered will keep its keystore. [$true / $false]. DEFAULT:
YSTORE $false
This feature shall not be used in case the source and target AMOS environment are on different
versions
There will be one file per version and environment. Each time the script is executed it will export
the configuration of the environment for the environment version. If the file already exists it will be
overwritten. Filename: <db_name>_<version>_export_config.zip
The initial export for an environment and a version will be archived/persisted to another filename
(to prevent it from being overwritten). Filename: initial_save_<db_name>_<version>_export_config.
zip
Be sure to put the configs in quotation marks and separate them with only a comma (e.g.,
"KEYSTORE,WEBSERVICE_CONFIG").
SWISS-AS.COM
99/167
USER_AND_LICENCES
PARAMETERS
KEYSTORE
CUSTOMIZE_APPLICATIONS
WEBSERVICE_CONFIG
FORM_CONFIGURATION
CLEANUP_JOBS
AIM_CONFIGURATION
WORKFLOW_CONFIGURATION
SCHEDULED_TASKS
POST_SC A script that will be triggered after the database has been loaded, before AMOS is restarted
RIPT
IGNORE_I Defines whether the indexes must be restored in the dedicated tablespace [$true/$false].
NDEX_TA DEFAULT: $false
BLESPACE
BACKUP_L Name of the backup lockfile (to check if a backup of the database is processing).
OCKFILE
Must be the same as defined in dump.cfg.ps1
System Requirements
The Windows user that runs the recovery script needs to have the correct permissions on the required files
and directories (including remote ones).
The AMOS maintenance key on the target AMOS instance has to be backed up previously in order to allow
automatic maintenance key recovery.
Basebackup script
The script to create database basebackups is called pg_basebackup.sh. This full backup is used to take base
backups of a running PostgreSQL database cluster. These are taken without affecting other clients to the database,
and can be used both for point-in-time recovery and as the starting point for a log shipping or streaming replication
standby servers. For more information about such PostgreSQL features, please refer to the official documentation ht
tps://www.postgresql.org/docs/current/continuous-archiving.html and https://www.postgresql.org/docs/current/warm-
standby.html.
pg_basebackup makes a binary copy of the database cluster files, while making sure the system is put in and out of
backup mode automatically. Backups are always taken of the entire database cluster; it is not possible to back up
individual databases or database objects. For individual database backups, a tool such as pg_dump must be used.
A configuration file (by default etc/basebackup.cfg.ps1) and the toolbox files pg_toolbox.ps1 and pg_toolbox_po
stgres.ps1 are required by those scripts.
SWISS-AS.COM
100/167
Function
Basebackup script provides the following features:
Usage
The scripts syntax is:
pg_basebackup.ps1 [-CheckConfig [$true|$false] | -Help [$true|$false] | -ConfigFile <config file>]
Without the option -ConfigFile the script uses the configuration file etc/basebackup.cfg.ps1.
Options:
-CheckConfig : let the script check the configuration only. No backup set is created.
-Help : shows the usage
-ConfigFile file : the script uses file as configuration file. Without this option the file etc/basebackup.cfg.ps1 is
used by default.
The required toolbox files (pg_toolbox.ps1 and pg_toolbox_postgres.ps1) need to be located in the same directory
as the script itself.
Configuration Parameters
The script requires the following configuration parameters that need to be defined in the script's configuration file.
Parameter Description
PGPASSFILE Path to the password file. Needs to be readable by the user who executes the script.
SWISS-AS.COM
101/167
RETENTION_DAYS amount of days (n * 24h) backup sets shall be stored prior to deletion.
Must be greater than 0
System Requirements
The Windows user that runs the backup script needs to have the correct permissions on the required files and
directories.
Depending on the use case, it also remaps the AMOS users and restarts the corresponding AMOS server to
enforce the reactivation of the AMOS maintenance key.
Check the official documentation for more information about PostgreSQL recovery https://www.postgresql.org/docs
/current/continuous-archiving.html
A configuration file (by default etc/recovery.cfg.ps1) and the toolbox files pg_toolbox.ps1 and pg_toolbox_postg
res.ps1 are required by this script.
Function
The script provides the following features:
it recreates a complete PostgreSQL instance from a basebackup (typically created by pg_basebackup script)
Replay WAL until a specified time given as a parameter
SWISS-AS.COM
102/167
Usage
The scripts syntax is:
pg_recover.ps1 [-CheckConfig [$true|$false] | -Help [$true|$false] | -ConfigFile <config file>]
Without the option -ConfigFile the script uses the configuration file etc/basebackup.cfg.ps1.
Options:
-CheckConfig : let the script check the configuration only. No backup set is created.
-Help : shows the usage
-ConfigFile file : the script uses file as configuration file. Without this option the file etc/basebackup.cfg.ps1 is
used by default.
The required toolbox files (pg_toolbox.ps1 and pg_toolbox_postgres.ps1) need to be located in the same directory
as the script itself.
Configuration Parameters
The script requires the following configuration parameters that need to be defined in the script's configuration file.
Parameter Description
PGPASSFILE Path to the password file. Needs to be readable by the user who
executes the script.
SWISS-AS.COM
103/167
RECOVER_DIR_WAL The directory where are located the incremental backups to be loaded
after the full dump
RECOVER_SAVE_DIR The save directory where to backup the postgres instance (to recover
in case of problem)
RECOVER_COPYFROM_AMOS_BAS
E_LOCAL
System Requirements
The Windows user that runs the recovery script needs to have the correct permissions on the required files
and directories (including remote ones).
The AMOS maintenance key on the target AMOS instance has to be backed up previously in order to allow
automatic maintenance key recovery.
SWISS-AS.COM
104/167
AMOS Installation
SWISS-AS.COM
105/167
Unix/Linux
The installation of the AMOS application server needs to be performed as Operating System user 'amos', not as
user 'root'. First, download the stable release file from the customer portal on www.swiss-as.com to the AMOS base
directory /applic. Extract the release file to a new release directory using the command:
cd /<amos base>
tar –xzf <release file>
For example:
cd /applic
tar –xzf amos-stable_19.12.1.tgz
Then rename the newly created release directory to an AMOS server directory. The recommended name
convention for AMOS server directories is: amos_<environment name>. To rename, use command:
mv <release directory> <server directory>
For example:
mv amos-stable_19.12.1 amos_prod
Windows
The installation of the AMOS application server needs to be performed by a member of the local administrator
group. The username is free configurable, e.g. 'amos'. First download the stable release file from the customer
portal on www.swiss-as.com to the AMOS base directory e.g. D:\applic. There extract the release file to a new
release directory using 7-zip. Then run the following provided script, to extract the file(s) automatically on the
command line (cmd.exe):
For example:
"C:\Program Files\7-Zip\7z.exe" e amos-stable_19.12.1.tgz -so | "C:\Program Files\7-Zip\7z.exe" x -si -ttar
Then rename the newly created release directory to an AMOS server directory. The recommended name
convention for AMOS server directories is: amos_<environment name>. To rename, use command:
move <release directory> <server directory>
SWISS-AS.COM
106/167
For example:
move amos-stable_19.12.1 amos_prod
SWISS-AS.COM
107/167
If no configuration exists yet for the AMOS server (e.g. during an installation from scratch), the installation wizard is
started automatically:
Start the Installation Wizard: if the database is already created and only the AMOS Application server needs
to be installed.
Start the database Wizard: this wizard will install both the database objects and AMOS afterwards. This
wizard is available for ASE , PostgreSQL and Oracle . The steps are described more in details in the
following sections, depending on the DBMS and platform used.
You can press “Insert” at any time to display the help pop-up in order to find more information about all fields.
SWISS-AS.COM
108/167
cd <server directory>/scripts
./amos_config_server
For example:
cd /applic/amos_prod/scripts
./amos_config_server
The following is the step by step demonstration of how set up is done using automatic execution of sql script :
Database setup:
SWISS-AS.COM
109/167
This starts a wizard which generates an SQL script. This script can be used to set up the following database objects
in Oracle:
The script can be either executed directly from within the amos_config_server wizard or using a separate SQL*Plus
session.
Note that when executing the script using SQL*Plus, the directories of the tablespaces need to exist and their
permissions need be set correctly before executing the SQL script.
The script can be executed using SQL*Plus as user sys like in the following example:
SQL > @{path}{file}(setupDb.sql)
SWISS-AS.COM
110/167
Logical Configuration Database support: Oracle 19c - 19.x.0.0 Database Single Instance :
SWISS-AS.COM
111/167
SWISS-AS.COM
112/167
Physical configuration
Diskgroup : +DATA
SWISS-AS.COM
113/167
Diskgroup : +DATA
SWISS-AS.COM
114/167
User Configuration
Confoguration validation :
SWISS-AS.COM
115/167
Script Generation
SWISS-AS.COM
116/167
After successful set up of the AMOS database, the wizard allows you to set up the table structure required by
AMOS using the database initialisation procedure.
SWISS-AS.COM
117/167
Database Initialisation:
SWISS-AS.COM
118/167
SWISS-AS.COM
119/167
SWISS-AS.COM
120/167
SWISS-AS.COM
121/167
The initial database configuration needs to be carried out first. This is done using the amos_config_server
command line tool located in AMOS server's scripts subdirectory. Change to that directory and run the
amos_config_server.bat administrator's permission.
Run the amos_config_server command line tool on Windows as administrator. If this requirement is not
met, the installation of the AMOS windows service will fail.
This starts a wizard which generates an SQL script. This script can be used to set up the following database objects
in Oracle:
The script can be either executed directly from within the amos_config_server command line tool or using a
separate SQLplus session.
SWISS-AS.COM
122/167
Note that when executing the script using Sqlplus, the directories of the tablespaces need to exist and their
permissions need be set correctly before executing the SQL script.
The script can be executed using SQLplus as user sys as sysdba like in the following example:
SQL > @{path}{file}(setupDb.sql)
The following is the step by step demonstration of how set up is done using automatic execution of sql script :
Database setup:
SWISS-AS.COM
123/167
Logical Configuration Database support: Oracle 19c - 19.x.0.0 Database Single Instance :
SWISS-AS.COM
124/167
SWISS-AS.COM
125/167
SWISS-AS.COM
126/167
Physical configuration
SWISS-AS.COM
127/167
User Configuration
SWISS-AS.COM
128/167
Confoguration validation :
SWISS-AS.COM
129/167
Script Generation
SWISS-AS.COM
130/167
After successful set up of the AMOS database, the wizard allows you to set up the table structure required by
AMOS using the database initialisation procedure.
SWISS-AS.COM
131/167
Database Initialisation:
SWISS-AS.COM
132/167
SWISS-AS.COM
133/167
SWISS-AS.COM
134/167
cd <server directory>/scripts
./amos_config_server --setupDatabase
For example:
cd /applic/amos_prod/scripts
./amos_config_server --setupDatabase
This starts a wizard which generates an SQL script. This script can be used to set up the following database objects
in PostgreSQL:
The script can be either executed directly from within the amos_config_server command line tool or using a
separate psql session.
Note that when executing the script using psql, the directories of the tablespaces need to exist and their
permissions need be set correctly before executing the SQL script.
The script can be executed using psql as user postgres like in the following example:
psql -U postgres -f setupDb.sql
Physical configuration
Data tablespace type: Data
Data tablespace name: amos_prod_data
Data tablespace location: /data/pg_amos_prod_data
SWISS-AS.COM
135/167
User Configuration
Privileged user: amosserver_prod
Privileged password: <your password>
Unprivileged user: amosuser_prod
Unprivileged password: <your password>
Script Generation
Script destination: <location of the SQL script>
After successful set up of the AMOS database, the wizard allows you to set up the table structure required by
AMOS using the database initialisation procedure.
SWISS-AS.COM
136/167
The initial database configuration needs to be carried out first. This is done using the amos_config_server
command line tool located in AMOS server's scripts subdirectory. Change to that directory and run the
amos_config_server.bat administrator's permission.
Run the amos_config_server command line tool on Windows as administrator. If this requirement is not
met, the installation of the AMOS windows service will fail.
This starts a wizard which generates an SQL script. This script can be used to set up the following database objects
in PostgreSQL:
The script can be either executed directly from within the amos_config_server command line tool or using a
separate psql session.
SWISS-AS.COM
137/167
Note that when executing the script using psql, the directories of the tablespaces need to exist and their
permissions need be set correctly before executing the SQL script.
The script can be executed using psql as user postgres like in the following example:
psql -U postgres -f setupDb.sql
Physical configuration
Data tablespace type: Data
Data tablespace name: amos_prod_data
Data tablespace location: E:\data\pg_amos_prod_data
Index tablespace type: Index
Index tablespace name: amos_prod_index
Index tablespace location: E:\data\pg_amos_prod_index
User Configuration
Privileged user: amosserver_prod
Privileged password: <your password>
Unprivileged user: amosuser_prod
Unprivileged password: <your password>
Script Generation
Script destination: <location of the SQL script>
After successful set up of the AMOS database, the wizard allows you to set up the table structure required by
AMOS using the database initialisation procedure.
SWISS-AS.COM
138/167
For example:
cd /applic/amos_prod/scripts
./amos_config_server --setupDatabase
This starts a wizard which generates an SQL script. This script can be used to set up the following database objects
in SAP ASE:
The script can be either executed directly from within the amos_config_server command line tool or using a
separate psql session.
The script can be executed using psql as user sybase like in the following example:
isql -Usa -i setupDb_prod.sql
Logical Configuration
Database support: SAP ASE 16.0
Database hostname: localhost, <DB server IP> or <DB server hostname>
Database port: 5000
Database name: prod
SWISS-AS.COM
139/167
Physical configuration
Device type: Data
Device name: prod_data1
Device location: /data/amos/prod_data1.dat
Device size: 20000M
User Configuration
Privileged user: amosserver_prod
Privileged password: <your password>
Unprivileged user: amosuser_prod
Unprivileged password: <your password>
Script Generation
Script destination: <location of the SQL script>
After successful set up of the AMOS database, the wizard allows you to set up the table structure required by
AMOS using the database initialisation procedure.
SWISS-AS.COM
140/167
The initial database configuration needs to be carried out first. This is done using the amos_config_server
command line tool located in AMOS server's scripts subdiretory. Change to that directory and run the
amos_config_server.bat administrator's permission.
Run the amos_config_server command line tool on Windows as administrator. If this requirement is not
met, the installation of the AMOS windows service will fail.
This starts a wizard which generates an SQL script. This script can be used to set up the following database objects
in SAP ASE:
The script can be either executed directly from within the amos_config_server command line tool or using a
separate psql session.
The script can be executed using psql as user sybase like in the following example:
SWISS-AS.COM
141/167
Logical Configuration
Database support: SAP ASE 16.0
Database hostname: localhost, <DB server IP> or <DB server hostname>
Database port: 5000
Database name: prod
Physical configuration
Device type: Data
Device name: prod_data1
Device location: E:\data\amos\prod_data1.dat
Device size: 20000M
User Configuration
Privileged user: amosserver_prod
Privileged password: <your password>
Unprivileged user: amosuser_prod
Unprivileged password: <your password>
Script Generation
Script destination: <location of the SQL script>
After successful set up of the AMOS database, the wizard allows you to set up the table structure required by
AMOS using the database initialisation procedure.
SWISS-AS.COM
142/167
Linux
Start the application server in Linux using the following commands as Linux user 'amos'.
cd <server directory>
./start_amos
For example:
cd /applic/amos_prod
./start_amos
Windows
SWISS-AS.COM
143/167
AMOS is using the Java and JavaFX technology. Those frameworks are built using Microsoft Visual C++ and they
have dependencies on runtime libraries which must be installed on every PC.
Please make sure that the following Windows packages are installed:
Please note that the above listed packages are language specific and you must download and install the
language matching your Windows installation language.
1. Its two things necessary here. First the extraction that is done via SFX. See here for parameters: https://olegs
cherbakov.github.io/7zSFX/
2. Then the installer is launched. That one has again own parameters: "https://jrsoftware.org/ishelp/"
3. Finally when the installation is done the AMOS client is started automatically to update itself and download
the files.
So to fully suppress any dialogs you first have to tell 7Zip to be silent and then the Inno Setup to be silent.
-y -gm2 are interpreted by 7Zip everything after that one is then for the Inno installer.
Unfortunately this is still not 100% "silent" as the installer will start the AMOS client once it is finished but this is as
far as you can get with this. At least the user does not need to interact with anything.
SWISS-AS.COM
144/167
Customer Code
The AMOS customer code greatly impacts the AMOS behavior:
To change it, open AMOS program Parameter Setup (APN 1442) and choose parameter number 914 "AMOS
CUSTOMER CODE". Enter a valid customer code in the string value, then save and publish the changes. The
customer logo on the AMOS desktop will change automatically.
Keystore
Every AMOS server uses the AMOS key store to store confidential data and certificates. The key store is physically
located in tables in the database: kst_area, kst_cert and kst_key. The key store is encrypted using a master key file
in the application server's cfg directory: e.g. amos_masterkey_prod.cfg (for database prod). The master key file
needs to be backed up together with the database. Without a valid master key file the key store cannot be
opened.
electronic signature
web service authentication
SSL connection for client-server communication
AMOS maintenance key exchange
To reset the key store, truncate the key store tables, remove the master key file and restart the application server
once. This will automatically reinitialize the key store using the master key.
Maintenance Key
Every AMOS instance requires a maintenance key to run in maintained mode. Without a maintenance key, only
admin programs in AMOS are accessible. This maintenance key needs to be requested from Swiss-AS via www.
swiss-as.com either via web service or request file in program Maintenance Key Admin (APN 1500). When
requesting the key from Swiss-AS, the following details regarding the AMOS instance are collected so that the
maintenance key is only valid on this environment:
SWISS-AS.COM
145/167
The AMOS maintenance key expires after 6 months. This means, the administrator regularly needs to request a
new key. If the maintenance key is expired, all programs remain accessible but the AMOS client title text, the
AMOS desktop and AMOS printouts will show the unmaintained mode. AMOS keystore and AMOS maintenance
key need special handling when restoring a database from a backup ! The keystore needs to be accessible in
order to apply the maintenance key, therefore the master key file might have to be copied to the target environment
and renamed to fit the target database name. To reuse a maintenance key of a test environment that has been
overwritten with a production database please make sure to create a backup of the test key once. The
corresponding backup file is stored in the AMOS server's cfg directory and is loaded automatically after a restart of
the application server. This will overwrite the (production) maintenance key that came with the database backup.
SMTP Server
The SMTP server needs to be configured in AMOS APN 10, tabsheet Other Servers. You can enter the IP address
or hostname of your email server and additional parameters if required. The SMTP server will be used for sending
warnings, notifications of certain events or reports directly to the administrator even if the AMOS client is not open
at the moment.
LDAP Authentication
To allow the AMOS user authentication to be performed by an LDAP server, AMOS parameter 1000 needs to be
configured correctly. Please use AMOS APN 1442 to change the authentication path.
SWISS-AS.COM
146/167
After the LDAP server has been configured there, the authentication authority (AMOS server or LDAP) can
configured on a user level in APN 14.
Proxy Settings
SWISS-AS.COM
147/167
The proxy settings of the AMOS server or of the AMOS client need to be configured in AMOS APN 10, tabsheet Oth
er Servers. Dependent on if the connection to the Swiss AS support database is initiated by the application server
or the AMOS client, the corresponding proxy settings can be entered there.
Statistics Module
The collection of statistical data by the AMOS server can be configured in APN 10 in AMOS (Configure Server) on
tabsheet Statistics. This tab is divided into two sections:
Tracking Information: here you can restrict the types of statistical data to be tracked
Warning Levels: here you can advise the statistics programs to send a message if certain warning levels are
reached or a specific event occurs
Statistical values greatly improves the monitoring of the AMOS environment with minimum overhead. APN 156 in
AMOS (Statistic-Analyzer) can be used to view the statistical data.
SWISS-AS.COM
148/167
AMOS Executors
The AMOS executors can be configured in APN 10 in AMOS (Configure Server) on tabsheet AMOS Executors.
This describes the maximum number of parallel worker threads that are used by the AMOS server to perform
background tasks. This number is not per job, but the thread limit is a total for all such jobs. The behaviour can be
monitored on the AMOS Executors tab in APN:10 Configure Server and AMOS Monitoring Executors in APN:2137
AMOS Control Centre.
The Thread limit needs to be adapted according the following settings, depending on the DBMS:
The Thread buffer is used to adapt the maximum amount of update threads depending on the number of online
users. The value should be adapted according the sizing classification (XS, S, M: 50 - L, XL, XXL: 100)
Remark: This settings are not stored in the database but have to be adjusted on each application server.
SWISS-AS.COM
149/167
SWISS-AS.COM
150/167
If you additionally want to enable anonymous access to the client download page you need to configure the access
rights via Admin Roles (APN 15). To implement this, you will need to create a role, grant the appropriate licenses,
and assign this role to WWWGUEST.
SWISS-AS.COM
151/167
Please find the latest list of AMOS scheduler tasks here: http://www.swiss-as.com/amos/taskinfo/TaskOverview.html
Web Drive
In the AMOS web drive huge amounts of binary data like pictures, PDFs and documents can be stored and linked
to data in the database. Therefore it is strongly recommended to provide a dedicated operating system partition for
the web drive. In AMOS APN 10, the administrator can change the location of the web drive directory to an absolute
path in the file system (provided that permissions are correct). It is even possible to use UNC path of a remote file
server. From 21.12 it is not possible to change the webdrive path in APN10 unless the critical_features.cfg file has
been configured. Refer to the AMOS Security Handbook.
SWISS-AS.COM
152/167
SWISS-AS.COM
153/167
System Integration
SWISS-AS.COM
154/167
Introduction
Installation
Example
Options
Templates
Usage
Amos instances
SAP ASE Server
SAP ASE Backup Server
FAQ
Introduction
Swiss-AS provides Linux boot scripts for AMOS (all environments), SAP ASE and ASE backup server. These
scripts can be added to the boot process of the operating system to allow an automatic startup.
They can easily be setup with the setup script setup_boot_scripts.sh.
Note that this solution is based on systemd and therefore is only supported on Linux distributions including this
daemon.
Installation
To install the boot scripts, you need to use the setup script setup_boot_scripts.sh as user root. The whole package
can be downloaded here: http://www.swiss-as.com/amos/download/tools/amos/setup_boot_scripts.tar or as part of
the AMOS release package, under scripts/linux/start_stop.
Parameters can be given to the setup script, by default it will scan the /applic directory and check installed AMOS
and ASE instances.
Example
In the below example, the setup script found two AMOS instances (prod and test), SAP ASE and ASE backup
server.
[root@sas-srv-opslinase02 start_stop]# ./setup_boot_scripts.sh
|
SYBASE
|-- ASE installation found in:
| /applic/sap_ase
| Please choose one (default /applic/sap_ase):
|-- Password file for ASE (default /applic/sap_ase/.syb_passwd):
|-- SAP ASE
| Install unit file for ASE? [Y/N] (N): Y
| Unit file for ASE installed.
|-- SAP ASE BS
| Install unit file for ASE BS? [Y/N] (N): Y
| Unit file for ASE BS installed.
|-- Sudoers
| sybase user added in sudoers.
SWISS-AS.COM
155/167
AMOS
|-- amos_preview instance found
| Install unit file for amos_preview? [Y/N] (N): Y
| Unit file for amos_preview installed.
|-- amos_prod instance found
| Install unit file for amos_prod? [Y/N] (N): Y
| Unit file for amos_prod installed.
|-- Sudoers
| amos user added in sudoers.
|-- Start amos_preview instance? [Y/N] (N): Y
| amos_preview.service started
|-- Start amos_prod instance? [Y/N] (N): Y
| amos_prod.service started
|
BYE BYE...
[root@sas-srv-opslinase02 start_stop]#
Options
Usage: setup_boot_scripts.sh [-c|-d <dir>|-f|-h|-s] -- Installs AMOS and ASE boot scripts
Without the -d option the default application folder (where the script will check the installations) is /applic.
Options:
Templates
The script setup_boot_scripts.sh uses three templates files that need to be present in the same directory as
itself.
The template files are automatically copied and modified by the script setup_boot_scripts.sh.
Usage
Amos instances
Start amos_prod
SWISS-AS.COM
156/167
Stop amos_prod
SWISS-AS.COM
157/167
SWISS-AS.COM
158/167
May 23 20:37:40 sas-srv-opslinase02.swiss-as.com systemd[1]: Starting SAP ASE 16 backup server AMOS_BS...
May 23 20:37:40 sas-srv-opslinase02.swiss-as.com systemd[1]: Started SAP ASE 16 backup server AMOS_BS.
FAQ
Where can I download these scripts? http://www.swiss-as.com/amos/download/tools/amos
/setup_boot_scripts.tar
How can I remove the installed boot scripts? setup_boot_scripts.sh -c
How can I force the setup script to reinstall the boot scripts? setup_boot_scripts.sh -f
How can I show the installed boot scripts? setup_boot_scripts.sh -s
Am I obligated to use "sudo" before the commands? Yes, the boot scripts add/remove locks on the system.
Only root is allowed to do this.
Is there a minimal AMOS version to use these boot scripts? Yes, AMOS 10.80.
The Sybase and AMOS users are added to the sudoers. Can they run other commands as root? No, they
can only run there specific boot scripts. See /etc/sudoers.d/amos and /etc/sudoers.d/sybase for details.
SWISS-AS.COM
159/167
SWISS-AS.COM
160/167
SWISS-AS.COM
161/167
Generate a user called 'AMOSServiceUser' with the rights to start and stop Windows services and to log on
as a service. If choosing a different 'Service User' name as the default value 'AMOSServiceUser', a user
must be generated with this name instead.
This 'Service User' can be used, and it is strongly recommended to do so, for all installed services. Otherwise it can
become complex to install and uninstall different AMOS Windows services under different 'Service Users'.
SWISS-AS.COM
162/167
Give to the 'AMOSServiceUser' user 'full control' rights on the folder 'D:\applic'.
If there was generated a different ''Service User' than the 'AMOSServiceUser' user, the rights on the 'D:\applic'
folder must be given to this user. If AMOS was installed into a different directory than 'D:\applic', the 'full control'
rights must be given to that directory.
SWISS-AS.COM
163/167
Service Configuration
After the requirements are made, the usage of the AMOS Windows service is very easy. By a right-click on the file '
%AMOS_INSTALLDIR%\scripts\amos_config_server.bat' and run as administrator the general configuration utility
for the corresponding AMOS Server is starting. Note that the administrator permission is only required in order to
install or uninstall the service. Patch and release upgrades from 19.12 on will not required highest privileges
anymore.
By choosing submenu 'Home > Configuration > Server configuration > Windows service' the general menu for using
the AMOS Windows service is opened.
SWISS-AS.COM
164/167
The 'Service User' name, domain and its password must be provided. If a local 'Service User' is used, in the prompt
for the domain a dot '.' must be used (local is the default value).
SWISS-AS.COM
165/167
Then the properties of the service appear. Change to the tab sheet 'Log On'. Here the new 'Service User' name and
password can be entered manually:
SWISS-AS.COM
166/167
SWISS-AS.COM
167/167
SWISS-AS.COM