32
White Paper: White Paper: White Paper: White Paper: High Availability High Availability High Availability High Availability SAP Content Server SAP Content Server SAP Content Server SAP Content Server in a in a in a in an MSCS n MSCS n MSCS n MSCS Environment Environment Environment Environment May May May May 2003 2003 2003 2003 Version 1.1

High Availability

Embed Size (px)

DESCRIPTION

High Availability

Citation preview

Page 1: High Availability

White Paper: White Paper: White Paper: White Paper:

High AvailabilityHigh AvailabilityHigh AvailabilityHigh Availability

SAP Content Server SAP Content Server SAP Content Server SAP Content Server in ain ain ain an MSCS n MSCS n MSCS n MSCS EnvironmentEnvironmentEnvironmentEnvironment

MayMayMayMay 2003 2003 2003 2003 Version 1.1

Page 2: High Availability

© Copyright 2002 SAP AG. All rights reserved. No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein may be changed without prior notice. Some software products marketed by SAP AG and its distributors contain proprietary software components of other software vendors. Microsoft®, WINDOWS®, NT®, EXCEL®, Word®, PowerPoint® and SQL Server® are registered trademarks of Microsoft Corporation. IBM®, DB2®, DB2 Universal Database, OS/2®, Parallel Sysplex®, MVS/ESA, AIX®, S/390®, AS/400®, OS/390®, OS/400®, iSeries, pSeries, xSeries, zSeries, z/OS, AFP, Intelligent Miner, WebSphere®, Netfinity®, Tivoli®, Informix and Informix® Dynamic Server

TM are

trademarks of IBM Corp. in USA and/or other countries. ORACLE® is a registered trademark of ORACLE Corporation. UNIX®, X/Open®, OSF/1®, and Motif ® are registered trademarks of the Open Group. LINUX is a registered trademark of Linus Torvalds and others. Citrix®, the Citrix logo, ICA®, Program Neighborhood ®, MetaFrame®, WinFrame®, VideoFrame®, MultiWin® and other Citrix product names referenced herein are trademarks of Citrix Systems, Inc. HTML, DHTML, XML, XHTML are trademarks or registered trademarks of W3C®, World Wide Web Consortium, Massachusetts Institute of Technology.

JAVA® is a registered trademark of Sun Microsystems, Inc.

J2EE™ is a registered trademark of Sun Microsystems, Inc. JAVASCRIPT® is a registered trademark of Sun Microsystems, Inc., used under license for technology invented and implemented by Netscape. SAP, SAP Logo, R/2, RIVA, R/3, SAP ArchiveLink, SAP Business Workflow, WebFlow, SAP EarlyWatch, BAPI, SAPPHIRE, Management Cockpit, mySAP, mySAP.com, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. MarketSet and Enterprise Buyer are jointly owned trademarks of SAP Markets and Commerce One. All other product and service names mentioned are the trademarks of their respective owners. Disclaimer Some components of this product are based on Java™. Any code change in these components may cause unpredictable and severe malfunctions and is therefore expressively prohibited, as is any decompilation of these components. Any Java™ Source Code delivered with this product is only to be used by SAP’s Support Services and may not be modified or altered in any way. Documentation in the SAP Service Marketplace You can find this documentation at the following address: http://service.sap.com/ha

SAP AGSAP AGSAP AGSAP AG Neurottstraße 16 69190 Walldorf Germany T +49/18 05/34 34 24 F +49/18 05/34 34 20 www.sap.comwww.sap.comwww.sap.comwww.sap.com

Page 3: High Availability

Typographic Conventions

Type Style Represents

Example Text Words or characters that appear on the screen. These include field names, screen titles, pushbuttons as well as menu names, paths and options.

Cross-references to other documentation

Example text Emphasized words or phrases in body text, titles of graphics and tables

EXAMPLE TEXT Names of elements in the system. These include report names, program names, transaction codes, table names, and individual key words of a programming language, when surrounded by body text, for example, SELECT and INCLUDE.

Example text Screen output. This includes file and directory names and their paths, messages, names of variables and parameters, source code as well as names of installation, upgrade and database tools.

Example text Exact user entry. These are words or characters that you enter in the system exactly as they appear in the documentation.

<Example text> Variable user entry. Pointed brackets indicate that you replace these words and characters with appropriate entries.

EXAMPLE TEXT Keys on the keyboard, for example, function keys (such as F2) or the Enter key.

Icons

Icon Meaning

Caution

Example

Note

Recommendation

Syntax

Page 4: High Availability

SAP Content Server in an MSCS Environment

May 2003 4

Contents Introduction........................................................................................................5

Prerequisites ......................................................................................................5

Installation .........................................................................................................6

Step 1: Installation of the SAP Content Server on Node A ...................................................8 Move the Installation to Shared Disks...................................................................................................... 9

Step 2: Cluster Migration on Node A....................................................................................13 Copy Files .............................................................................................................................................. 13 Creation of the Cluster Resources ......................................................................................................... 14

Step 3: Creation of the IIS Resource....................................................................................18 Step 4: Installation of the SAP Content Server on Node B .................................................21 Step 5: Create SAP DB Installation for Node B ...................................................................22

Cluster Migration for Node B.................................................................................................................. 22 Create or Register the Database Instance .............................................................................................. 22

Appendix – Example for Migration Scripts....................................................... 26

MV_A.BAT..............................................................................................................................26 SAPDBCA1.BAT ....................................................................................................................29 SAPDBCA2.BAT ....................................................................................................................30 MV_B.BAT..............................................................................................................................31

Page 5: High Availability

SAP Content Server in an MSCS Environment

May 2003 5

Introduction You can protect an SAP Content Server by using Microsoft Cluster Service (MSCS). You need to operate the database as follows:

• The database executables, the database data files, and the database log files reside on shared disks that are controlled by the cluster software.

• The database is accessed via a virtual IP address. If one node fails, the resources are reassigned to the surviving node and the database is restarted. It can be accessed again by the same virtual IP address that has been switched to the surviving node.

The SAP Content Server also contains an IIS instance. The cluster can also protect this website.

Prerequisites • All servers run MS Windows 2000 Advanced Server.

• All servers have access to shared disks and are connected to a private network.

• The users have to be maintained in a Windows NT domain (or in Active Directory Service).

• MSCS is installed on all servers.

The following graphic shows a typical setup:

MSCS Setup for SAP Content ServerOne node runs the database, the other node is idle.

DB Data

Quorum disk

Cluster Node A Cluster Node B

Shared Disk Storage

Cluster Interconnect(Heartbeat)

Public Network

DB

Cluster SW

Cluster SW

Currently owns

OSSAP Content Server

OSSAP Content Server

10.0.0.1 10.0.0.2

NodeA 10.0.0.3 NodeB 10.0.0.4Cluster 10.0.0.5DB 10.0.0.6

The application is accessed via a virtual IP address and host name.

DB Logs

DB Exe

DB Logs

Page 6: High Availability

SAP Content Server in an MSCS Environment

May 2003 6

We make the following assumptions and setting for this example:

Node A Tpmserv1, 10.18.92.145

Node B Tpmserv2, 10.18.92.147

Virtual cluster name; address Tpmclusgrp, 10.18.92.149

Virtual db host name; address Tpmdbgrp, 10.18.92.151

Local disk C:\

Shared Disk (DB Executables) E:\

Shared Disk (DB Data) H:\

Shared Disk (DB Logs) F:\

Shared Disk (DB Logs) G:\

Name of the database SDB (Content Server),CDB (Cache Server)

Name of the external network connection External LAN connection

This is only a summary of the prerequisites. For more information, see the installation documentation for the SAP system on Microsoft Windows. You can find this in the SAP Service Marketplace at the Internet address: service.sap.com/instguides

Installation As the installation steps are different for both nodes, we describe them separately.

Page 7: High Availability

SAP Content Server in an MSCS Environment

May 2003 7

Node A:Installation ofSAP Content

Server (with DB)

- Installation with setup tool(incl. DB)- Move DB installation toshared disks

Node B:Installation ofSAP Content

Server(without DB)

- Installation with setup tool(without DB)

Node A:Cluster migration

- Copy files- Create resource types,cluster group andresources

Node B:DB registration

Cluster migration

- Copy files for clustering- Change Registration of theDB installation manually topoint to shared disks

Clustering of theIIS instance

- Add IIS instance to clustergroup

The steps for node B can also be used for recovery purposes when a cluster node has to be replaced after a crash. The required steps are described there.

Page 8: High Availability

SAP Content Server in an MSCS Environment

May 2003 8

Step 1: Installation of the SAP Content Server on Node A You have to first install the SAP Content Server. During the installation, the database software, the database instance(s) and the Website are installed by default.

During the installation, you can only choose where the data and log files are to be installed. As these files have to be protected by the cluster, they have to reside on shared disks.

In this example these are the disks H:, G: and F:.

When the installation is finished, you find the following situation:

Page 9: High Availability

SAP Content Server in an MSCS Environment

May 2003 9

The installation of the content server application is in the directory C:\Program Files\SAP\Content Server\. The related IIS instance SAP_Content_Server points to this directory and uses the port 1090 by default.

The following paths apply for SAPDB:

<INDEPENDENT_DATA_PATH>: C:\sapdb\data<INDEPENDENT_PROG_PATH>: C:\sapdb\programs<DEPENDENT_PATH> : C:\sapdb\<database_name>\db

The data files are in: H:\sapdb\<database_name>\sapdata

The log files are in: F:\sapdb\<database_name>\saplog

G:\sapdb\<database_name>\saplog

Move the Installation to Shared Disks

Move the Database Installation To work in a cluster, you need to move the database installation to shared disks:

1. Set the database instance offline and stop the X-server: C:> dbmcli -d <database_name> -u <dbm_user>,<password> db_offline

C:> x_server stop

2. Copy the files to the shared disk: C:> xcopy C:\sapdb\ E:\sapdb\ /s /e

3. Change the instance-independent data directory:

o Register the new directory: C:> dbmcli dbm_setpath indepdatapath E:\sapdb\data

o Configure the new work directories: C:> dbmcli -d <database_name> -u <dbm_user>,<password>

param_directput RUNDIRECTORYE:\sapdb\data\wrk\<database_name>

C:> dbmcli -d <database_name> -u <dbm_user>,<password>param_directput DIAG_HISTORY_PATHE:\sapdb\data\wrk\<database_name>\DIAGHISTORY

4. Change the instance-dependent path:

o Register the new directory: C:> dbmcli -s inst_unreg C:\sapdb\<database_name>\dbC:> dbmcli -s -R E:\sapdb\<database_name>\db

inst_reg E:\sapdb\<database_name>\db

o Register the instance with the new directory: C:> dbmcli -d <database_name> -u <dbm_user>,<password>

db_reg -R E:\sapdb\<database_name>\db

5. Change of the instance-independent path:

o Register the new directory: C:> dbmcli dbm_setpath indepprogpath E:\sapdb\programs

Page 10: High Availability

SAP Content Server in an MSCS Environment

May 2003 10

o Register the precompiler runtime libraries. Display the existing registrations for this: C:> irconf –sExample: C:/sapdb/programs/runtime/7403 -> 7.4.3.0

o Change the registration for each output line, as in the following example: C:> irconf –i –p E:\sapdb\programs\runtime\7403C:> irconf –i –r C:\sapdb\programs\runtime\7403

o Change of the environment variable PATH so that it points to the new directories: e:\sapdb\programs\bin; e:\sapdb\programs\pgm

6. Change the X-server registration:

o Remove old registration: C:> x_server remove

o Create new registration: C:> x_server install

7. Copy the system devspace and change registration:

o Display the current system devspace: C:> dbmcli -d <database_name> -u <dbm_user>,<password>

param_directget SYSDEV_001

o If the system devspace is on a local disk (which is the standard of the SAP Content Server installation) you have to move it to a shared disk (that is, the disk with the data devspaces): C:> mkdir H:\sapdb\<database_name>\dbsysC:> copy C:\sapdb\<database_name>\dbsys\SYS

H:\sapdb\<database_name>\dbsys\SYS

o You have to change the parameter: C:> dbmcli -d <database_name> -u <dbm_user>,<password>

param_directput SYSDEV_001H:\sapdb\<database_name>\dbsys\SYS

o You can delete the old system devspace: C:> del C:\sapdb\<database_name>\dbsys\SYS

8. Restart the database: C:> dbmcli -d <database_name> -u <dbm_user>,<password> db_warmC:> x_server start

9. Register the ODBC Driver for the new location: C:> cd e:\sapdb\<database_name>\db\pgmE:\sapdb\<database_name>\db\pgm > odbcreg 7.3 -i -p

e:\sapdb\<database_name>\db\pgm

Move the Content Server Installation 1. You have to move the content server installation to the shared drive by copying the

corresponding files: C:> xcopy /s "c:\Program Files\SAP\Content Server\*.*" "e:\Content

Server\*.*"

2. Now make sure that the SAP Content Server IIS instance points to the new directories:

Page 11: High Availability

SAP Content Server in an MSCS Environment

May 2003 11

Choose Computer Management � Services and Applications � Internet Information Service � SAP_Content_Server � Properties

3. Change the path for the Home Directory.

4. Change the virtual directory for ContentServer by first double-clicking on SAP_Content_Server. Then right-click on ContentServer and select Properties .

Page 12: High Availability

SAP Content Server in an MSCS Environment

May 2003 12

5. Restart the service for the change to take effect.

Page 13: High Availability

SAP Content Server in an MSCS Environment

May 2003 13

Step 2: Cluster Migration on Node A

Copy Files Now you have to migrate the installation to the cluster.

Set the database instance offline and stop the X-server: C:> dbmcli -d <database_name> -u <dbm_user>,<password> db_offline

C:> x_server stop

You have to copy the following files:

Source Destination E:\sapdb\<database_name>\db\cluster\ E:\sapdb\<database_name>\db\pgm\

Dbmserv_clu.exe Dbmserv.exe

Serv_clu.exe Serv.exe

Service_clu.exe Service.exe

Strt_clu.exe Strt.exe

Stp_clu.exe Stp.exe

Source Destination E:\sapdb\<database_name>\db\cluster\ <winntdir>\cluster\

SAPDBMSCSEx.dll SAPDBMSCSEx.dll

SAPDBMSCSMan.dll SAPDBMSCSMan.dll

SAPDBMSCSMan.exe SAPDBMSCSMan.exe

SAPDBMSCSRes.dll SAPDBMSCSRes.dll

copy e:\sapdb\<database_name>\db\cluster\dbmsrv_clu.exee:\sapdb\<database_name>\db\pgm\dbmsrv.exe

copy e:\sapdb\<database_name>\db\cluster\serv_clu.exee:\sapdb\<database_name>\db\pgm\serv.exe

copy e:\sapdb\<database_name>\db\cluster\service_clu.exee:\sapdb\<database_name>\db\pgm\service.exe

copy e:\sapdb\<database_name>\db\cluster\strt_clu.exee:\sapdb\<database_name>\db \pgm\strt.exe

copy e:\sapdb\<database_name>\db\cluster\stp_clu.exee:\sapdb\<database_name>\db \pgm\stp.exe

copy e:\sapdb\<database_name>\db\cluster\*.dll c:\winnt\cluster\

copy e:\sapdb\<database_name>\db\cluster\sapdbmscsman.exe c:\winnt\cluster\

Page 14: High Availability

SAP Content Server in an MSCS Environment

May 2003 14

When using Windows 2000 with Service Pack 3, you have to use an alternative file, SAPDBMSCSRes.dll. Otherwise you will have problems with the Cluster Administrator. For more information, see SAP note 570969.

Creation of the Cluster Resources Make sure that you perform the following steps on node A. Enter the following command before you start: C:>cd \winnt\cluster

1. Create the cluster resource types specific to SAP DB: C:>sapdbmscsman -C

2. Create resources for the database instances: C:>sapdbmscsman -a <database_name>

This creates the cluster group SAP DBTech and the resource <database_name>.

3. Select Run in separate resource monitor in the cluster administrator for the database instance resource(s).

4. Add the disk resources for all the shared disks involved using the cluster administrator:

Page 15: High Availability

SAP Content Server in an MSCS Environment

May 2003 15

Page 16: High Availability

SAP Content Server in an MSCS Environment

May 2003 16

5. Make sure that you have included all required disk resources in the dependencies for the database instance resources.

Page 17: High Availability

SAP Content Server in an MSCS Environment

May 2003 17

6. Add the SAP DB resources. In this example, they are network=external LAN

connection and ipaddress=10.18.92.151 (the virtual IP address): C:>set network=external LAN connection

C:>set ipaddress=10.18.92.151

C:>sapdbmscsman -B "%network%,%ipaddress%,%netmask%,Disk E:"

7. Add the dependency for the virtual IP address

8. Set the group SAP DBTech online C:>sapdbmscsman -G "SAP DBTech"

Page 18: High Availability

SAP Content Server in an MSCS Environment

May 2003 18

Step 3: Creation of the IIS Resource 1. As the IIS instance need to be protected by the cluster, you have to add the IIS instance to the

group SAP DBTech.

2. Choose File� New � Resource to add the resource. You can choose Name freely, but we suggest using Content Server. The resource type is IIS Server Instance.

3. The resource should be able to run on both nodes in the cluster.

Page 19: High Availability

SAP Content Server in an MSCS Environment

May 2003 19

4. There is a dependency with the virtual IP address because the IIS instance will be addressed with this virtual address.

You could use a different virtual IP address and another cluster group for the IIS instance than for the database in order to handle it separately in the cluster. In this case, you have to configure the virtual host name of the database in the local file ContentServer.ini.

5. Select the IIS instance SAP_Content_Server.

Page 20: High Availability

SAP Content Server in an MSCS Environment

May 2003 20

6. Now you can access the IIS instance with the virtual host name.

Page 21: High Availability

SAP Content Server in an MSCS Environment

May 2003 21

Step 4: Installation of the SAP Content Server on Node B

When you recover the node B after a crash, you have to remove the node from the cluster (“evict node”) and install the cluster service on node B.

You have already installed the database on node A. Therefore, you do not need to install the database on node B. You only need to install the WebSite for the SAP Content Server on node B.

Select Expert Mode and deselect Create DB Instance.

Page 22: High Availability

SAP Content Server in an MSCS Environment

May 2003 22

Step 5: Create SAP DB Installation for Node B You have to register the database installation on the shared disks on node B.

Cluster Migration for Node B You have to do this as a prerequisite to switching the resources to node B.

You have to copy the following files:

Source Destination E:\sapdb\<database_name>\db\cluster\ <winntdir>\cluster\

SAPDBMSCSEx.dll SAPDBMSCSEx.dll

SAPDBMSCSMan.dll SAPDBMSCSMan.dll

SAPDBMSCSMan.exe SAPDBMSCSMan.exe

SAPDBMSCSRes.dll SAPDBMSCSRes.dll

copy e:\sapdb\<database_name>\db\cluster\*.dll c:\winnt\cluster\

copy e:\sapdb\<database_name>\db\cluster\sapdbmscsman.exe c:\winnt\cluster\

When using Windows 2000 with Service Pack 3, you have to use an alternative file SAPDBMSCSRes.dll. Otherwise you will have problems with the Cluster Administrator. For more information, see SAP note 570969.

Create or Register the Database Instance

Make sure that the disk resources are available on node B. Use the cluster administrator to set the DB resource and the Xserver resource offline. Then move the group SAP DBTech to node B. To access the resources from the command prompt you might need to log off and then log on again.

To run the Xserver, you need additional entries in the services file. You can refer to node A and create these entries manually, or you install the DBManager or the SQL Studio which create the entries automatically.

Perform the following steps:

1. Set the instance-independent path:

o Change the environment variable PATH so that it points to the new directories e:\sapdb\programs\bin; e:\sapdb\programs\pgm

o Register the new program directory:

Page 23: High Availability

SAP Content Server in an MSCS Environment

May 2003 23

C:> dbmcli dbm_setpath indepprogpath E:\sapdb\programs

o Register the precompiler libraries (see migration of node A) C:> irconf –i –p E:\sapdb\programs\runtime\7430

o Register the new data directory: C:> dbmcli dbm_setpath indepdatapath E:\sapdb\data

2. Register the instance-dependent software: C:> dbmcli inst_reg E:\sapdb\<database_name>\db

3. Register the database instance(s):

C:> dbmcli db_create <database_name> <dbm_user>,<password>

4. Register the Xserver: C:> x_server install

5. Now the database instance and the Xserver can be set online.

6. Register the ODBC Driver for the new location: C:> cd e:\sapdb\<database_name>\db\pgmE:\sapdb\<database_name>\db\pgm > odbcreg 7.3 -i -p

e:\sapdb\<database_name>\db\pgm

Move the Content Server Installation 1. Make sure that the SAP Content Server IIS instance points to the new directories:

Choose Computer Management� Services and Applications � Internet Information Service � SAP_Content_Server � Properties.

2. Change the path for the Home Directory:

Page 24: High Availability

SAP Content Server in an MSCS Environment

May 2003 24

3. Change the virtual directory for ContentServer by first double-clicking on SAP_Content_Server. Then right-click on ContentServer and select Properties .

Page 25: High Availability

SAP Content Server in an MSCS Environment

May 2003 25

4. Restart the service for the change to take effect.

Page 26: High Availability

SAP Content Server in an MSCS Environment

May 2003 26

Appendix – Example for Migration Scripts

MV_A.BAT

echo offcls

echo *************************************************echo * *echo * Move DB installation to shared disk and *echo * adjust registration on node A *echo * *echo *************************************************

rem +----------------------------------------------+rem | Change the following parameters according to |rem | your requirements |rem +----------------------------------------------+

set db_name=SDBset d1=C:set d2=E:set d3=H:set dbuser=controlset dbpw=controlrem +----------------------------------------------+

set dbdir=%d1%\SAPDB\%db_name%set dbdirneu=%d2%\SAPDB\%db_name%set inprogpath=%d1%\SAPDB\PROGRAMSset inprogpath1=%d1%/SAPDB/PROGRAMSset inprogpathnew=%d2%\SAPDB\PROGRAMSset inprogpathnew1=%d2%/SAPDB/PROGRAMSset indatapath=%d1%\SAPDB\DATAset indatapathnew=%d2%\SAPDB\DATAset newcspath=%d3%\Content Server

echo Set DB offlinedbmcli -d %db_name% -u %dbuser%,%dbpw% db_offline

echo Stop x_serverx_server stop

pausecls

echo Copy files from %d1%\sapdb to %d2%\sapdbxcopy %d1%\sapdb %d2%\sapdb\ /s /e

pausecls

echo ****** Change independent data directory ******echo Register the new directorydbmcli dbm_setpath indepdatapath %indatapathnew%

echo Configure the work directoriesecho RUNDIRECTORY %indatapathnew%\wrk\%db_name%

Page 27: High Availability

SAP Content Server in an MSCS Environment

May 2003 27

echo DIAG_HISTORY_PATH %indatapathnew%\wrk\%db_name%\DIAGHISTORYdbmcli -d %db_name% -u %dbuser%,%dbpw% param_directput RUNDIRECTORY%indatapathnew%\wrk\%db_name%dbmcli -d %db_name% -u %dbuser%,%dbpw% param_directput DIAG_HISTORY_PATH%indatapathnew%\wrk\%db_name%\DIAGHISTORY

pausecls

echo ****** Change instance-dependent path ******echo Register the new directorydbmcli -s inst_unreg %dbdir%\DBdbmcli -s -R %dbdirneu%\DB inst_reg %dbdirneu%\DB

echo Register the instance with the new directorydbmcli -d %db_name% -u %dbuser%,%dbpw% db_reg -R %dbdirneu%\DB

pausecls

echo ****** Change instance-independent path ******echo Register the new directorydbmcli dbm_setpath indepprogpath %inprogpathnew%

echo Change runtime pathesirconf -i -p %inprogpathnew1%/runtime/7240irconf -r -p %inprogpath1%/runtime/7240irconf -i -p %inprogpathnew1%/runtime/7250irconf -r -p %inprogpath1%/runtime/7250irconf -i -p %inprogpathnew1%/runtime/7300irconf -r -p %inprogpath1%/runtime/7300irconf -i -p %inprogpathnew1%/runtime/7301irconf -r -p %inprogpath1%/runtime/7301irconf -i -p %inprogpathnew1%/runtime/7401irconf -r -p %inprogpath1%/runtime/7401irconf -i -p %inprogpathnew1%/runtime/7403irconf -r -p %inprogpath1%/runtime/7403

pauseclsecho ****** Change x_server registration ******x_server removex_server install

pauseclsecho ****** Migrate system devspace to shared disk ******echo Copy filesmkdir %d3%\sapdb\%db_name%\dbsyscopy %d1%\sapdb\%db_name%\dbsys\SYS %d3%\sapdb\%db_name%\dbsys\SYS

echo Change parameterdbmcli -d %db_name% -u %dbuser%,%dbpw% param_directput SYSDEV_001%d3%\sapdb\%db_name%\dbsys\SYS

pauseclsecho ****** Register ODBC Driver ******%d3%\sapdb\%db_name%\db\pgm\odbcreg.exe 7.3 -i -p%d3%\sapdb\%db_name%\db\pgm

Page 28: High Availability

SAP Content Server in an MSCS Environment

May 2003 28

pauseclsecho ****** Copy Content Server Files to Shared Drive ******xcopy /s "c:\Program Files\SAP\Content Server\*.*" %newcspath%\*.*

echo ****** Now change the registration for the IIS Instance manually !******

Page 29: High Availability

SAP Content Server in an MSCS Environment

May 2003 29

SAPDBCA1.BAT

echo offclsecho *************************************************echo * *echo * Cluster conversion for node A *echo * Part 1 *echo * *echo *************************************************

rem +----------------------------------------------+rem | Change the following parameters according to |rem | your requirements |rem +----------------------------------------------+set d1=E:set db_name=SDBrem +----------------------------------------------+

set dbdir=%d1%\SAPDB\%db_name%\DBset clusterdir=%SystemRoot%\cluster

echo ****** Copy files ******copy %dbdir%\cluster\dbmsrv_clu.exe %dbdir%\pgm\dbmsrv.execopy %dbdir%\cluster\serv_clu.exe %dbdir%\pgm\serv.execopy %dbdir%\cluster\service_clu.exe %dbdir%\pgm\service.execopy %dbdir%\cluster\strt_clu.exe %dbdir%\pgm\strt.execopy %dbdir%\cluster\stp_clu.exe %dbdir%\pgm\stp.exe

copy %dbdir%\cluster\*.dll %clusterdir%\copy %dbdir%\cluster\sapdbmscsman.exe %clusterdir%\copy c:\copy\contserv\cluster\sapdbmscsres.dll %clusterdir%\

pausecls

echo ****** Create cluster resources ******c:cd %clusterdir%

echo Create cluster resourcessapdbmscsman -C

echo Add resource %db_name%sapdbmscsman -a %db_name%

echo ****** Now create the disk resources using the cluster administrator******

Page 30: High Availability

SAP Content Server in an MSCS Environment

May 2003 30

SAPDBCA2.BAT

echo offclsecho *************************************************echo * *echo * Cluster conversion for node A *echo * Part 2 *echo * *echo *************************************************

rem +----------------------------------------------+rem | Change the following parameters according to |rem | your requirements |rem +----------------------------------------------+set d1=E:set db_name=SDBset network=external LAN Connectionset ipaddress=10.18.92.151set netmask=255.255.252.0set dbdisk=Disk E:rem +----------------------------------------------+

set dbdir=%d1%\SAPDB\%db_name%\DBset clusterdir=%SystemRoot%\cluster

echo ****** Create cluster resources ******c:cd %clusterdir%

echo Add SAPDB resources: %network%, %ipaddress%sapdbmscsman -B "%network%,%ipaddress%,%netmask%,%dbdisk%"

Page 31: High Availability

SAP Content Server in an MSCS Environment

May 2003 31

MV_B.BAT

echo offcls

echo *************************************************echo * *echo * Create DB registration for SAP Content Server *echo * on node B *echo * *echo *************************************************

rem +----------------------------------------------+rem | Change the following parameters according to |rem | your requirements |rem +----------------------------------------------+set db_name=SDBset d1=C:set d2=E:set dbuser=controlset dbpw=controlrem +----------------------------------------------+

set dbdir=%d2%\SAPDB\%db_name%set inprogpath=%d1%\SAPDB\PROGRAMSset inprogpath1=%d1%/SAPDB/PROGRAMSset inprogpathnew=%d2%\SAPDB\PROGRAMSset inprogpathnew1=%d2%/SAPDB/PROGRAMSset indatapath=%d1%\SAPDB\DATAset indatapathnew=%d2%\SAPDB\DATA

echo Set DB offlinedbmcli -d %db_name% -u %dbuser%,%dbpw% db_offline

echo Stop x_serverx_server stop

pausecls

echo ****** Change independent data directory ******echo Register the new directorydbmcli dbm_setpath indepdatapath %indatapathnew%

pausecls

echo ****** Change instance-dependent path ******echo Register the new directorydbmcli -s -R %dbdir%\DB inst_reg %dbdir%\DB

pausecls

echo ****** Change instance-independent path ******echo Register the new directorydbmcli dbm_setpath indepprogpath %inprogpathnew%

echo Change runtime pathes

Page 32: High Availability

SAP Content Server in an MSCS Environment

May 2003 32

irconf -i -p %inprogpathnew1%/runtime/7240irconf -r -p %inprogpath1%/runtime/7240irconf -i -p %inprogpathnew1%/runtime/7250irconf -r -p %inprogpath1%/runtime/7250irconf -i -p %inprogpathnew1%/runtime/7300irconf -r -p %inprogpath1%/runtime/7300irconf -i -p %inprogpathnew1%/runtime/7301irconf -r -p %inprogpath1%/runtime/7301irconf -i -p %inprogpathnew1%/runtime/7401irconf -r -p %inprogpath1%/runtime/7401irconf -i -p %inprogpathnew1%/runtime/7403irconf -r -p %inprogpath1%/runtime/7403

pausecls

echo ****** Register the instance with the new directory ******dbmcli db_create %db_name% %dbuser%,%dbpw%

pausecls

echo ****** Copy cluster files ******copy %dbdir%\db\cluster\*.dll %clusterdir%\copy %dbdir%\db\cluster\sapdbmscsman.exe %clusterdir%\copy c:\copy\contserv\cluster\sapdbmscsres.dll %clusterdir%\

pauseclsecho ****** Create x_server registration ******x_server install

pauseclsecho ****** Register ODBC Driver ******%d3%\sapdb\%db_name%\db\pgm\odbcreg.exe 7.3 -i -p%d3%\sapdb\%db_name%\db\pgm

pauseclsecho ****** Now change the registration for the IIS Instance manually !******