You are on page 1of 98

51

Anglogold

SAP Systems Operations Manual

Version 1.2

SAP System Operations Manual

23-Aug-10

Author File Name Template Created Last Edited Number of Pages Comments

Tom Pavsic / Andrew Keller SAP Systems Operations Manual.doc

19/04/2002 Reviewed and updated M. Denny 118

Revision Date 2/12/1998 2/2/1999 30/08/1999 30/09/1999 12/05/2000 04/2002 10/2004 Status

Revision Description Initial Version Added procedure for restoring AP1 database from nightly/monthly tape Added contiguous offline restore and roll forward procedure Version 1.2 Modified to reflect changes due to SQL upgrade and datafile changes. Review and update Added description of copying AP1 to Dev (as AP2) or consolidation

Target Readership This manual is intended for Systems Administrators and Operations staff responsible for the on-going administration and monitoring of the SAP system.

Approved By:

Tom Pavsic (originally) then Andrew Keller

Date:

2/12/1998

Name and Title: Tom Pavsic Technical Team Lead Name and Title: Andrew Keller Acacia Resources Limited IT Consultant

/opt/scribd/conversion/tmp/scratch24826/38867829.doc

SAP System Operations Manual

23-Aug-10

Table of Contents
SAP System Descriptions..........................................................................................................................1 R/3 Systems Configuration...................................................................................................................1 Software.................................................................................................................................................1 Hardware Layout...................................................................................................................................1 NetRaid Configuration.........................................................................................................................5 Vendor System Support.........................................................................................................................9 LAN Environment.................................................................................................................................9 SAP Systems Administration..................................................................................................................10 NT System Startup..............................................................................................................................10 NT System Shutdown..........................................................................................................................10 SAP/SQL Application Startup.............................................................................................................10 SAP/SQL Application Shutdown........................................................................................................11 Notifying SAP Users...........................................................................................................................11 Locking & Enabling Access to an SAP Instance.............................................................................12 SAP Client Maintenance.........................................................................................................................13 Client Access and Controls.................................................................................................................13 Client Creation.....................................................................................................................................14 Client Copy in Same Instance using R3trans.....................................................................................15 Client Copy in Same Instance using SAP GUI...................................................................................16 Client Copy to Different Instance.......................................................................................................16 Client Deletion.....................................................................................................................................18 System Change Option........................................................................................................................20 System Monitoring..................................................................................................................................21 Monitoring Checklists .......................................................................................................................21 Daily Monitoring Activity Details......................................................................................................22 SQL Alert Mechanism Set-up.............................................................................................................28 Backup Processing...................................................................................................................................29 Backup Environment Layout..............................................................................................................29 Transaction Logs.................................................................................................................................29 Disk Allocation for SAP Systems.......................................................................................................30 Tape Cycles.........................................................................................................................................31 Tape Labeling......................................................................................................................................32 Monitoring Backup Execution............................................................................................................33 Database Administration and Recovery..................................................................................................34 Monitoring Database Space................................................................................................................34 Expanding a Database.........................................................................................................................34 Recovering from a Corrupt Master Database.....................................................................................34 Recovering from a Corrupt msdb Database........................................................................................36 Recovering from Corrupt or Missing SAP Executables.....................................................................36 Recovering from a full Model DB Transaction Log..........................................................................37 Disaster Recovery Information...........................................................................................................38 Total system recovery to the AC1 system. (No forward recovery)...................................................38 Total system recovery to the AC1 system. (With forward recovery)................................................40 Restore the SAP database SQL DB and Device Rebuild................................................................42 Restore the SAP database from Nightly Backup Tape.......................................................................44 Restore the SAP system from the Monthly Backup Tape with forward recovery.............................46 Copy Prod (AP1) to Dev box as AP2..................................................................................................48 Copy AP1 (Prod) to Consolidation.....................................................................................................49 SAP GUI Desktop Management............................................................................................................51 Installation of the SAP GUI Server Files............................................................................................51 Installation of the Development SAP GUI.........................................................................................51 .............................................................................................................................................................51 Installation of the Training/Playpen SAP GUI ..................................................................................51 Installation of the Production SAP GUI.............................................................................................51 .............................................................................................................................................................51 Installation of the SAP Online Documentation..................................................................................52 SAP Printer Management........................................................................................................................53 Prerequisites.........................................................................................................................................53 Installation of a SAP Network Printer................................................................................................53 Installation of a SAP LPD Printer.......................................................................................................53

/opt/scribd/conversion/tmp/scratch24826/38867829.doc

SAP System Operations Manual

23-Aug-10

CTS Change Control Environment.........................................................................................................55 SAP System Environment...................................................................................................................55 CTS Management Activities...............................................................................................................56 Change Procedure for Development...................................................................................................57 Change Procedure for Consolidation..................................................................................................59 Change Procedure for Production.......................................................................................................59 Change Scheduling..............................................................................................................................60 Transport Utilities/Tools.....................................................................................................................61 Transport Directory Maintenance.......................................................................................................62 Batch Job Administration........................................................................................................................63 Background Job Creation Standards...................................................................................................63 Scheduling Background Jobs..............................................................................................................63 Job Classes for Background Jobs........................................................................................................65 Viewing Background Jobs...................................................................................................................65 Policies.................................................................................................................................................65 Variant Maintenance...........................................................................................................................67 User Security.......................................................................................................................................67 Faxing Software.......................................................................................................................................69 Transfer of EFT file from SAP to ANZ On-line....................................................................................70 EFT File Created and Reconciled in SAP..........................................................................................70 Download and Transmisson of the EFT file.......................................................................................71 Backup Procedure................................................................................................................................72 Appendix A - Forms................................................................................................................................73 CTS Change Request Form ................................................................................................................73 Manual Change Request Form ...........................................................................................................74 Batch Job Request Form......................................................................................................................75 New Printer Request Form..................................................................................................................77 Problem Issue Log Form.....................................................................................................................80 Appendix B SQL Scripts......................................................................................................................81 Hourly Transaction Log Dumps..........................................................................................................81 .............................................................................................................................................................81 SQL Alert Setup .................................................................................................................................83 Clean-up Backup History ...................................................................................................................86 Appendix C Custom Programs and DOS Scripts................................................................................87 Display CTS Request Status - ZPSPTRAN........................................................................................87 Batch File to start SAP........................................................................................................................91 Appendix D SQL datafile change for AP1.........................................................................................93 Scenario...............................................................................................................................................93 Actions ................................................................................................................................................93

/opt/scribd/conversion/tmp/scratch24826/38867829.doc

ii

SAP System Operations Manual

23-Aug-10

SAP System Descriptions


R/3 Systems Configuration
There are 3 systems configured in the Acacia R/3 landscape; Development (AD1), Consolidation (AC1) and Production (AP1). Component Location Hardware Operating System Database R/3 Release Installation Number AD1 Perth HP NetServer NT4 MS SQLServer 4.6C 1420041895 AC1 Perth HP NetServer NT4 MS SQLServer 4.6C 1420041895 AP1 Perth HP NetServer NT4 MS SQLServer 4.6C 1420041895

The software keys for each of the above SAP systems is not documented here as this information is considered sensitive.

Software
Component Windows NT TCP/IP MS SQLServer Backup Exec AD1 4.0 Serv. Pack 3 Not versioned 7.00.961 7.0 SQL Agent AC1 4.0 Serv. Pack 3 Not versioned 7.00.961 7.0 SQL Agent Enterprise Version Backup 4.6C AP1 4.0 Serv. Pack 3 Not versioned 7.00.961 7.0 SQL Agent Single System Backup 4.6C

SAP R/3

4.6C

Hardware Layout Physical Layout


Component Physical Memory Disk Sizes / Number Network Interface Tape Device(s) AD1 1Gb 6 x 9 Gb Ethernet No drive AC1 1Gb 3 x 9 Gb 6 x 4 Gb Ethernet DLT 70 AP1 2Gb 6 + 2 x 9 Gb 7 x 4 Gb Ethernet DLT 70

/opt/scribd/conversion/tmp/scratch24826/38867829.doc

SAP System Operations Manual

23-Aug-10

NT Disk Configuration AP1


The following screen image defines the disk configuration of the production system.

Disk Usage
C: D: E: F: G: SWAP SAP_SQL Database Logs Root drive containing NT. Contains all NT executables RAID 1 SWAP space for this system RAID 1 SAP/SQL execs, SQL Master, MSDB and TEMPDB - RAID 1 SAP database resides on this drive RAID 5 SQL transaction logs resides on this drive RAID 1

/opt/scribd/conversion/tmp/scratch24826/38867829.doc

SAP System Operations Manual

23-Aug-10

NT Disk Configuration AC1


The following screen image defines the disk configuration of the consolidation system.

Disk Usage
C: D: E: F: G: Q: dump Root drive containing NT. Contains all NT executables RAID 1 SWAP SWAP space for this system RAID 1 SAP_SQL SAP/SQL execs, SQL Master, MSDB and TEMPDB - RAID 1 Database SAP database resides on this drive RAID 5 Logs SQL transaction logs resides on this drive RAID 1 Melbsap1 Log Dump Archive log dump of melbsap1 hourly transaction log

/opt/scribd/conversion/tmp/scratch24826/38867829.doc

SAP System Operations Manual

23-Aug-10

NT Disk Configuration AD1


The following screen image defines the disk configuration of the development system.

C: D: E: F:

SWAP SAP_SQL Database

Root drive containing NT. Contains all NT executables RAID 1 SWAP space for this system RAID 1 SAP/SQL execs, SQL Master, MSDB and TEMPDB - RAID 1 SAP database resides on this drive RAID 5

/opt/scribd/conversion/tmp/scratch24826/38867829.doc

SAP System Operations Manual

23-Aug-10

NetRaid Configuration NetRaid Configuration AP1 AP1 - Adaptor 0

/opt/scribd/conversion/tmp/scratch24826/38867829.doc

SAP System Operations Manual

23-Aug-10

AP1 - Adaptor 1

/opt/scribd/conversion/tmp/scratch24826/38867829.doc

SAP System Operations Manual

23-Aug-10

NetRaid Configuration AC1

/opt/scribd/conversion/tmp/scratch24826/38867829.doc

SAP System Operations Manual

23-Aug-10

NetRaid Configuration AD1

/opt/scribd/conversion/tmp/scratch24826/38867829.doc

SAP System Operations Manual

23-Aug-10

Vendor System Support Contact Numbers Update this for any support contracts between Acacia and HP/Microsoft/SAP.
Products Covered Hewlett Packard Hardware Software SAP Australia Hotline # 1800 633 7777 1800 066 595 Access # Contract #

Problem Logging
Problems reported by the users should be captured on a Problem Issue Form and maintained by the NT/database administrator. All problems, whether application or operating system related should be tracked in this manner. These problem issue forms should be stored in an issues log book, and as responses are received by either SAP, Microsoft or Hewlett Packard, the response to each problem should be attached to the original form. This will provide an audit trail of problems, fixes and a means to verify with the end-user that the original problem was solved. A sample Problem Issue Log Form is shown in the sample forms section.

LAN Environment
System
melbsap1 (Member Srv) melbsap2 (Member Srv) melbsap3 (Member Srv) melbsrv01 (PDC) IP Address 192.168.1.10 192.168.1.11 192.168.1.12 192.168.1.1 Default Gateway 192.168.1.15 192.168.1.15 192.168.1.15 192.168.1.15 Subnet Mask 255.255.255.0 255.255.255.0 255.255.255.0 255.255.255.0

/opt/scribd/conversion/tmp/scratch24826/38867829.doc

SAP System Operations Manual

23-Aug-10

SAP Systems Administration


NT System Startup
The system is set to auto-boot on power up. The normal sequence is to run a power up self-test, which requires about 30-45 seconds to complete. As each test is completed a one line display will indicate the test and its success. If any test fails the system will not boot, but will stop at the console prompt to wait for operator action. When power up tests are complete and all pass, the system will start the NT boot sequence. A blue screen detailing NT kernel build and and service pack level will be displayed. Additional information relating to the number of CPUs and memory a variable will be displayed. This screen defines the loading of the kernel and initialisation of the NT system. At the completion of the NT load process, NT will start a login process for the <SID>ADM account automatically. This has been achieved by setting windows registry entries as follows: Registry key: KKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\Current Version\Winlogon AutoAdminLogon 1 DefaultDomainName METALS DefaultUser AP1ADM DefaultPassword must be entered in the registry entry

Password has not been listed here but

If the automatic login process is to be disabled for a single invocation, hold down the SHIFT KEY when the login process is about to start. You can also login as a different account by holding down the SHIFT KEY whilst using the START BUTTON -> SHUTDOWN -> CLOSE ALL PROGRAMS AND LOGON AS A DIFFERENT USER function. If you login as a different account, the default user in the above registry key is reset. It is very important that the last user that logged into NT is the <SID>ADM account. Once the login process for <SID>ADM is complete, a script will be automatically invoke to start the SAP Application and all the relevant NT services. Refer to the Application startup section of this document for further details.

NT System Shutdown
Windows NT should always be shutdown by the shutdown command, never simply switched off. Before shutting down the system, the SAP application processes must be stopped. If the application is not manually shutdown, the system shutdown procedure will automatically shutdown the application as one of the first shutdown tasks. See the section on Application Startup & Shutdown for details on SAP startup & shutdown.

SAP/SQL Application Startup


During the re-boot process, Windows NT will automatically perform logon processing for the <SID>ADM account (provided that the registry has been updated as mentioned in the NT System Startup section). As an extension to this login process, a batch file has been created that will automatically start the required NT

/opt/scribd/conversion/tmp/scratch24826/38867829.doc

10

SAP System Operations Manual

23-Aug-10

services and application elements in order to support the MS SQL database and SAP application. Script <SID>start.bat is located in the E:\scripts directory and will perform the automated start. A shortcut to this script has been included in the Startup window for the <SID>ADM account so that it is automatically initiated at login. The script will send all output to a logfile stored in the usr\sap\<SID>\DVEBMGS00\work directory called <SID>start.log. Refer to Appendix C for script details. The startup script can be run manually if required or SAP can be manually started using the SAP Service Manager provided that the relevant NT Services are started before hand.

SAP/SQL Application Shutdown


SAP system startup and shutdown is managed via the SAP System Management Console, located under Start Menu Programs. Database startup and shutdown is managed via the SQL Server Service Manager, located in the Windows system tray.

This is simply a nice interface to the NT Services control panel. The database can be started and stopped equally effectively from the services control panel.

Notifying SAP Users


If there are any users logged into the SAP system, you should send out a message indicating the planned application shutdown. This will allow users to cleanly complete their current work and save any changes they have made prior to application shutdown. To generate and send out a system shutdown message to users, issue the following command sequence on the instance to be shut down: Tools --> Admin --> Admin --> System Messages --> Message (SM02) --> Create The screen below will be displayed. You should enter one line of text indicating application shutdown time, and how long system will be unavailable. When you hit ENTER to save the message, each user will see the message displayed on their screen when they complete the next task on their display. Again, a message should be sent out on each SAP instance to be shut down, so that users are properly notified.

/opt/scribd/conversion/tmp/scratch24826/38867829.doc

11

SAP System Operations Manual

23-Aug-10

Once the users have been notified of the planned application shutdown, and you have verified that all SAP users have cleanly closed their sessions and logged out on the instance to be shut down (you should display users to validate this step), you are now ready to shut down the application.

Locking & Enabling Access to an SAP Instance


There will be occasions when you will want to have R/3 up and running, but prevent access to a particular instance -- for example, when you are performing a client copy, language transport, performing system maintenance routines, etc. You can prevent/enable access to a particular instance by using the commands shown below from a DOS Command prompt using the <SID>ADM: To lock an instance: Select the sapmnt share by enter the drive letter mounted by this share. cd trans\bin tp locksys instancename (replace instancename with name of instance to lock) To unlock an instance: tp unlocksys instancename (replace instancename with name of instance to unlock)

/opt/scribd/conversion/tmp/scratch24826/38867829.doc

12

SAP System Operations Manual

23-Aug-10

SAP Client Maintenance


Client Access and Controls
Client maintenance such as client copies. client deletes and client exports can be done using the SAP menu systems or command line utilities. Both methods will be demonstrated where appropriate.

Important note:

When performing a client export, you must drill right down through the logs to ensure that the export was successful. Ie. SCC3 All transport Requests Exports

This may say Successfully completed, but drill down to the next level.

This may look OK, but drill down to the next level!

This may also say Successfully completed but drill down to the next level by clicking on the Details button.

/opt/scribd/conversion/tmp/scratch24826/38867829.doc

13

SAP System Operations Manual

23-Aug-10

As can be seen in this example, despite the three levels of success message, there is still an error, which only turns up in the transport logs! This client export is not useable! Acacia has defined the clients to be setup in the development, consolidation and production environments. To check what clients are configured run transaction SCC4 (menu path: Tools -> Administration -> Client Admin -> Client Maintenance ) The table below shows the current clients for each system:

AD1- Development System


AD1 Client / Use 025 - Configuration Unit Testing 040 - Prototype (Sandbox) 120 Customizing Master ClientInd. X X X ClientDep. X X X ABAP/4 Develop. X X X Trans. Execution X (All) X (All) X (All)

Client 120 will contain configuration only no master or transaction data (other than data required for configuration purposes) will be entered into client 120. The Correction and Transport System will be activated in this client to ensure that configuration changes are captured on transport requests. Client 025 will be used by configurators and developers to perform unit testing. Limited master data and transactional data can be entered into this client. Client 040 will be used as the SAP prototype client for testing and development of new SAP configuration settings. AD1

AC1- Consolidation System


Client / Use 025 - Configuration System Test 040 User PlayPen/Sandbox ClientInd. X X ClientDep. X X ABAP/4 Develop. X X Trans. Execution X (All) X (All)

Client 025 will be available to system testing personnel. It is periodically refreshed from the AP1 system via client copy. Client 040 will be used by the end users for training and SAP familiarisation. This client is a copy of the production client at a point in time, and is also periodically refreshed from AP1 via client copy.

AD1

AP1- Production System


Client / Use 020 - Configuration Master ClientInd. ClientDep. ABAP/4 Develop. Trans. Execution X (All)

Client Creation
The main steps involved in creating a new client are: 1. Define the new client in SAP 2. Ensure sufficient free space in the database 3. Populating new client

/opt/scribd/conversion/tmp/scratch24826/38867829.doc

14

SAP System Operations Manual

23-Aug-10

Due to the large number of archive logs created during the client delete/copy process, the archive log mode should be switched off if possible. See Switching Archive Log Mode section of this document for more information on how to turn archiving off. Updating Client Definition Table (T000) within SAP Run transaction SCC4: The following screen will be displayed.

Client Copy in Same Instance using R3trans


The following procedures are executed at the command prompt and utilise the R3trans facility. 1. Exit to the command prompt 2. Create a control file that contains the following entries: clientcopy source client=001 target client=010 select * 3. Substitute the client ids for the required ones and save the file in an appropriate directory. 4. Run the R3trans utility with the new control file R3trans u 1 w $MYLOGFILE $MYCONTROLFILE Substitute $MYLOGFILE for a log file name you wish to create and substitute $MYCONTROLFILE for the name of the control file created in previous steps. 5. Check the log files for any errors. 6. Once the client copy has completed successfully, archive log mode should be re-

/opt/scribd/conversion/tmp/scratch24826/38867829.doc

15

SAP System Operations Manual


enabled.

23-Aug-10

Client Copy in Same Instance using SAP GUI 1. Login to the new client as user SAP* password PASS
2. Run transaction SCC1 (menu path: Tools -> Administration -> Administration -> Client Admin -> Client Copy). 3. The following screen will be displayed:

4. Enter a profile name in the Selected Profile field. If the whole client is required including users, customising master and transaction data, select the SAP_UAPP profile. 5. Select the source client for the user master. 6. It is advisable to perform a test run before execution if time permits. This will confirm space requirements etc.. 7. Execute the client copy. This process can take up to 2 hours to complete.

Client Copy to Different Instance


Acacia may have a requirement to refresh/repopulate clients from one R/3 instance to another. For example client 010 on AC1 (consolidation) may get repopulated from client 020 on AD1 (development). All existing data in the target client is lost and refreshed with the data from the source client. The steps involved (using the above example) are: 1. Create target client or delete it if it already exists (not definition) 2. Login to the source client

/opt/scribd/conversion/tmp/scratch24826/38867829.doc

16

SAP System Operations Manual

23-Aug-10

3. Run transaction SCC2 (menu path: Tools -> Administration -> Administration -> Client Admin -> Client Transport ). 4. The following screen will be displayed:

5. Enter the normal options except select Export. 6. Execute the request in the background 7. When the export has finished, the following files will be in the transport directory: /usr/sap/trans/data/RTnnnnnn.<SSID> /usr/sap/trans/data/SXnnnnnn.<SSID> /usr/sap/trans/cofiles/KTnnnnnn.<SSID> Where <SSID> is the system id of the source client. 8. Login at the operating system level on the target system as <TSID>adm where <TSID> is the system id of the target. 9. cd /usr/sap/trans/bin 10 tp addtobuffer <SSID>KTnnnnnn <TSID> 11. tp import <SSID>KTnnnnnn <TSID> client=<TCLIENT> U48 12. After the import has successfully completed logon to the new client. 13. Run menu path: Tools -> Administration -> Administration -> Client Admin -> Client Transport -> Client Import A message will indicate that client import post processing needs to be performed. The import process will only perform post processing. It will NOT re-import all the data into this client. 14. After the post posting is complete, run transaction SA38 and execute program RSTXR3TR. 15. Enter in the transport request number for the text/layout set transport. This will be in the format <SSID>KXnnnnnn and will require access to the usr/sap/trans/data/SXnnnnnn.<SSID> datafile. Refer screen image below.

/opt/scribd/conversion/tmp/scratch24826/38867829.doc

17

SAP System Operations Manual

23-Aug-10

Execute the transaction and review the output. All text and layouts have now been imported into the target client.

Client Deletion
There are two methods of deleting a client: - using SAP GUI or R3trans.

Client Deletion using R3trans


1. Go to the command prompt and create a file with the following entries: clientremove client=020 select * 2. Run the following R3trans command using the above file as input: R3trans u 1 w $MYLOGFILE $MYCTLFILE

/opt/scribd/conversion/tmp/scratch24826/38867829.doc

18

SAP System Operations Manual

23-Aug-10

Client Delete using SAP GUI


1. Login to the client to be deleted and ensure no users are logged on to the same client 2. Run transaction SCC5 (menu path: Tools -> Administration -> Administration -> Client Administration -> Special Functions -> Delete Client). 3. The following screen is displayed:

4. If the client definition is also to be removed select the Remove from T000 box. 5. Execute the client delete (usually in background). 6. Monitor progress using transaction SCC3 (menu path: Tools -> Administration -> Client Admin -> Copy Logs).

/opt/scribd/conversion/tmp/scratch24826/38867829.doc

19

SAP System Operations Manual

23-Aug-10

System Change Option


In addition to the client setting, there is a general System Change Option that defines modification access to the entire system. This option is set from the SE06 transaction. The following screen displays the settings for the production environment.

/opt/scribd/conversion/tmp/scratch24826/38867829.doc

20

SAP System Operations Manual

23-Aug-10

System Monitoring
Monitoring Checklists
The purpose of these regular tasks is to ensure that the Production SAP server operates efficiently and reliably be detecting problems early, and to ensure in the event of disaster there is a solid backup history. The areas which need to be considered are: Hardware (particularly disks) Operating System Database Management System Backups SAP kernel SAP Applications Security In each of these areas errors need to be detected and performance issues identified. Wherever possible the escalation conditions and procedures for the tasks will be documented.

Daily Tasks
Transaction DB12 DB02 SM13 SM66 Area Database backups Database freespace Terminated Updates Work processes Comments Check backups Check database freespace Look for failed work processes Look for sessions in error Look for cancelled jobs Look for failed spool jobs List lock entries Count short dumps Ensure client security Keep TemSe database consistent Keep Spool database consistent Who Operator Operator Operator Operator Look for terminated updates in the past 24 hours. Look for work processes which have failed with no restart, or have been running for a long time (>50000 seconds) List batch input sessions from past 24 hours in error List cancelled background jobs from the past 24 hours List all failed spool requests in the past 24 hours List all current database locks Enumerate all short dumps for the past two days Check to ensure that the production client is locked for changes Run a TemSe consistency check and delete any inconsistent records Run a spool consistency check and delete any inconsistent spool jobs Task Description Look for failed backups

SM35 SM37 SP01 SM12 ST22 SCC4 SP12 SPAD

Batch input Background jobs Spool Lock entries Short dumps Client settings TemSe consistency check Spool consistency check

Operator Operator Operator Operator Operator Operator Operator Operator

/opt/scribd/conversion/tmp/scratch24826/38867829.doc

21

SAP System Operations Manual

23-Aug-10

Daily Monitoring Activity Details Task D1.1 - Check Daily Backups - MELBSAP1 Transaction code: DB12
Description of Task Run transaction DB12 in client AP1(020). Check the last successful date under Last full R/3 backup and ensure that it is consistent with the backup schedule (see below). The backups are run nightly at 21:00 for weekdays only. These backups are "online" implying that users can actively execute transactions whilst the backup is occurring. A special backup is taken once a month as a full offline backup using Backup Exec. The monthly job can be reviewed through the Backup Exec software from the consolidation system. Actions Any failed backups should be reported to the Basis Systems Administrator. It will then be escalated to Anglogold for action.

Task D1.2 - Check Database - MELBSAP1 Transaction Code DB02


Description of Task Run transaction DB02 in client AP1(020).

Task D1.3 - Check Terminated Updates - MELBSAP1 Transaction code SM13


Description of Task Run the transaction SM13. Replace your user ID with * Under From date, enter the previous days date, then hit Enter. You should see the following screen.

Errors Detection If an update record appears in red on the output screen, with Status Err, this should be noted in the checklist for action by the basis team.

/opt/scribd/conversion/tmp/scratch24826/38867829.doc

22

SAP System Operations Manual


Actions Any alert conditions should be reported to the Basis Systems Administrator.

23-Aug-10

Task D1.4 Check work processes - MELBSAP1 Transaction code SM66


Description of Task Run transaction SM66. Look for work processes which are in error (they will appear in red) and note them down in the checklist spreadsheet. Errors Detection Work processes which are listed in red, or with a runtime of >50,000 seconds, can be considered to be in error. Actions Any alert conditions should be reported to the Basis Systems Administrator.

Task D1.5 - Check Batch input processing - MELBSAP1 Transaction code SM35
Description of Task Run transaction code SM35. Click on the Incorrect tab to select failed batch input sessions. List all sessions created in the past 24 hours in the checklist. Errors Detection List sessions in error as described above.. Actions Any errors should be reported to the Basis Administrator.

Task D1.6 - Check Background jobs- MELBSAP1 Transaction code SM37


Description of Task Run transaction code SM37. Change the user ID to * and set the From date to the previous day. Choose only Cancelled jobs, and set the Or start after event field to *, as shown:

/opt/scribd/conversion/tmp/scratch24826/38867829.doc

23

SAP System Operations Manual

23-Aug-10

Errors Detection Make a note of all background jobs listed in the checklist spreadsheet. Actions Any errors should be reported to the Basis Administrator.

Task D1.7 - Check Spool errors - MELBSAP1 Transaction code SP01


Description of Task Run transaction code SP01. Change the user ID field to be *, and the from date created to be the previous day, as shown:

Click on Execute. Errors Detection Look for any print jobs which are listed in red, and enter them in the checklist spreadsheet. Actions

/opt/scribd/conversion/tmp/scratch24826/38867829.doc

24

SAP System Operations Manual


Any errors should be reported to the Basis Administrator.

23-Aug-10

Task D1.8 Check lock entries - MELBSAP1 Transaction code SM12


Description of Task Run transaction code SM12. Change the user name to be * and hit Enter. Errors Detection List all lock entries in the checklist spreadsheet. Lock entries older than 24 hours are most likely in error. Actions Any errors should be reported to the Basis Administrator.

Task D1.9 Check short dumps - MELBSAP1 Transaction code ST22


Description of Task Run transaction code ST22. Enter the total number of short dumps under Today and Yesterday in the checklist spreadsheet. Errors Detection All short dumps should be listed in the checklist spreadsheet. Actions Any errors should be reported to the Basis Administrator.

Task D1.10 Check client settings - MELBSAP1 Transaction code SCC4


Description of Task Run transaction code SCC4. Double click on the entry for client 020 (Production client)

/opt/scribd/conversion/tmp/scratch24826/38867829.doc

25

SAP System Operations Manual

23-Aug-10

Errors Detection Check that the two change settings outlined in red above are set correctly. If not, it should be noted in the checklist spreadsheet. Actions Any errors should be reported to the Basis Administrator.

Task D1.11 Check TemSe consistency - MELBSAP1 Transaction code SP12


Description of Task Run transaction code SP12. Choose menu path TemSe Database Consistency Check. This check can take up to 10 minutes. Errors Detection Delete any inconsistent TemSe objects listed in the consistency check report. Actions Any errors should be reported to the Basis Administrator.

Task D1.12 Check Spool consistency - MELBSAP1 Transaction code SP12


Description of Task Run transaction code SP12. Choose menu path TemSe Database Consistency Check. This check can take up to 10 minutes. Errors Detection Delete any inconsistent TemSe objects listed in the consistency check report. Actions

/opt/scribd/conversion/tmp/scratch24826/38867829.doc

26

SAP System Operations Manual


Any errors should be reported to the Basis Administrator.

23-Aug-10

/opt/scribd/conversion/tmp/scratch24826/38867829.doc

27

SAP System Operations Manual

23-Aug-10

SQL Alert Mechanism Set-up SQL Server Settings


To allow interaction with e-mail, and to allow access to network resources MSSQLServer and SQLExecutive are configured to start using the METALS domain account SQLExecSAP.

Mail Configuration
Exchange Server Changes An e-mail account exists for each R/3 system for SQL Alert reporting called *Alert SAP <SID>. A distribution list exists for SAP administrators where any alerts generated are directed. It is called (G) SAP Admin. SQL Server Mail Installation 1) Log onto the server as SQLExecSAP (IMPORTANT) 2) Install the Microsoft Exchange 4.0 client for Windows NT. This is available from \\MELBEXG01\client\winnt\i386\setup.exe. The following options should be used: Name: SAP <SID>, Organisation: Acacia Resources Limited Install Dir: C:\EXCHANGE Install only Microsoft Exchange (not Schedule+) with PAB, personal folders and Exchange Server support. 3) Create a mail profile called <SID> SQL Mail pointing to the *Alert SAP <SID> mailbox on MELBEXG01. 4) Log off and log on as <SID>ADM. 5) In SQL Enterprise Manager, configure mail to start using the <SID> SQL Mail profile, and manually start the mail service. Check the SQL Server Error log to ensure that the mail link started correctly. 6) Using the SQL Setup program, configure SQL Server to autostart the mail client. It will prompt you to re-enter the mail profile name.

/opt/scribd/conversion/tmp/scratch24826/38867829.doc

28

SAP System Operations Manual

23-Aug-10

Backup Processing
Backup Environment Layout
Backups are performed using dedicated DLT tape drives connected to each of the main systems. The software technology used to backup the SAP system is a combination of Seagates Backup Exec v7 with an SQL agent and the native SQL DUMP transaction. Offline backups are required to backup the system files (as opposed to the data). These files do not change very often (usually as a result of a software upgrade or patch). Offline backups of the production machine are performed once per calendar month using Backup Exec on the consolidation machine. Offline backups of the other two machines will be performed once per calendar month on a day not used by the production off-line backup. On the second Wednesday of every month, an offline backup will take place. This will the End Of Month backups (EOM Backups). Nightly backups for the production system are run from Backup Exec. databases: master, msdb and AP1 will be backed up online. A graphical representation of the backup environment is show below: The three

AD1
Database Trans Log Sys Files Ni gh tly

AC1
Database Trans Log Sys Files Ho url y Ni gh tly M on thl y

AP1
Database Trans Log Sys Files

Off-line

Off-line
AP1 Trans Log (Dumped to Q:)

Off-line Nightly

M on thl y

Backup Exec

SQL Server/SAP Native Tools

Transaction Logs
There are two issues that need to be considered with transaction log management. The first is to ensure that the log doesnt fill up thus preventing further update activity on the database, and the second is to ensure that the data recovery requirements are satisfied. The transaction log for AD1 is dumped daily as part of the nightly backup process using

/opt/scribd/conversion/tmp/scratch24826/38867829.doc

29

SAP System Operations Manual


Backup Exec.

23-Aug-10

The transaction log for AC1 is dumped daily as part of the nightly backup process using Backup Exec. Transaction log backups of the AP1 system is a two step process. First, a script in the production SQL Server dumps the transaction log to a share on the consolidation machine. These files are then backed up nightly by Backup Exec running on the consolidation machine. This has an added benefit that in the event of a disaster recovery, the logs will be readily available to reload on the consolidation machine. Any logs over 7 days old will be deleted automatically from the hard disk, but will be saved 5 or 6 times to tape. The diagram above details the transaction dump process. Please refer to Appendix B for the SQL stored procedure.

Logs Filling Up
In general, the transaction log file(s) should be sized so that they never get more than about 50% full. The amount of work the server has to do to manage transactions increases as the transaction log fills. Regular log dumps should ensure that the log is kept less than 40% full. However, should it grow for some reason key operators need to be alerted so that the situation can be investigated and remedied before the database stops allowing updates.

Log Recovery
The business requirement for data recovery is that a maximum of 1 hours data loss in the event of a serious database crash or server failure is acceptable. From each full database backup, every log dump since that full backup is required, and must be applied in the correct order after the database restore in order to bring the system up to the last log dump. In addition, the log dumps need to be stored off the system that generated them in case of hardware failure.

Disk Allocation for SAP Systems Development


The development environment is unlikely to grow significantly as it only contains configuration data and minimal test data. An upgrade of operating system and applications will have the largest effect. Current sizing is as follows: On-line backups: 8Gb Off-line backups: Drive C: D: E: F: Total 0.8Gb 2Gb 2Gb 26Gb Used 0.5Gb 2Gb 1Gb 12Gb

Consolidation System Backups


On-line backups The consolidation environment is not likely to grow significantly once the training clients have been set up. It is expected that the database will be 50% larger than the development box due to extra training clients, ie 12Gb.

/opt/scribd/conversion/tmp/scratch24826/38867829.doc

30

SAP System Operations Manual


Off-line backups

23-Aug-10

The total disk space it will initially be 28Gb, of which 4Gb is swap space (temporary files not requiring backup). Other than the data file, the disk usage will be similar to the development environment.

Production System Backups


On-line backups The production environment is expected to grow at a rate of approximately 150Mb per user per year. There will be approximately 75 high and medium workload users which represents growth of approximately 11Gb/year. The expected starting size is around 12Gb. Off-line Backups The total configured disk size for the production machine is 79Gb, of which 4 will be swap space. The actual volume of data to be backed up offline will be considerably less for the first 18 months as the data files will not be expanded until required. Other than the data file, the disk usage will be similar to the development environment.

Tape Cycles Daily Cycle


On the production system, a full on-line database backup is taken Monday to Friday 52 weeks a year, starting at 9pm Perth local time. The backups are scheduled using Backup Exec. This transaction will build tasks in the SQL Task Schedular and can also be used to monitor the execution status of each backup. On the consolidation system, a full on-line database backup for consolidation and development is taken Monday to Friday. This backup is taken by using the Seagate Backup Exec product. Backup Exec does not have any integration with SAP, therefore, no status information is available from DB13. Please note that the CCMS alert monitor may indicate RED alert conditions for the backup environment due to this lack of integration.

Weekly Cycle
The weekly cycle begins at Week1 and ends at WeekL. This will take into consideration months that contain more than 5 calendar weeks. Week1 Week2 Week3 Week4 WeekL Starts on the first Monday of the month. Follows. Follows. (Only utilised if there is a 5th week within the month) Starts on the last Monday of the month.

Each day the previous nights backup will be sent off site except for the Friday night backup which will be sent off site on Monday.

Monthly Cycle
A new month will start on the first Monday of the month, public holidays included. The monthly tape for the production system will be the last tape in subset WeekL. The monthly tape for the consolidation and development system will be the last tape in subset WeekL provided that it is an on-line backup (ie not Friday night). Otherwise the previous nights backup will be the monthly tape. The off-line backup of the production system will be taken on the last Sunday of the

/opt/scribd/conversion/tmp/scratch24826/38867829.doc

31

SAP System Operations Manual


month.

23-Aug-10

The off-line backup of the consolidation and development systems will be taken on the first Sunday of the month. Tapes will remain offsite for 11months.

Yearly Cycle
The new backup year will commence from the first Monday in January, public holidays included. The yearly tape will be the December offline tape for each of the systems. The yearly tapes will remain offsite for as long as audit requires.

Tape Labeling Daily


Production CDnnA CDnnB Where: C D nn A B = = = = = Tape Type representing Cartridge Backup Type representing Database The day of the month First tape of this backup set Second tape of this backup set First tape Second tape

Consolidation and Development MELB SAP2/3 W1 01 MELB SAP2/3 W1 02 Where: MELB SAP2/3 W1 01 Indicates the site location Indicates system being backed up (SAP2/3 = AC1 and AD1) The week of the cycle The day and the number of the tape (if more than one tape is required) First Monday of the month Second day of week 1

Monthly
Production Online Offline CDnnA SAP AP1 F NOV 1998

Consolidation and Development Online Offline MELB SAP2/3 W1 01 SAP AC1 F NOV 1998

The F indicates an offline (filesystem) backup

/opt/scribd/conversion/tmp/scratch24826/38867829.doc

32

SAP System Operations Manual

23-Aug-10

Yearly
Production Offline SAP AP1 F NOV 1998

Consolidation and Development Offline SAP AC1 F NOV 1998

Monitoring Backup Execution Backup Alerts


Alerts for failed backups are automatically generated by SQL Server for SQL Server database backups and transaction log dumps. These alerts are e-mailed to SAP Administrators. For the development and consolidation systems, inspection of the Backup Exec log is required to identify problems. Please refer to the daily Checklist for details on monitoring backup execution.

Displaying Backup Logs


This monitor will display a history of the database backups and redo log archiving. To get to the main backup monitor screen run transaction DB12 (menu path: Tools -> Admin -> Computing Centre -> Management System -> Monitor -> Backup).

This screen displays important information such as the result (message and return) code of the last database backup. If a non-zero value is displayed then the backup completed with warnings or errors. Check on these by displaying the complete log. If this is the only backup method adopted by Acacia, then this backup should not be more than 24 hours old. However, if additional backups are taken using third party tools they will not appear on this screen. Check on the status of the transaction logs by clicking on the Overview of database Logs button.

/opt/scribd/conversion/tmp/scratch24826/38867829.doc

33

SAP System Operations Manual

23-Aug-10

Database Administration and Recovery


Monitoring Database Space
SAP database allocation should be monitored on a regular basis for expansion requirements. A snapshot of the database allocation sizes should be taken on a weekly basis. This can be done by running transaction DB02 (menu path: Tools -> Admin -> Monitoring -> Performance -> Database -> Tables/Indexes ).

Please refer to the System Monitoring section of this document for further database checks

Expanding a Database
Database allocation expansion is accomplished using the SQL Enterprise Manager. This tool can only be run from the sa account of the instance you want to perform the expansion in. To run SQL Enterprise Manager: Start -> Programs -> Microsoft SQL Server 7.0 Utilities -> SQL Enterprise Manager For a detailed description of the expansion process, refer to the Books Online provided with the SQL product. To run SQL Books Online: Start -> Programs -> Microsoft SQL Server 7.0 Utilities -> SQL Server Books Online

Recovering from a Corrupt Master Database


To commence recovery you will need:

/opt/scribd/conversion/tmp/scratch24826/38867829.doc

34

SAP System Operations Manual


23-Aug-10

A tape with an on-line backup of the master and msdb databases The size and device layout of the master and msdb databases The character set and sort order defined with SQL Setup was run Name of the tape device that that backups were taken on Hardcopy of the server configuration options Hardcopy of sysdevices

Recovery Procedures 1. 2. 3. 4. 5. 6. 7. Stop SQLServer (if it is running) Rename E:\MSSQL\DATA\MASTER.DAT to E:\MSSQL\DATA\MASTER.DAT.BKP Run the SQL Server Setup program from the SQL Server program group Select the Rebuild Master Database option. The same Sort Order and Character set must be supplied. The installation location is E:\MSSQL and the master device location is E:\MSSQL\DATA\MASTER.DAT. The hardcopy of sysdevices should show the size required for this device is 2K pages. For Acacia SAP installations this value should be 30 Mb. Start SQL Server and add the tape drive as a dump device as follows: Start SQL Enterprise Manager Right-click on MELBSAP1 and select Register Change the login details to Username: sa Password: <blank>. (This is required as the rebuild of the master database resets the login information.) Click Modify Expand the tree view under MELBSAP1, right click on Backup Devices and select New Backup Device Name: R3DUMP0 Type: Tape 8. Stop SQL Server and start in single user mode: From the command line; cd \MSSQL\BINN sqlservr /c /m 9. Start SQL Enterprise Manager and restore the master database from the backup /restore window using the tape as follows: Right click the database model and select Backup/Restore Click the Restore tab Click From Device Select R3DUMP0 after inserting the correct tape with the most recent model on-line backup. Wait for the tape operation to complete Ensure that the target database is model. Select model from the window headed Backup Information and then select Restore Now 10. After the restore has completed SQLServer will shut down 11. Restart SQLServer using the SQL Service Control Manager. Do not restart the SQL Executive the msdb database which contains scheduled tasks etc. will have been overwritten as part of the master database rebuild. 12. Modify the server registration in SQL Enterprise Manager as per Step 7 as the logins have now been restored. 13. Ensure that the msdb device fragments are the same as they were before the corruption by issuing the following in a query window and comparing with the hardcopy output of sysusages for dbid=4. The segmap and size should be the same and appear in the same order: select * from master..sysusages go

/opt/scribd/conversion/tmp/scratch24826/38867829.doc

35

SAP System Operations Manual


The msdb database may need to be expanded.

23-Aug-10

14. Restore the msdb database from the database backup/restore window as follows: Right click on the msdb database, select Edit then the Options tab. Turn on the Single User option Click the Restore tab Click From Device Select R3DUMP0 after inserting the correct tape with the most recent msdb on-line backup. Wait for the tape operation to complete. Ensure that the target database is msdb. Select msdb from the window headed Backup Information and click Restore Now. When the restore has completed: right click on the msdb database, select edit then the options tab. Turn off the single user option. 15. Start the SQL Executive Service using the SQL Service Control Manager. Check that all scheduled tasks appear. 16. Check the Server Configuration is correct by looking in the Running column against each of the server configuration options. Note that the User Connections and Show Advanced Options may not have reset correctly. 17. Change values to what is shown on hardcopy of sp_configure and select Apply. Some options will not be visible until the Show Advanced Options is correctly set. 18. Stop SQL Server and restart. Verify that all configuration options are now running with the correct values. 19. Start SAP and verify that the system is working correctly.

Recovering from a Corrupt msdb Database


The msdb database holds all the scheduling and alert data for SQL Server. To commence recovery you will need:

A on-line backup of msdb database on tape SAP is running throughout the restore

Recovery Procedures 1. 2. In Enterprise Manager, stop the SQL Executive Service Restore the database using SQL Enterprise Manager Set msdb to single-user mode Right click the database msdb and select Backup/Restore Click the Restore tab Click From Device Select R3DUMP0 after inserting the correct tape with the most recent msdb on-line backup Wait for the tape operation to complete Ensure that the target database is msdb. Select msdb from the window headed Backup Information and click Restore Now 3. 4. In Enterprise Manager, start the SQL Executive Service Review the scheduled tasks.

Recovering from Corrupt or Missing SAP Executables


Requirements:

/opt/scribd/conversion/tmp/scratch24826/38867829.doc

36

SAP System Operations Manual

23-Aug-10

Off-line backup SAP and SQL Server must not be running

Procedures: 1. 2. Using the off-line backup tape created from Backup Exec, restore all directories under \MSSQL except for the LOG subdirectory Start SAP using the SAP Service Control Manager and record any errors

Recovering from a full Model DB Transaction Log


At SQL Server startup, the tempdb database is initialised from the model database. If the model database is corrupt the tempdb wont initialise and SQL Server wont start. The model db may become effectively corrupt if its transaction log fills. Procedures: 1. 2. 3. Start SQL Server in a special mode which recovers only the master database. From the command prompt: sqlservr c T3608 T4022 (case sensitive) Start an isql session in another command prompt: isql U sa (enter the password when prompted) Execute the following: sp_dboption model, no chkpt, true go use model go checkpoint go 4. 5. Exit isql (ctrl-c) and stop SQL Server by pressing ctrl-c in the original command prompt Restart SQL Server normally. Execute the following: dump tran model with no_log go sp_dboption model, no chkpt , false go use model go checkpoint go 6. Start SAP and verify the system by inspecting SQL Server and SAP error logs

/opt/scribd/conversion/tmp/scratch24826/38867829.doc

37

SAP System Operations Manual

23-Aug-10

Disaster Recovery Information


The most up to date versions of the following items should be available at all times at the disaster recovery site: Category PC-Related

Description
TCP/IP SAP GUI Terminal Emulation Local config files (*.ini) Blank Install Guide NT Operating System Complementary Layered Products Systems Firmware Update Owners Manual for each system Hardware config utilities Disklabel layout System software licenses SAP software license Directory layout NT/SAP Operations Man. SAP Online Doc. Cleaning Tape Scratch Tapes Backup of root and /usr partitions Code Backup (SQLServer & SAP structures) Backup of NT level user accts Backup of SAP Transport area from source system

Version

Media Type

Comments

Date Updated

WIN NT

3.5 disk Manual CD-ROM CD-ROM CD-ROM Manuals Manuals and media Hard copy Hard copy Hard copy Hard copy Manual CD-ROM Tape Tape Tape Will need new license.

System

Misc.

Backup media to be regularly updated

Tape Tape Tape

Total system recovery to the AC1 system. (No forward recovery)


This procedure define a restore of the complete system from a non-booting system using the Seagate Backup Exec Intelligent Disaster Recovery software. It also restores accidentally deleted partitions and quickly recreating the system on new hardware supplied by HP (provided there is sufficient disk space.)

/opt/scribd/conversion/tmp/scratch24826/38867829.doc

38

SAP System Operations Manual

23-Aug-10

In order to complete this restore, the following items are required: A full off-line backup of MELBSAP1, a set of IDR boot disks for MELBSAP1, the MELBSAP1 IDR recovery disk, NT 4.0 Server CD-ROM, MELBSAP1 - HP Netserver Win NT Drivers Diskette

Required Equipment/Software
1) 2) 3) 4) 5) 6) 7) IDR modified Win NT disks. NT 4 server CD IDR Diskette created by Backup Exec with recent copy of MELBSAP1.DR Full off-line backup of MELBSAP1 that you wish to restore from. MELBSAP1 - HP Netserver Win NT Drivers Diskette. Hard copy of the disk partition layout from disk administrator. Most recent database backup and subsequent transaction log dumps. NOTE: If you are restoring onto MELBSAP2 you will need to copy the logs off onto another system first, and back them up. They will live in the Q: drive which should not be touched by the IDR process anyway.

Recovery Phase
1) 2) 3) 4) 5) 6) 7) 8) 9) 10) 11) 12) 13) 14) 15) 16) Insert NT Boot floppy created using the winnt /ox. Boot the system. When requested, insert the IDR modified setup disk 2. Select C for Custom Setup when prompted. Select S to skip mass storage device detection Select S to specify additional SCSI Adaptors, CD-ROM drives or special disk controllers. Press Enter to select Other Manufacturer Supplied Drivers. Insert MELBSAP1 - HP Netserver Win NT Drivers Diskette. (<Alternative Location any similar server in C:\WINNT\UTILS\NT4LXRDrivers>) and press enter. Select Adaptec AHA-2940/AIC-78xx (PCI) Windows NT 4.0 and press enter. When this has loaded, press S to select another storage device. Select Other and press enter. Leave the diskette from step 7 in the drive and press enter. Select Hewlett-Packard NetRAID Adaptor Driver, Windows NT 4.0 and press enter. When this has loaded, press enter to continue. Insert MELBSAP1, Winnt OX Setup Disk #3, IDR Modified into the drive when requested and press enter. When prompted, insert the NT 4.0 CD-ROM into the CD-ROM drive and press enter. Accept the system components presented: MPS Multi-Processor PC, Auto-Detect display, XT AT or enhanced keyboard (83-104 keys), US keyboard layout and Logitech Mouse Port Mouse. To do this, use the up and down arrows until you highlight The above list matches my computer and press enter. Accept first area of unpartitioned space (generally about 4055Mb) - this should be on the first logical drive (LD0) - the EISA utilities should already be in a separate 8Mb partition on this drive. Press C to create a partition in this space, of size 4055Mb. Hit Enter once the partition is created to install onto that partition, and press enter to accept the warning about creating a DOS partition > 2Gb. When prompted, insert the disk labelled MELBSAP1 - HP Netserver Win NT Drivers Diskette and press enter. When prompted, insert the disk labelled MELBSAP1 - Seagate IDR Recovery Disk and press enter. When file copying has completed, remove the floppy disk and CD-ROM (important) and press enter to restart the system. The system will reboot into the Intelligent Disaster Recovery for NT program. Insert the diskette containing the DR file (in our case MELBSAP1 - Seagate IDR Recovery Disk) and click Next. Highlight the MELBSAP1.DR file and click Next. Select Restore Original Layout for the Hard disks and click next. Note that this section is where the configuration can be modified to allow for a different disk structure.

17) 18) 19) 20) 21) 22) 23) 24) 25)

/opt/scribd/conversion/tmp/scratch24826/38867829.doc

39

SAP System Operations Manual


26)

23-Aug-10

Note: It is likely you may get an error message when restoring the original partitions. If this is the case, select the disk administrator option to recreate the partitions manually. If you do this, ensure that the partition sizes you select for each partition are no greater than the hard disk available - this is especially important with the NetRAID systems as disk administrator reports more disk space than is available. You will require the print outs from disk administrator in the manual to complete this. Do not alter the Q: drive if you are restoring to the Consolidation system as this contains the transaction log dumps. It will save you having to restore them later. 27) Commit the changes in disk administrator and exit it. 28) Click next. 29) The system will search for a tape drive. Select the tape drive and click next. 30) Select all drives to be automatically restored and click next. 31) Select next to restore the data from the media in the tape drive. 32) Insert the media into the specified tape drive and click next. 33) Click next to restore the next drive (drive D: ). At this point it is possible to restore from a different tape - in other words you can restore each drive from a different tape if necessary. 34) Click next to restore from the tape in the current drive. 35) Repeat the previous two steps for the remaining drives. 36) Ignore options to run cmd.exe or edit boot.ini. 37) Remove all disks and CD-ROMs from drives. 38) Click next to restart. 39) Check event viewer for any errors. 40) Start SAP and inspect trace files and startup log for any errors. Inspect the SQL Server error log for errors. 41) Stop SAP and SQL Server services. 42) Run cmd.exe. 43) Change to drive D:\. 44) Run convert C: /FS:NTFS. 45) Restart the system. 46) Start SAP and inspect all error logs as per step 39 & 40. Restart the system, start SAP and inspect all error logs as per step 39 & 40.

Total system recovery to the AC1 system. (With forward recovery) Required Equipment/Software
1) 2) 3) IDR modified Win NT disks for MELBSAP2. Note that this set of disks can be created on any of the 3 SAP machines - they will be identical. NT 4 server CD IDR Diskette created by Backup Exec with recent copy of MELBSAP2.DR. Again, this can be created on any SAP machine running Backup Exec and the system can be recovered without the DR file if this file has been lost or corrupted. The DR file should also be on any backup of MELBSAP2 as a normal filesystem file. Full off-line backup of MELBSAP2 that you wish to restore from. MELBSAP1 - HP Netserver Win NT Drivers Diskette. Hard copy of the disk partition layout from disk administrator. Most recent database backup and subsequent transaction log dumps.

4) 5) 6) 7) 8) 1)

System Recovery Phase


NOTE: IF RESTORING ONTO THE CONSOLIDATION MACHINE, GET AN OFFLINE BACKUP ONTO TWO SEPARATE TAPES OF ALL THE TRANSACTION LOG DUMPS FROM THE PRODUCTION MACHINE. These will be the Q: drive. This is necessary to perform the roll forward later on. The IDR process should not affect the Q: drive, but backing it up is still recommended. Insert NT Boot floppy created using the winnt /ox. Boot the system. When requested, insert the IDR modified setup disk 2. Select C for Custom Setup when prompted. Select S to skip mass storage device detection

2) 3) 4) 5)

/opt/scribd/conversion/tmp/scratch24826/38867829.doc

40

SAP System Operations Manual


6) 7) 8) 9) 10) 11) 12) 13) 14) 15) 16) 17) 18) 19) 20) 21) 22) 23) 24) 25) 26)

23-Aug-10

27) 28) 29) 30) 31) 32) 33) 34) 35) 36) 37) 38) 39) 40) 41) 42) 43) 44) 45) 46) 47)

Select S to specify additional SCSI Adaptors, CD-ROM drives or special disk controllers. Press Enter to select Other Manufacturer Supplied Drivers. Insert MELBSAP1 - HP Netserver Win NT Drivers Diskette. (<Alternative Location any similar server in C:\WINNT\UTILS\NT4LXRDrivers>) and press enter. Select Adaptec AHA-2940/AIC-78xx (PCI) Windows NT 4.0 and press enter. When this has loaded, press S to select another storage device. Select Other and press enter. Leave the diskette from step 7 in the drive and press enter. Select Hewlett-Packard NetRAID Adaptor Driver, Windows NT 4.0 and press enter. When this has loaded, press enter to continue. Insert MELBSAP2, Winnt OX Setup Disk #3, IDR Modified into the drive when requested and press enter. When prompted, insert the NT 4.0 CD-ROM into the CD-ROM drive and press enter. Accept the system components presented: To do this, use the up and down arrows until you highlight The above list matches my computer and press enter. Select the C: drive and delete the partition. Recreate it the same size by selecting the newly formed unpartitioned space on the first logical drive and pressing C to create. Press enter to continue - ignore the warning about the DOS partition. When prompted, insert the disk labelled MELBSAP1 - HP Netserver Win NT Drivers Diskette and press enter. When prompted, insert the disk labelled MELBSAP2 - Seagate IDR Recovery Disk and press enter. When file copying has completed, remove the floppy disk and CD-ROM (important) and press enter to restart the system. The system will reboot into the Intelligent Disaster Recovery for NT program. Insert the diskette containing the DR file (in our case MELBSAP2 - Seagate IDR Recovery Disk) and click Next. Highlight the MELBSAP2.DR file and click Next. Ensure that the current disk partitions are at least as big as the original ones. Select Use Current Disk Layout and click next then make any modifications to match the original partition layout using disk administrator. Remember to reassign Z: to the CD-ROM. It is a good idea to reformat all drives other than drive C: and the drive with the transaction log dumps (Q: - check on the print-out what logical drive this actually is) at this point to give the restore a clean place to start. Commit any changes in disk administrator and exit it. Click next. The system will search for a tape drive. Select the tape drive and click next. Select all drives to be automatically restored and click next. Select next to restore the data from the media in the tape drive. Insert the media into the specified tape drive and click next. Click next to restore the next drive (drive D: ). At this point it is possible to restore from a different tape - in other words you can restore each drive from a different tape if necessary. Click next to restore from the tape in the current drive. Repeat the previous two steps for the remaining drives. Ignore options to run cmd.exe or edit boot.ini. Remove all disks and CD-ROMs from drives. DO NOT DO THIS UNTIL MELBSAP2 HAS BEEN SHUT DOWN FOR AT LEAST 20 MINIUTES. This is to prevent duplicate system names on the network. Click next to restart. Check event viewer for any errors. Start SAP and inspect trace files and startup log for any errors. Inspect the SQL Server error log for errors. Stop SAP and SQL Server services. Run cmd.exe. Change to drive D:\. Run convert C: /FS:NTFS. Restart the system. Start SAP and inspect all error logs as per step 37 & 38. Restart the system, start SAP and inspect all error logs as per step 37 & 38.

/opt/scribd/conversion/tmp/scratch24826/38867829.doc

41

SAP System Operations Manual

23-Aug-10

Database Recovery Phase


1) 2) 3) 4) Stop SAP and SQL Server. Stop all Backup Exec Services using the Services icon in the control panel. Restart SQL Server and immediately set AC1 database to single user mode. Using SQL Enterprise Manager, reload the database dump from tape as follows: Right click on database and select backup/restore Select the restore tab. Click FROM DEVICE Select R3DUMP0 device. Select msdb as the database to restore into, and select msdb to restore. Click Restore Now to restore. Select AC1 as the database to restore into, and select AC1 to restore. Click Restore Now to restore. For an SAP database this will take several hours. When the Restore Complete message box comes up, click OK and inspect the server error log to see when the restore completed. DO NOT DO ANYTHING ELSE BEFORE PROCEEDING TO THE NEXT STEP. Close the backup restore window and highlight the master database. Open an iSQL window. Load each of the transaction logs that were created since the database was dumped using the following SQL run from within the master database for each file. LOAD TRANSACTION AC1 FROM DISK = \\MELBSAP2\SAPLogDumps\AP1\AP1_log_yyyymmddhhmm.dmp Note - these must be run for each log dump in the correct chronological order. Note too that these will be on Q:\AP1\ if restoring the production system onto the consolidation system. Reboot the system and start SAP. Check that the IDR SAP jobs created in the preparation phase now exist on the system.

5)

6) 7) 8)

9)

Reset the Network card configuration


1) 2) 3) 4) 1) 2) In the Network Neighbourhood properties the network adaptor was removed. The system was rebooted In the Network Neighbourhood properties the network adaptor was added. The system was rebooted On MELBSRV01, go into Server Manager for Domains and delete MELBSAP2 On MELBSAP2, go into network neighbourhood properties and click Change on the first screen. Change from Domain METALS to Workgroup METALS and click OK. Click Change again and change from Workgroup MELTALS to Domain METALS and select Create account on domain. Fill in a domain admin user and password and click OK. Reboot the system.

3)

The system should now be visible on the network. Start SAP as usual.

Restore the SAP database SQL DB and Device Rebuild


This procedure defines the recovery procedures for recovering the SAP AP1 database onto the AC1 Server. Note that it should be possible to recover every committed transaction up to the time of the failure provided that the Transaction Log devices are not damaged (which is unlikely as they are on mirrored disks). A tape with an on-line backup of the SAP database is required, together with all transaction logs since that database backup and a device fragment map of the database. The names and locations of the database and log devices should be noted.

Recovery Procedure

/opt/scribd/conversion/tmp/scratch24826/38867829.doc

42

SAP System Operations Manual

23-Aug-10

1) 2) 3) 4) 5) 6) 7) 8) 9) 10) 11)

12) 13) 14) 15) 16)

17) 18) 19)

Shutdown SAP Stop SQL Server on AP1 Shutdown Windows NT and power down the AP1 system. This will simulate the production hardware becoming unavailable. Obtain the most recent backup of the AP1 database. Obtain configuration documentation for the AP1 database environment (E.g. Device layout) Insert this tape into the tape unit attached to the AC1 system. Shutdown SAP on the consolidation system Ensure that no scheduled tasks are still executing from within the SQL Task Schedular Shutdown the SQL database on the AC1 system as normal Open a DOS command prompt and start the SQL server in single user mode. This can be achieved by issuing the following command: sqlservr /m Check the log display from the SQL Server startup to ensure that the database has been started in Single User Mode. You should see the following messages: *** Warning *** Database in Single User Mode *** Warning Once the database has started successfully, start the Enterprise Manager and open an SQL Query Window. Run the sp_sysusages stored procedure to determine any differences in device layout If layout is not the same, open SQL Query Window and run the sp_removedb,dropdev stored procedure to remove the AC1 database. Delete the data files from the file system for database AC1. They will be named AC1Data1.DAT and AC1Log.DAT. Recreate the AC1 database with initial data device and log device size as per the first two entries in sysusages. Select the Create For Load option to speed the creation of the database. Expand the database and log as per the entries in sysusages ensuring that the expansions are done in the same order as in sysusages. Load the database into AC1 off tape using the Tools -> Manage Database Backup/Restore menu from within SQL Enterprise Manager. Use R3DUMP0 as the dump device. This will use the DLT Tape Unit attached to the AC1 system. Ensure that the transaction logs are also selected as part of the database restore process. Once the restore is complete, perform the steps described as part of the Homogeneous database copy process. This documentation can be found on the DB Export CD 1 CD in DOCU\INSTDOC\HOMCOP\R3HOM.PDF. You will need the Acrobat View to read this PDF file.

/opt/scribd/conversion/tmp/scratch24826/38867829.doc

43

SAP System Operations Manual

23-Aug-10

Restore the SAP database from Nightly Backup Tape


This procedure defines the recovery procedures for recovering the SAP AP1 database from the previous nightly backup. Note that it should be possible to recover every committed transaction up to the time of the failure provided that the Transaction Log devices are not damaged (which is unlikely as they are on mirrored disks). A tape with an on-line backup of the SAP database is required, together with all transaction logs since that database backup. It may be necessary to re-call the backup tape from offsite storage. The current service level agreement defines a maximum re-call period of 1 hour. This scenario is applicable when the SAP database is inconsistent or data has been accidentally deleted from within SAP.

Recovery Procedure
1) 2) 3) 4) 5) 6) Shutdown SAP Obtain the most recent backup of the AP1 database. Obtain configuration documentation for the AP1 database environment (E.g. Device layout). This is used for reference information only and is not required as part of this restore process. Insert this tape into the tape unit attached to the AP1 system. Ensure that there are NO SQL scheduled tasks with status ENABLED. This can be achieved by invoking the Task Schedular from within the Enterprise Manager and modifying each of the scheduled tasks to de-select the ENABLE tick box. Set the status of the AP1 database to SINGLE USER. This can be achieved by opening the Enterprise Manager and selecting the MELBSAP1 system from the Server Manager window. Open the DATABASES section and double click on the AP1 database. Select the OPTIONS tab and single click on the SINGLE USER tick box. Select OK when this has been done.

You are now ready to start the restore process. 7) From the Enterprise Manager, select Tools -> Database Backup/Restore. This will display the Backup/Restore MELBSAP1 window. 8) Select the Restore Tab and then select the AP1 database. A display window will detail all the backups and transaction logs that are available for restore processing. By default, the Database and/or Transaction Log radio button will be active. 9) Select the backup version and transaction logs that will be used in this restore operation. 10) To start the restore process, select the Restore Now button. A status window and bar will be to indicate restore progress. The Busy light on the tape unit should be flashing when the restore is active. Note: The restore process will take approximately 4 hours to restore a database of 15 Gb. Restore processing will automatically restore from tape and apply the selected transaction logs for forward recovery. Once the restore is complete, SQL Server will automatically restart. 11) Ensure that all SQL scheduled tasks from the SQL Task Schedular are changed back to an ENABLE status. This is the opposite procedure to that described in item 6). 12) Reset the status of the AP1 database from SINGLE USER. This can be achieved by opening the Enterprise Manager and selecting the MELBSAP1 system from the Server Manager window. Open the DATABASES section and double click on the AP1 database. Select the OPTIONS tab and single click on the SINGLE USER tick box. This will toggle the SINGLE USER switch off un-ticked. Select OK when this has been done. 13) Shutdown and re-boot entire NT system for MELBSAP1. This will allow a clean start of the entire environment. MS SQL and SAP will automatically start as part of the boot sequence. (AP1ADM will autologon and run the AP1Start script starting SQL and SAP) 14) Once the MELBSAP1 system is up and running, logon to SAP using the SAPGUI.

/opt/scribd/conversion/tmp/scratch24826/38867829.doc

44

SAP System Operations Manual

23-Aug-10

15) Check the SAP system SQL logs for any unusual errors. (Transaction SM21, SQL tools)

/opt/scribd/conversion/tmp/scratch24826/38867829.doc

45

SAP System Operations Manual

23-Aug-10

Restore the SAP system from the Monthly Backup Tape with forward recovery
This procedure defines the recovery procedures for recovering the SAP and SQL environments from the monthly backup. Note that it should be possible to recover every committed transaction up to the time of the failure provided that the Transaction Log devices are not damaged (which is unlikely as they are on mirrored disks). Tapes containing the offline monthly backup for MELBSAP1 and on-line backup of the SAP database is required, together with all transaction logs since the last database backup. It may be necessary to re-call the backup tapes from offsite storage. The current service level agreement defines a maximum offsite re-call period of 1 hour. This scenario is applicable when database corruption has occurred and MS SQL will not start due to database inconsistencies.

Recovery Procedure
1) 2) Logon to the SQL Enterprise Manager and select the SQL Query tool. Issue the sp_help_revdatabase to obtain the latest information regarding segmentation of the MASTER, MSDB and AP1 databases. Issue the sp_configure to obtain the latest MS SQL configuration setting. Print and save the output. 3) Shutdown the NT system and perform a re-boot. Please ensure that the login script for AP1ADM is interrupted during system startup processing. 4) During system re-boot, NT will automatically logon the AP1ADM account, thus initiating the SAP/SQL startup script. This processing MUST be interrupted by holding down the SHIFT key prior to the NT LOGIN window being displayed. This will ensure that no SAP or MS SQL services are started. 5) Start the Backup EXEC services using the NT Service Manager. (Control Panel -. Services) 6) Obtain the monthly offline tape and insert it into the tape unit attached to the MELBSAP1 system. 7) Start the Backup EXEC user interface and create a RESTORE job to restore drives E: (MSS_SQL drive), F: (MS_SQL database drive) and G: (Transaction Log drive) 8) Submit the restore job to execute immediately.

This restore process will take approximately 4 hours to restore 20Gb of data. 9) Once the restore procedure is complete shutdown and re-boot the NT system. The re-boot process will restart the MS SQL and SAP environments. You will be able to login to SAP but the environment is current to the end of the month. 10) Logon to the SQL Enterprise Manager and select the SQL Query tool. 11) Issue the sp_help_revdatabase to obtain the latest information regarding segmentation of the MASTER, MSDB and AP1 databases. Issue the sp_configure to obtain the latest MS SQL configuration setting. Print and save the output. 12) Compare the segmentation and configuration on the MS SQL environment as any database extensions or configuration changes implemented since the last monthly backup will need to be performed again. 13) Once any database extensions and configuration changes have been completed, you are ready to start the MSDB database restore process. 14) In Enterprise Manager, stop the SQL Executive Service 15) Restore the database using SQL Enterprise Manager Set msdb to single-user mode Right click the database msdb and select Backup/Restore Click the Restore tab Click From Device Select R3DUMP0 after inserting the correct tape with the most recent msdb on-line backup Wait for the tape operation to complete

/opt/scribd/conversion/tmp/scratch24826/38867829.doc

46

SAP System Operations Manual

23-Aug-10

Ensure that the destination database is msdb. Select msdb from the window headed Backup Information and click Restore Now 16) In Enterprise Manager, start the SQL Executive Service 17) Review the scheduled tasks 18) Once the MSDB database has been restored, start the restore process for the AP1 database. BUT DO NOT SELECT ANY TRANSACTION LOGS for forward recovery. Forward recovery from the transaction logs is detailed later in this procedure. 16) Shutdown SAP 17) Obtain the most recent backup of the AP1 database. 18) Obtain configuration documentation for the AP1 database environment (E.g. Device layout). This is used for reference information only and is not required as part of this restore process. 19) Insert this tape into the tape unit attached to the AP1 system. 20) Ensure that there are NO SQL scheduled tasks with status ENABLED. This can be achieved by invoking the Task Schedular from within the Enterprise Manager and modifying each of the scheduled tasks to de-select the ENABLE tick box. 21) Set the status of the AP1 database to SINGLE USER. This can be achieved by opening the Enterprise Manager and selecting the MELBSAP1 system from the Server Manager window. Open the DATABASES section and double click on the AP1 database. Select the OPTIONS tab and single click on the SINGLE USER tick box. Select OK when this has been done. You are now ready to start the restore process. 22) From the Enterprise Manager, select Tools -> Database Backup/Restore. This will display the Backup/Restore MELBSAP1 window. 23) Select the Restore Tab and then select the AP1 database. A display window will detail all the backups and transaction logs that are available for restore processing. By default, the Database and/or Transaction Log radio button will be active. 24) Select the backup version and transaction logs that will be used in this restore operation. 25) To start the restore process, select the Restore Now or "from Device" button. A status window and bar will be to indicate restore progress. The Busy light on the tape unit should be flashing when the restore is active. Note: The restore process will take approximately 4 hours to restore a database of 15 Gb. Restore processing will automatically restore from tape. Once the restore is complete, SQL Server will automatically restart. 26) In order to complete a forward recovery, Open an iSQL window using the MS SQL tools. 27) Load each of the transaction logs that were created since the database was dumped using the following SQL run from within the master database for each file. LOAD TRANSACTION AP1 FROM DISK = \\MELBSAP2\SAPlogDumps\AP1\AP1_log_yyyymmddhhmm.dmp Note - these must be run for each log dump in the correct chronological order. You may also copy the "LOAD TRANSACTION." Statements into a wordpad document then copy them individually into the iSQL query window. 28) Ensure that all SQL scheduled tasks from the SQL Task Schedular are changed back to an ENABLE status. 29) Reset the status of the AP1 database from SINGLE USER. This can be achieved by opening the Enterprise Manager and selecting the MELBSAP1 system from the Server Manager window. Open the DATABASES section and double click on the AP1 database. Select the OPTIONS tab and single click on the SINGLE USER tick box. This will toggle the SINGLE USER switch off un-ticked. Select OK when this has been done. 30) Shutdown and re-boot entire NT system for MELBSAP1. This will allow a clean start of the entire environment. MS SQL and SAP will automatically start as part of the boot sequence. (AP1ADM will autologon and run the AP1Start script starting SQL and SAP) 31) Once the MELBSAP1 system is up and running, logon to SAP using the SAPGUI. 47

/opt/scribd/conversion/tmp/scratch24826/38867829.doc

SAP System Operations Manual

23-Aug-10

32) Check the SAP system SQL logs for any unusual errors. (Transaction SM21, SQL tools)

Copy Prod (AP1) to Dev box as AP2


From time to time, Anglogold Ashanti will require AP2 on the Dev box (AUPESAP03) to be refreshed from AP1. Please refer to OSS Note 151603 (Copying an SQL Server database) and the SAP document on homogeneous system copies. AngloGold Ashanti performs the first part of this procedure by using Backup Exec to copy just two files (logs and database) from AP1 to the G: and H: drives respectively on the Dev box. IBM then commences from step 7a (Attaching the database) in Note 151603. Launch Query Analyser and execute the following: use master exec sp_attach_db 'AP2', H:\AP2DATA1\ap1data1.mdf', 'G:\AP2LOG1\ap1log1.ldf' (Anglo has no .ndf files) (To execute this, click on the blue tick and then the green arrow. The results pane should advise you that the command was successful.) Now, reopen Enterprise Manager and you should see the AP2 database. As per step 8, the next task is to create logins for AP2 using script CREATELOGINS.txt which comes attached to note 150603). You modify the script (described below) and rename it CREATELOGINS.sql. There should be a copy on the desktop of user ad1adm. To run the script, enter: exec (full path and filename _ not forgetting the inverted commas either side). Or, even easier: open the file in query analyser and click the blue tick and the green triangle. The script should have the following values entered: --***************************************** set @SID = 'AP2' set @passwd = 'sap' set @sidadm = 'AG\ap2adm' set @SAPService = 'AG\SAPServiceAP2' Log on as ap2adm and start SAP via SAP Management Console. You will not be able to connect until you reinstall the SAP licence. You must do this as user ap2adm as when you run saplicense check, -test show etc as ad1adm the system reports that ap2 has a valid licence. Install licence using saplicense install. You should now be able to connect to SAP but you will not have a valid user (Prod ones dont seem to work). Delete SAP* by using query analyzer as ap2adm and entering following command: delete from USR02 where BNAME=SAP* and MANDT=020 Log on as SAP* with password PASS and change required passwords. Cancel or reschedule jobs in SM37. The remaining post-processing steps in note 151603 were handled as follows: Configuring the SQL Server: No change. Database was already 300MB. Creating DB13 jobs: Deleted and created .. Creating the permanent stored procedures: Ran this report. Deleting temporary stored procedures: Ran this script. Took 7mins. Transport system: Not needed . Renaming logical file names: Not necessary .

/opt/scribd/conversion/tmp/scratch24826/38867829.doc

48

SAP System Operations Manual


Initialising database collector: N/A as Anglo on Basis 4.6C. Licensing: Already done above.

23-Aug-10

Copy AP1 (Prod) to Consolidation


Basically the same as described above (in Copy AP1 to Dev box as AP2) with a few extra steps. 1) Determine if there is enough space in Consolidation to allow the retention of an existing client. If there is, do a client export before performing the system copy. 2) Make a note of transports already in AC1 but not yet in AP1. Email this list toWarwick Hill, seeking confirmation that he wants all of them imported again. 3) Export users from AC1 via txn SCC8 (check with Warwick that this is desired). 4) Make a note of background jobs that will have to be recreated. 5) Refer to OSS Note 151603 (Copying an SQL Server database) and the SAP document on homogeneous system copies. AngloGold Ashanti performs the first part of this procedure by using Backup Exec to copy just two files (logs and database) from AP1 to the E: and F: drives respectively on the Consolidation box. (The log files already on the F: drive should be retained as they are backed up there every day from the Prod system) If Anglo only puts the files into the T: drive then IBM must stop the database, detach it, and delete the existing files before copying over the new files and renaming them as AC1. 6) IBM then commences from step 7a (Attaching the database) in Note 151603. Launch Query Analyser and execute the following: use master exec sp_attach_db 'AC1', F:\AC1DATA1\ac1data1.mdf', 'E:\AC1LOG1\ac1log1.ldf' (Anglo has no .ndf files) Now, reopen enterprise manager and you should see the AC1 database. 7) As per step 8 in the OSS note, the next task is to create logins for AC1 using script CREATELOGINS.txt which comes attached to note 150603. You modify the script (described below) and rename it CREATELOGINS.sql. There should be a copy on the desktop of user ad1adm in Dev or in the Temp directory of Consolidation. To run the script, enter: exec (full path and filename _ not forgetting the inverted commas either side). Or, even easier: open the file in query analyser (go to Load SQL Script icon in menu bar)and execute. The script should have the following values entered: --***************************************** set @SID = 'AC1' set @passwd = 'sap' set @sidadm = 'AG\ac1adm' set @SAPService = 'AG\SAPServiceAC1' You may get an error message about user AC1 existing already (one or more logins already exist for AG\AC1adm or AG\SAPserviceAC1. If so, use Enterprise Manager to go to folder Security\logins and delete the user that the script refers to. 8) Log on as ac1adm and start SAP via SAP Management Console. (also start Saposcol service). You will be able to connect but not logon until you reinstall the SAP licence. Install licence using saplicense install in OS. Saplicense show will show you existing license installations while saplicense get will show you the relevant hardware key. The necessary info is obtained from OSS by going to Registration > system > request licence key.

/opt/scribd/conversion/tmp/scratch24826/38867829.doc

49

SAP System Operations Manual

23-Aug-10

9) You should now be able to connect to SAP but you may not have a valid user (should be Prod logons now). If you cant log on delete SAP* by using query analyzer as ac1adm and entering following command: delete from USR02 where BNAME=SAP* and MANDT=020 Log on as SAP* with password PASS and change required passwords. 10) Change system status to to Test in SCC4. Reimport users that you exported from AC1 (if required by Anglo). 11) The remaining post-processing steps in note 151603 are handled as follows: Configuring the SQL Server: No change. Database already 300MB. Creating DB13 jobs: Deleted and created . (schedule DBCC for 23:00 every weekday (done weekly so create new one for each weekday. Choose 1 for period). Creating the permanent stored procedures: Ran this report. Deleting temporary stored procedures: Ran this script. Took 11 mins. Transport system: Logon to 000 as DDIC then, STMS, accept defaults and click on Save. You may have to click on Activate button or delete AC1 in Dev STMS and recreate by going into AC1 000 as DDIC where you are automatically prompted to create a new one. Also, reschedule RDDNEW* job by searching for it in SE38 and executing. This will schedule job to import transports into buffer. Renaming logical file names: Not necessary . Initialising database collector: N/A as Anglo on Basis 4.6C. Licensing: Already done above. 12) Cancel/schedule/release background jobs as appropriate. 13) Import transports that were previously in AC1 but not in AP1 (as approved by Warwick). 14) Change system name in SCC4.

/opt/scribd/conversion/tmp/scratch24826/38867829.doc

50

SAP System Operations Manual

23-Aug-10

SAP GUI Desktop Management1


Installation of the SAP GUI Server Files
The instruction details below define the steps required to install the SAP GUI software and ICONS for a standard SOE PC. As part of the installation process, 3 ICONS are installed to the desktop. These ICONS provide access to the SAP Production, Training and Development systems.

Installation of the Development SAP GUI

Prerequisites:
1 2 3 name

Copy \\melbsrv01\netapps\sap\ to the domain that requires access Copy net use n: \\%servername%\netapps into the users logon script Where %servername% is specified please substitute your \\netapps server

Installation:
1 From the run command in the WIN95 or WINNT start menu cut and paste the following "n:\sap\3.1h Client\sapsetup.exe" /i:dev.ini 2 The SAP GUI and configured programs will automatically install to the 3 Start -> Programs-> SAP 3.1h directory (use the left mouse click) 4 Copy the Melbsap3 icon to the desktop and rename as Development 5 Test 6 Finish

Installation of the Training/Playpen SAP GUI


1

Prerequisites:

Copy \\melbsrv01\netapps\sap\ to the domain that requires access 2 Copy net use n: \\%servername%\netapps into the users logon script 3 Where %servername% is specified please substitute your \\netapps server name 1 From the run command in the WIN95 or WINNT start menu cut and paste the following "n:\sap\3.1h client\sapsetup.exe" /i:train.ini 2 The SAP GUI and configured programs will automatically install to the Start -> Programs-> SAP 3.1h directory (use the left mouse click) 3 Copy the Melbsap2 icon to the desktop and rename as Training Playpen 4 Test 5 Finish

Installation:

Installation of the Production SAP GUI

Prerequisites:

Copy \\melbsrv01\netapps\sap\ to the domain that requires access 2 Copy net use n: \\%servername%\netapps into the users logon script 3 Where %servername% is specified please substitute your \\netapps server name

Consult "SAP Client Installation Document" for updates to client software and installation procedures.

/opt/scribd/conversion/tmp/scratch24826/38867829.doc

51

SAP System Operations Manual

23-Aug-10

Installation:
1 From the run command in the WIN95 or WINNT start menu cut and paste the following "n:\sap\3.1h Client\sapsetup.exe" /i:prod.ini 2 The SAP GUI and configured programs will automatically install to the Start -> Programs-> SAP 3.1h directory (use the left mouse click) 3 Copy the Melbsap1 icon to the desktop and rename as Production 4 Test 5 Finish

Installation of the SAP Online Documentation Prerequisites:


1 Create \\%servername%\shardata\Online Documentation directory 2 Ensure all local Domain users have S: mapped to \\%servername %\shardata\ via local login scripts. 3 Enable Read only access for all local domain users eg METALS users 4 Install Internet Explorer 3.02 on each desktop

Installation: 1 Distribute the \\melbsrv01\userdata\esi\pw\esi\Online Documentation\Home directory to all sites using the ZIP format for reduced data file size. 2 Ensure each site uncompresses this zip file into the \\%servername %\shardata\Online Documentation\Home\ directory 3 Each site should then create a local desktop shortcut named SAP Online Documentation that points to \\%servername %\shardata\Online Documentation\Home\welcome.htm 4 Run the Table of Contents plugin from the main Welcome page and follow the instructions. 5 Test Each individual Help section will have its own directory structure. Once these are finished they will be zipped and distributed for installation as described in point 2.

/opt/scribd/conversion/tmp/scratch24826/38867829.doc

52

SAP System Operations Manual

23-Aug-10

SAP Printer Management2


Prerequisites
Before installing any SAP printer device, a printer request form must be completed and sent to the SAP Basis Systems administrator for action. Details defined in this form will enable the Basis Administrator to successfully install the correct print parameters and drivers within SAP. Once the SAP installation is complete, the Basis Systems Administrator will inform the local site administrator as to the printer name, as defined in SAP, the IP address and the Windows NT queue name. These details should be clearly labelled on the printer. When a support call for this device is made to the helpdesk, the printer details should be clearly communicated to the support staff.

Installation of a SAP Network Printer Prerequisites:


1 Ensure that the installed printer has network access to a local domain server 2 Record the printers UNC name eg \\%servername\%printername% or \\melbsrv01\melbprt14 3 Record the type of printer driver required

Installation:
1 On the local domain add the network printer to the preconfigured SAP printing NT local group Eg URGM SAP Printing noting to substitute your site code for URGM 2 Test domain printing from the METALS domain 3 Create the SAP printer 4 Test the new SAP printer

Installation of a SAP LPD Printer Prerequisites:


1 Confirm the local printer has a SAP print driver before purchase 2 Note the local workstations computer name (must be no more than 8 alpha/numerics) 3 Confirm access to a modem, dialup line and pre-configured TCP/IP RAS connection 4 Ensure the workstation is running TCP/IP and no other protocols 5 Install and configure a local LPT1: printer use the nnnnRMxx naming standard Where nnnn = location code RM = Remote, xx = instance number from SAP 6 Manually install the SAPlpd client on the workstation

Installation within SAP:


1 Create a new SAP printer with the following details Output Device: add 1 for the next instance number Device type: use the similar print driver as WIN95/NT Destination host: the local computer name Host printer the 8 alpha/numeric character printer name Location: site department - name

See "SAP Client Installation document" for updates to LPD based printing and or GUI installation.

/opt/scribd/conversion/tmp/scratch24826/38867829.doc

53

SAP System Operations Manual

23-Aug-10

2 Copy the SAPlpd software icon into the c:\windows\start menu\programs\startup folder 3 Re-boot the local workstation 4 Log onto SAP 5 Test

/opt/scribd/conversion/tmp/scratch24826/38867829.doc

54

SAP System Operations Manual

23-Aug-10

CTS Change Control Environment


In order to maintain effective management of change in the SAP environment, a robust and recognized change management procedure must be implemented. SAP provides as part of its standard software distribution a tool to assist in the management and promotion of changes from the development environment through system testing and into production. This tool, called the Correction and Transport System, provides the enabler to the Change Management Process. The Correction and Transport System (CTS) is enhanced in version 4.6 with the Transport Management System (TMS) The Change Management Process defines the process controls that must be applied to effectively manage change. The CTS provides the mechanics to control the development and migration of change from the creation of a change request to the implementation of the change in the production environment. The Change Management Process and TMS, whilst closely linked, are distinct components utilized in the change management environment. The Change Management Procedure at Acacia will involve the development of SAP changes in the development system AD1, client 020, Quality Assurance Testing in the SAP Consolidation System AC1, client 025 and implementation of changes into the production system AP1 client 020.

SAP System Environment


The SAP system environment involves a number of SAP systems installed on multiple hardware environments. The relationship between these systems from a CTS perspective is defined as the Transport Landscape and changes are migrated through this landscape via a Transport Path.

Transport Landscape
The ESI Phase 1 SAP System Environment is shown in the diagram below. It consists of 3 separate but linked SAP systems, configured with the transport paths shown.

FRAGILE

Development system

Consolidation System

Production system
Transport system

AD1
System objects in development

Transport system

AC1
System objects in consolidation

AP1
System objects in production

/opt/scribd/conversion/tmp/scratch24826/38867829.doc

55

SAP System Operations Manual

23-Aug-10

Transport Path
Changes are first developed and unit tested in the Acacia Development system (AD1). These changes are then migrated to the Consolidation System (AC1) using TMS and then system tested. Once system testing is completed, the changes are migrated to the Production system (AP1).

CTS Management Activities Creating a Change Request


A change request is created when a customizing change is performed in the development systems configuration master client AD1(020). In most cases, the Correction and Transport System will automatically prompt for a change request when changes in these clients are saved. However, there are a number of objects in the SAP system that cannot be transported via CTS. These must be transported manually.

Unit Testing Changes


Changes that have been saved to a transport request must be unit tested prior to being transported to the Consolidation System AC1. This unit testing will occur in the development system AD1 client 025 for all customizing changes. Program development changes can also be unit tested in AD1(025) since program code is repository data and as such, is client independent.

Obtaining Release Authorization


Once customizing changes have been unit tested, the Configuration Manager responsible for the relevant functional area must authorize the release of the transport request. The same Configuration Manager must also ensure that all tasks related to the transport request have also been released. The authorization is granted via the CTS release operation. Program release authorization will follow a similar process except that the authorization will be obtained from the Basis Systems Administrator.

Releasing Change Requests


The releasing of a CTS request defines the successful development of a configuration or program development in the Acacia development system. The CTS will write the data associated with the change elements to the operating system file level in readiness for import into the Consolidation System. Once a customizing transport request has been released, notification must be supplied to the Basis Systems Administrator via E-mail or SAP Transport Request Form (Refer Appendix) from the Configuration Manager. The Basis Systems Administrator will be responsible for the authorization and release of program changes in the Development and Consolidation system.

Importing Changes into Another System


The Basis Systems Administrator will perform all imports into the Consolidation and Production Systems using the TMS transaction. Import into the Consolidation System of configuration changes can be performed after obtaining notification and authorization from the Configuration Manager. Program changes can be imported into the Consolidation System at the discretion of the Basis Systems Administrator.

/opt/scribd/conversion/tmp/scratch24826/38867829.doc

56

SAP System Operations Manual

23-Aug-10

The Development and Consolidation environments are considered part of the development infrastructure (AD1 development, AC1 System Testing/Quality Assurance) and as such require a different level of security and release authorization as distinct from the Production environment. Importing any change into the Production environment will require release authorization from the business data owner or their delegate.

Validating a Transported Change


The Correction and Transport System does not employ exacting science and as such implies that all changes must be validated as they are migrated to the Consolidation and Production Systems. It will remain the responsibility of the Configuration Manager to validate the successful migration of configuration change objects to the Consolidation and Production Systems. The Basis Systems Administrator will be responsible for validating all program migrations to the Consolidation and Production Systems.

Change Procedure for Development Development of Customizing Changes


Elements of change are prototyped in AD1 client 025. This client allows for all configuration access that is client dependent and access to all transaction data. This environment allows the customizing changes to be designed, prototyped and validated for compliance to the original business requirement. Once the design has been finalized, configuration in the master client can take place.

Source Client for Customizing Changes


Most (but not all) IMG type changes are Client Dependent, and apply only in the client in which they are made. Where Client Independent IMG (CUST) type changes are required, access has been restricted at the client level. This allows these changes only to be made in AD1 client 120, even though they affect all clients in the AD1 system. It is important to validate that the required IMG configuration changes have been recorded correctly to a CTS request when the change was saved. This can be achieved by using the SAP SE10 transaction. The transport request should not be released to the Consolidation System until it has been successfully unit tested.

Viewing Customizing Requests


Note that most Customizing Requests and Tasks are only visible from the client in which they were created, and not from any other client in the system. They also must be released from this source client. (ie: AD1(120)).

Unit Testing Customizing Changes


Once the required change has been successfully configured in the configuration master client AD1(120), the CTS TASKS are released and copied to the unit test client AD1(025) for unit testing using the SAP SCC1 transaction. The unit test must prove that the desired configuration successfully satisfies the original business requirement before it is released to the Consolidation System for system and QA testing.

/opt/scribd/conversion/tmp/scratch24826/38867829.doc

57

SAP System Operations Manual

23-Aug-10

Under circumstances where the unit test fails, additional configuration related to this change can be performed in the configuration master client and attached to the same transport request. The TASK can once again be released and copied to the unit test client and retested. This process can occur as many times as required in order to achieve the desired result. Once the desired result has been achieved, the transport REQUEST can be released into the Consolidation System.

Customizing Responsibility
These unit tested changes are owned by those responsible for maintaining IMG configuration in the AD1 Master Client, 120.

Development of Program Changes


Most (but not all) ABAP, Repair and SAPnote type changes are Client Independent, and apply in all clients in the SAP System. All program changes are performed in the Development System client AD1(120). This client is tracked by the Correction and Transport System and will ensure that new and changed program developments are recorded on a transport request. The SAP software will also enforce another level of change control when objects owned by SAP (i.e. not customer developed programs) are being modified. This type of change is referred to as a Repair and requires a special object key from SAP before the change can be applied. These special object keys are available by accessing the SAP Online Support Service (OSS) using the OSS1 transaction. Access to the OSS will only be available in the development system in any client.

Unit Testing Programming Changes


ABAP programs are referred to as Repository Data and as such can be accessed from any client. Programs can be unit tested in any client where there is suitable test data. This test data will usually be found in the unit test client AD1(025). Once programs have been successfully unit tested, they can be released for migration into the Consolidation System.

Viewing Requests & Tasks


The created Request and Task(s) are valid in the source client, but can be viewed and accessed from other clients in the same system, via the Workbench Organiser, transaction SE09. Requests and Tasks can only be released from the current (usually the source) client to which they are assigned.

Avoid Cross Dependencies


It is important that cross-dependencies between unrelated Requests are avoided. The personnel performing the change must exercise care to ensure that changed objects are only attached to the relevant Task and Request.

Programming Responsibility
The Basis Systems Administrator owns their created Requests, and allocates a required Task for each Developer under the Request. Each Developer is responsible for their own Task(s) and the attached changed objects.

/opt/scribd/conversion/tmp/scratch24826/38867829.doc

58

SAP System Operations Manual

23-Aug-10

Change Procedure for Consolidation Import Process


To import a transport to the AC1 consolidation system or the AP1 production system, peform the following steps: 1. Run transaction STMS (from any system in the landscape) 2. Click on to go to the list of import queues. 3. Double click on the line for the target system (eg. AC1 or AP1). This will display all transports in the queue for that system. 4. Click on to refresh the queue and ensure that it is up to date.

5. Select the transport you wish to install by single clicking, then click on the button to begin the import. Do not click on the full yellow truck, as this will import all transports in the queue. *** Ensure AC1 transports are moved to clients 025 and 040. ***

System Testing
All customizing transports will be system tested in client AC1(025). If an error is detected during system testing, a Problem Management record will be created describing the failure condition and the problem scheduled for resolution. Further problem diagnosis and corrective action can be performed in the Development System client 025. The correction is applied to a new transport request and then migrated to the Consolidation System using the standard change control procedure. A re-test is performed in order to validate change management processing.

Responsibilities
After receiving the appropriate notification via E-mail or SAP Transport Request Form (Refer Appendix), repository changes imported into the Consolidation System will be performed by the Basis Systems Administrator. The Basis Administrator will inform the Configuration Manager if the transport mechanism returned a non-zero result. Since the CTS can only transport 99% of all transport objects, it remains the Functional Specialists responsibility to validate the transported elements of each of the customizing objects for data consistency and configuration.

Change Procedure for Production


Regardless of the type of CTS request being imported into the Production environment, authorization to proceed must be obtained from the business data owner. This can be achieved via the receipt of an E-mail with an attached CTS Change Request Form. Manual changes resulting from non CTS transportability must also follow the standard change processes as defined below. It will remain the responsibility of the Basis Systems Administrator to perform the import of the CTS transport request and to ensure that the change control process has been followed. The Business System Owner at Acacia is Craig Keeble-Buckle. The Basis Systems Administrators are Andrew Keller and John Jessop. All imports will occur into the Production client AP1(020).

/opt/scribd/conversion/tmp/scratch24826/38867829.doc

59

SAP System Operations Manual


The procedure for CTS changes is defined as follows:

23-Aug-10

Obtain the CTS change request form from ESI\CTS\Change Management\Change Control\CTS Change Control Form.doc area The change originator, usually the SAP Functional Specialist will fill in the form using Word and attach the document to an e-mail. In order to change the check boxes in the CTS Change Request Form from unchecked to checked, simply double click on the check box and change the check option. There is no need to fill in the Testing section of this form until the transport has been imported into Consolidation and testing has been completed. Send the e-mail to the Basis Systems Administrator. He/she will validate the priority of the CTS request in order to ensure that an "Emergency" change is really an emergency. ("I want it in now!" does not mean it is an emergency change). Due diligence needs to be given to business impact and risk. If appropriate, the Basis Systems Administrator will import the CTS request into the Consolidation system. There is no authorisation from the business owner to perform a transport from the Development system to the Consolidation system and it remains the responsibility on the change originator or Functional specialist to ensure that correct protocol is followed. The Basis Systems Administrator will then respond to the originator of the CTS request (using the original E-mail) to indicate that the transport has been performed and is now ready for testing in the Consolidation system. The change originator or functional specialist will perform testing of the change. On completion of the testing, the change initiator will update the original e-mail and CTS Change Request form with relevant testing details and forward the E-mail to the Business Systems Owner for approval to implement the change into the production environment. The Business Systems Owner will validate the priority and business impact of this CTS change request and if appropriate, approve the request by completing the authorisation section of the CTS Change Request form and forwarding the e-mail to Basis Systems Administrator. The Basis Systems Administrator will implement the CTS request into the production environment either immediately (emergency change only) or as per the normal change scheduling window. (See below) Once the change has been implemented into production, the Basis Systems Administrator will respond to the change originator. The change originator must validate the change in production, notify the end user that the problem has been corrected and close off any open problem records/logs related to this change.

Should a manual change need to be performed as a result of CTS non-transportability, the same process as above can be used except that the Basis Systems Administrator will reset the manual_cfg account instead of performing the "tp import" function. There is a "Manual Change Control Form.doc" in the same directory that can be used for manual changes. The above change control procedure does not replace the existing change procedure for business process design changes. The CTS change procedure is simply the back end processing of change control and is an extension of the existent change management process. Note: From the above process, you will notice that there is only one authorization point from the business. This authorisation process takes place when the Business Systems Owner approves the change to be moved into the production environment. There is no authorisation from the Business Systems Owner when moving changes from the Development environment to the Consolidation environment.

Change Scheduling

/opt/scribd/conversion/tmp/scratch24826/38867829.doc

60

SAP System Operations Manual


Schedule of Imports to Target Systems

23-Aug-10

Imports have the potential effect of refreshing all buffers in the target SAP system, and therefore impact system performance. Depending on the objects concerned, other operations such as automatic ABAP/4 code generation or even SAP Application Shutdown may be required when an import occurs. Such special requirements must be specified prior to importing the change. For these reasons, imports must only be performed when the target system is in a quiet state, preferably with no user activity. This means that imports are scheduled and run by the Basis System Administration overnight only, unless an emergency change is required. The available windows for imports into the different Acacia systems are as follows: System AD1 AC1 AP1 Import Window Nightly 16:00 18:00 11am, 3pm and 7pm AEST daily 7pm AEST daily

The above times exclude weekends and public holidays.

Transport Utilities/Tools
Utilities for Client Dependent Transport of Objects Client dependent objects can be migrated using either the SAP Client Copy Tool, or other SAP supplied ABAP programs, depending upon the type of object involved. The methods used and the responsibility for performing the tasks are dependent upon whether the migration is required between clients within the same SAP system, (intra-system) or between clients in two different SAP systems (inter-system). Client copy tools are available under menu Tool -> Administration -> Administration -> Client Administration. Examine the Transport Logs Using the drill down features of Transactions SE09 and SE10, the import logs for all Requests in the imported Transport Release are examined. Each phase of the Export from COS and Import into each target system has a separate log file and return code. Return codes are as follows: Return Code 0 4 Indicates Success - No errors or warnings Warning(s) occurred Actions No investigation needed. Examine step(s) concerned. Usually no corrective action required on Exports. Corrective action may be required on Imports. Examine step(s) concerned. Corrective action(s) usually required. Examine step(s) concerned. Corrective action(s) required.

8 >8

Error(s) occurred Severe Error(s)

Monitoring Transport Request Progress A custom developed program has been written to assist in the tracking of CTS Change Requests across the CTS landscape. Program ZPSPTRAN should be run in the development system since this is the source system for all transports requests. This program will display a list of the selected transport requests and the systems to which this transport has been imported. Double clicking on a line item will display the transport logs for this request.

/opt/scribd/conversion/tmp/scratch24826/38867829.doc

61

SAP System Operations Manual

23-Aug-10

This program should not be run in the consolidation or production system as the user may interpret the output incorrectly. Refer to the Appendix of this document for source code details.

Transport Directory Maintenance


The disk area that contains all the necessary information relating to CTS transports must be maintained so that an adequate amount of disk space is always available. An automated mechanism has been defined via the SAP batch environment such that the normal tp commands required for transport directory maintenance are used. A batch job called ZJSWCTS1 has been scheduled weekly that will issue the tp check all and tp clearold all commands as external programs. This jobs contains 2 steps, one for the check and one for the clearold. The external command string format is: (H => \usr\sap\trans mount point) Command: E:\usr\sap\<SID>\sys\exe\run\tp.exe Parameters: check all pf=H:\trans\bin\tpparam or checkold all pf=H:\trans\bin\tpparam

/opt/scribd/conversion/tmp/scratch24826/38867829.doc

62

SAP System Operations Manual

23-Aug-10

Batch Job Administration


Background Job Creation Standards
Background jobs can be created through a number of different transactions. Some application transactions allow access to the batch processing subsystem but the main mechanism for creating batch jobs is transaction SM36. This document does not detail the exact step by step instructions for a creating a batch job but does detail the Acacia standards that need to be followed. The standards are: All batch jobs will be created with the normal users account. Batch jobs defined for automatic scheduling will be defined by the Batch Job Administrator. All automatic scheduled jobs will be managed via the Change Control Process. This will involve filling a Batch Job Request Form and submitting it for approval and implementation. All program variants will be defined by the Batch Job Administrator using the MELBVAR account. The Batch Job Administrator will logon to SAP with this account and define the variant as required. This account has SAP_ALL access and will be exclusively managed by the Batch Job Administrator. Variant names should be identical to the eight(8) character job name. All automatic scheduled jobs will be defined by the Batch Job Administrator using his/her own account. The job step will be defined to execute under the MELBATCH account. This account has SAP_ALL access but can only run in the background. You cannot logon to the MELBATCH account. It will remain the responsibility of the Batch Job Administrator to ensure that the nightly batch processing has completed successfully. Batch jobs must not be scheduled directly to any background processing server. SAP will manage the assignment of jobs to background processes as appropriate. This is only relevant where a number of SAP applications servers are used for batch processing. All changes to scheduled batch jobs will be managed through the Change Control process.

Subsequent sections of this document provide more detail for defining batch jobs. Appendix A also contains a sample Batch Job Request Form that should be completed prior to the definition of any new jobs.

Scheduling Background Jobs


When you schedule a program for background processing, you instruct the system to process an ABAP/4 or external program in the background. Scheduling the program is the first part of a two-part process. Before a job can be executed, it must first be released. Scheduling and releasing reports require special authorizations. Many users are authorized to schedule background processing of reports, but the release of jobs is limited to jobs that you own. Your job will be released automatically if you: * Have the correct level of security authorization * Have set a start date * Selected start immediately If you do not have release authorization, any start time and frequency specifications you enter will be ineffective, since no job can run until it is released. Remember that users who

/opt/scribd/conversion/tmp/scratch24826/38867829.doc

63

SAP System Operations Manual

23-Aug-10

are authorized to release jobs can also change start times. You can schedule a program as a separate job or add it to an existing job that has not yet been processed. The R/3 System can process background jobs during normal online operations, but you should avoid scheduling jobs when online users are active because this could adversely effect online response time. For example, if you run a program that locks the database, the work of online users will be slowed or stopped. The following is an overview of the types of background processing jobs:

Immediately
When an immediate-start background job is released, the scheduling server sends a message to the central background processing server. This server, identified in the system profile, processes the job without delay. If the job has a target system, it is processed in the target system. Immediate-start jobs are distributed across the available background processing servers, which allows automatic load distribution to be started immediately. Load distribution is also implemented for normal jobs.

After a Particular Job


This scheduling option allows you to start your own job, provided that another job has been completed, which makes the append process status-specific. If the status-specific flag is set, the second job runs only if the first job successfully ends. This process when the outcome of the second job is dependent on the first.

After an Event
This chapter describes how to schedule a background job to start running after a specific event. This means that you can specify an event that will trigger your job to begin. Events are triggered by ABAP/4 programs, external programs, and the R/3 System. An event acts as an indicator that a certain stage has been reached in the R/3 System or in another program.

Running an External Program


Background jobs that run external programs can be defined. For example, you can define jobs to start service programs, such as NT Services in a Windows NT System. These programs are intended to remain active after they have been started. They do not terminate and return to the SAP background control program as do normal programs.

At an Operation Mode
Operation Modes allow your R/3 System configuration to adapt to varying system requirements. You can schedule background jobs to start when a certain operation mode begins. For example, you could start a client copy background job when the night operation mode begins. This is usually set up to be the point at which there is a reduction in the number of dialog work processes and an increase in the number of background work processes. The result is that your background job runs when the greatest number of appropriate system resources are available.

Periodically
Background jobs that are scheduled to run at daily, weekly, or monthly intervals.

/opt/scribd/conversion/tmp/scratch24826/38867829.doc

64

SAP System Operations Manual

23-Aug-10

Job Classes for Background Jobs


Job processing distinguishes between three job classes, each of which has a different priority. Job priorities determine the sequence in which jobs are passed to the available background work processes (BWPs) for processing: Class A jobs have priority over Class B jobs, and Class B jobs have priority over Class C jobs. There is no difference in runtime performance between the various job classes: Class A jobs do not get processed any faster than Class B jobs once each has been started.

Class A

Meaning High Priority Jobs

B C

Periodically Started Jobs Other Jobs

Possible Uses *Data Transfer to from external applications * Backup * statistical analyses * One-off jobs

and R/3

Viewing Background Jobs


The graphical job scheduling monitor shows you the background jobs awaiting processing, and the currently available background processing resources. Use Transaction RZ01 and find any delayed jobs. (RZ01 contains a legend button to explain the various patterns). If there are delayed jobs, you might have too few BWPs or too many jobs running at the same time. You can display the job log to obtain information on a program that terminated prematurely or to carry out a detailed investigation of a background processing run. This log uses transaction SM37 to show jobs with various parameters.

Policies Time-out for Dialog Steps


The time-out for Dialog Steps is set to 300 seconds. The time-out value for dialog steps is maintained in the instance profile of each application server. Therefore, if a job will run for longer than 300 seconds, it needs to be run in the background, else it will time-out and not complete.

/opt/scribd/conversion/tmp/scratch24826/38867829.doc

65

SAP System Operations Manual

23-Aug-10

Batch Job and Variant Naming Conventions


* Background jobs allow programs to be run at specific times (e.g. at night) or in background so that users screen are not held for a substantial period of time. Any selection criteria that are required can be supplied by a report variant.

Format:

xxxx
Descriptive text (4 char.) Run frequency (see table 4)

Max. Length: 8 Characters

Application area (see table 2) Object type (see table 1) User defined object (must always be 'Z')

Example: ZJCDRPT2

Daily Controlling Background Program

* Global report variants and report variants which can be transported begin with X. Local report variants and report variants which can be transported begin with Y. Report variants which cannot be transported begin with Z.

Format:

yyyyyyyyyyy
Descriptive text (11 char.) Application area (see table 2)

Max. Length: 14 Characters

Object type (see table 1) User defined report variant type X - Global report variants (transportable) Y - Local report variants (transportable) Z - Local report variants (non-transportable)

Example: YQK_CONS_SALES Local Cost Accounting variant (transportable)

Table 1 - Application Areas


A C F G I K L M P Q S V X Fixed Asset Management Controlling Financial Accounting General Ledger Plant Maintenance Cost Accounting Warehouse Management Materials Management Human Resource Quality Control Basis Sales and Distribution Cross Application

Table 2 - Programs Types


B C E F I Batch Input Conversion Edit Format Interface

/opt/scribd/conversion/tmp/scratch24826/38867829.doc

66

SAP System Operations Manual J N Q R U X Job Include Inquire Report Update Extract

23-Aug-10

Table 4 - Program Run Frequency


H D W M Y R A Hourly Daily Weekly Monthly Yearly On Request Ad hoc 4 B F Q Quarter-hourly Bi-Weekly Fortnightly Quarterly 2 T S Half-hourly Tri-Weekly Semiannually

Variant Maintenance
Report variants are predefined selection criteria used by report programs (both online and background). They allow you to run the same report program with the same selections without having to enter the same values each time. (e.g. for monthly sales statistics). You can create as many different report variants as you like for each report program and they remain assigned only to the report program in question. Variants will be created for jobs using the variant account: MELBVAR. When a variant is created, it should always have the Protected box checked. This ensures that variants are not changed without going through the proper change control procedures. Variant names should be identical to the 8 character job name.

User Security
To ensure security, the R/3 System features its own authorisation component. This ensures that critical operations and data are protected against unauthorised access. The authorisation checks performed in the background processing system restrict access to the following: * jobs by R/3 clients * jobs by name * operations on jobs Authorisation checks are based on the roles a user can have when handling jobs. The following roles have been defined: The Job administrator can: * carry out all operations on jobs * view and manage all the jobs in the system in all R/3 clients * select job classes * submit jobs with a different execution userid The security profile of the Batch Job Administrators normal user account will permit jobs to be created. This is performed by adding the ZS-BTCHADM security profile to the list of profiles for the user account. However, the user ID MELBATCH will be used to execute all batch jobs. This account has been defined as a batch only account and cannot be used to directly logon to SAP.

/opt/scribd/conversion/tmp/scratch24826/38867829.doc

67

SAP System Operations Manual

23-Aug-10

Any normal user can schedule a job and display the status and output of his or her own jobs. Special authorisations are required to release a job to run, to perform any other operation on a job, or to access jobs that were scheduled by other users. * Users require separate authorisation for all operations on jobs. * Jobs are defined and executed under the R/3 client code under which the user has logged on to the system. The authorisation objects used by the background processing system are as follows (object technical name and description in the System): S_BTCH_ADM: Batch Processing: Batch Administrator S_BTCH_NAM: Batch Processing: Batch User Name S_BTCH_JOB: Batch Processing: Operations on Batch Jobs S_ADMI_FCD: System Administration Functions (for certain special functions, such as debugging active jobs). You'll find information on the required authorisations in the authorisation object documentation in the R/3 System (transaction SU21).

/opt/scribd/conversion/tmp/scratch24826/38867829.doc

68

SAP System Operations Manual

23-Aug-10

Faxing Software
Anglogold have purchased Esker PULSE faxing software and have integrated it with SAP. This is primarily used to fax purchase orders and RFQs. The SAP side of this new interface is configured in transaction SCOT, and sends the messages to two RFC destinations, SAPFAX and SAPINT. Fax and e-mail jobs are sent to these destinations via two background jobs: 1. ZFAXBTCH sends faxes to SAPFAX, using program RSCONN01 2. ZINTBTCH sends e-mail to SAPINT, using program RSCONN01 In the event of problems, the following process should be observed: 1. Check the background jobs in SM37 to ensure they are running. If not, run them 2. Test the two RFC destinations in SM59 to ensure that they are working. If not, escalate to Anglogold to restart the Fax Softwares RFC connection. 3. Run transaction SCOT and see if there are messages in error. If so, drill down to identify the cause. See below for information on resending failed jobs. SCOT gives the following information: 1. Completed these jobs have been successfully transferred to the RFC port 2. Error these jobs have an error which prevented transmission 3. In transit these jobs are currently being sent to the RFC port 4. Waiting these jobs have not yet been submitted by RSCONN01. You can diagnose errors in SCOT via menu path Utilities->Overview of Send Orders. You can resend failed messages from this screen by using the Anglogold escalation for problems is Warwick Hill. repeat send button.

/opt/scribd/conversion/tmp/scratch24826/38867829.doc

69

SAP System Operations Manual

23-Aug-10

Transfer of EFT file from SAP to ANZ On-line


At the end of each Payroll Run an EFT file containing details of employee net pay and bank account distribution is produced for transmission to the ANZ via ANZ-Online. This document details the technical and security aspects of that process.

EFT File Created and Reconciled in SAP


Refer DWB HRPYEFT Prepare and Create EFT file - when all pay results have been finalised and sign off obtained it is the responsibility of the Payroll Administrator to prepare and create the EFT file for transmission to the bank. This a two step process. Step 1 Prepare EFT File - this steps gathers the banking information and net pay details for each employee to be paid in this run and outputs those results to a uniquely identified file for use in the following step. Employees who have no net pay or who are in error are reported at the end of this file and should be checked by the payroll administrator. Step 2 Create EFT file - This step uses the unique identifier of the file created in the previous step and formats the data for transmission to the ANZ. It also completes the header and footer detail for the file eg. Acacia Bank Account Detail, File Total, Record Count etc. and produces two reports for use in reconciliation. The BANK SUMMARY REPORT produced in this step provides basic lodgement detail. Eg: Run Date: 09.10.98 Acacia Resources Limited Report Id: RPUOAUST Bank deposit detail report Payment Run Date: 09.10.98 Bank Processing Date: 20.07.98 Lodgement Details for: Melbourne Account Name: ACACIA RESOURCES LIMITED Account Number: 775340393 Cemtex User Id: 011239 Description of Entries: PAYROLL Number of Debit Items: Number of Credit Items: 0 1 Value of Debit Items: Value of Credit Items: 2,722.95 0.00 2,722.95 Run Time: 09:12:22 Page: 1

Net Value:

End of Report

The BANK DEPOSIT DETAIL REPORT provides full detail of the employee bank accounts and tha amount to be distributed to each. It also includes a total of the number of employees paid and the total amount. Eg:

/opt/scribd/conversion/tmp/scratch24826/38867829.doc

70

SAP System Operations Manual


Run Date: 09.10.98 Acacia Resources Limited Report Id: RPUOAUST Bank deposit detail report Payment Run Date: 09.10.98 Bank Processing Date: 20.07.98 Bank: ANZ 01900207 Smith Joe Deposits to ANZ : 013-229 1 98742324 2,722.95 Run Time: 09:12:22 Page: 2 2,722.95 Run Time: 09:12:22 Page: 1

23-Aug-10

Run Date: 09.10.98 Acacia Resources Limited Report Id: RPUOAUST Bank deposit detail report Payment Run Date: 09.10.98 Bank Processing Date: 20.07.98 Number of Employees Paid: Total Deposits: 1 1

2,722.95

End of Report

Each of these reports can be used in the reconciliation process by comparing them to the total in the file header, the amount deposited to the ANZ clearing account by the payroll and the use total for Net Pay from the wage type statement report. In addition to the above reports the file for transmission is also produced. For further detail see below:

Download and Transmisson of the EFT file


In step 2 above the EFT file is also produced for Download to the file system in order that it can be processed via ANZ-Online. The name of the file that is produced is ANZ.ABA. File Path: /EFT/ (\\MELBSAP1\EFT$) The location for this download file will be a secure directory on the SAP Production system which will have access permissions set such that only the payroll administrator can write to files to this directory. Once the file has been downloaded to the directory the file will not be able to be altered or changed in any way unless permissions are granted by the Production System Administrator. The path name for this directory will be set in the variant for producing the EFT file in such a way that it cannot be changed by the person submitting the task. This reduces the risk of error. In the event that the file already exists in the directory a message will appear prior to download warning the payroll administrator of this. The payroll adminstrator should only proceed if the existing file has already bee processed. In order to upload the file to ANZ online the payroll administrator will need to log on at the ANZ online workstation using the EFT account (MELBEFT01). ONLY this account will have permission to export the file from the secure directory on the SAP Production system and perform the upload. Once uploaded the file should be processed as normal for transmissions via ANZ-Online.

/opt/scribd/conversion/tmp/scratch24826/38867829.doc

71

SAP System Operations Manual

23-Aug-10

Backup Procedure
In the event that the link to ANZ Online is unavailable the Payroll Administrator will need to liaise with the SAP Production System Administrator for the file to be downloaded from the secure directory to diskette. The diskette can then be handed to the ANZ who can process the file as normal.

/opt/scribd/conversion/tmp/scratch24826/38867829.doc

72

SAP System Operations Manual

23-Aug-10

Appendix A - Forms
CTS Change Request Form
Request Owner Name: Description Text: Priority Normal High Emergency Required Date Type: (Select one or More) Customising/Config ABAP Enhancement SAP Note Problem Fix Security Change

Release Approval
Source System: (One only) SAP Testing Change been tested in AC1? Tested by:

(Must be Completed PRIOR to import to Target System) Target System: (One only) AC1 Other AD1 AC1 Date Yes No .

AP1 Date .

(Business owner to complete this section) Business Owner Authorised by

...

Release Specification
Import Seq. 1 2 3 4 5 6 7 8 9 10 Problem Number

(Must be Completed PRIOR to import to Target System) Transport CTS Source Target Request Number Request Client Client Special Instructions Owner (Any manual activities after transport)

(Use additional forms if Extra Transport Requests are to be included)

Release Scheduling
Request Received (Name):

(To be completed by System Admin. upon receipt or Request) Request Received (Date): Import Scheduled (Date) Authorised By :

Release Completion
Actioned by

(To be completed by System Admin. after import to target system) Date: Time:

Date Owners Notified:

/opt/scribd/conversion/tmp/scratch24826/38867829.doc

73

SAP System Operations Manual

23-Aug-10

Manual Change Request Form


Requester : Priority: Normal High Emergency Required Date: Problem No.

Extension: Description:

Change Approval

(Must be Completed PRIOR to performing the task) Target System: (Where possible - Changes should follow the DEV to TEST to PROD implementation process)

AD1

Owner

Authorised by (Completed by business owner)

Date

Tested Yes No

AC1

Owner

Authorised by (Completed by business owner)

Date

by: Tested Yes No

AP1

Owner

Authorised by (Completed by business owner)

Date

by: Tested Yes No

Other ________

Owner

Authorised by (Completed by business owner)

Date

by: Tested Yes by: No

Work Order Specification


Seq. Implementator of tasks (Dept. or Person)

(Must be Completed PRIOR to scheduling of the task) Special Instructions/ Comments

Task Compl. By: (Initials)

1 2 3
(Use additional forms if Extra tasks are to be included)

Change Scheduling
Request Received (Name):

(To be completed by System Admin. upon receipt or Request) Request Received (Date): Task Scheduled (Date) Authorised By (Signed):

Change Completion
Confirmed by:

(To be completed by System Admin. after the completion of the task) Signature: Date: Time:

Owners Notified:

/opt/scribd/conversion/tmp/scratch24826/38867829.doc

74

SAP System Operations Manual

23-Aug-10

Batch Job Request Form

Add
Job Details Job Name: Person Responsible: Job Description: Restart Instructions: On Call: Yes No Manual

Delete

Modify

Modification Date:19-Nov-02

Job Scheduling Type: Notes: Technical Details Transaction: Variant Name: Variant Details:

Automatic Scheduling

Program:

Job Frequency:Hourly Job Start Date: Estimated run time: Job Class: A Yes C No

Other: Job Start Time:

Print Immediately: Job Dependencies: Execution Account:

Device name:

/opt/scribd/conversion/tmp/scratch24826/38867829.doc

75

SAP System Operations Manual

23-Aug-10

Batch Job Request Form Details The above form defines the details required to build a automatically scheduled batch job in SAP that will be maintained by Operations staff. Descriptions of the various fields in the form are below: Add / Delete / Modify: Describes the alterations you intend for the job. Job Details Job Name: A meaningful name complying with naming conventions outlined previously in this document. Person Responsible: Name of person who is responsible for the functionality of the job, NOT the Batch Administrator. Job Description: A brief overview of what the job does. Restart Instructions: Outline of steps that must be performed before restarting the job. This is needed if the job fails to complete. On Call: If the job fails, does someone need to be contacted immediately? Job Scheduling Type: Is the job a once-only that should be manually started, or can it be part of the automatic scheduling process? Notes: Any other additional information. Technical Details Transaction: What transaction code, if any is incorporated into the job? Program: What program, if any is incorporated into the job? Variant Name: Name any variants used (See Naming Conventions earlier in this document). Job Frequency: Choose from the list how often does the job should be run, or enter the frequency in Other. Job Start Date: When the job be run for the first time. Estimated Run Time: How long the job is expected to run. Job Class: What class the job is (see Job Class information earlier in this document). Print Immediately: Is a print-out required? Device Name: What printer should the print-out go to? Job Dependencies: Do any other jobs need to be run before this one? Do any other jobs rely on this job completing first?

/opt/scribd/conversion/tmp/scratch24826/38867829.doc

76

SAP System Operations Manual

23-Aug-10

New Printer Request Form

Part I - To Be Filled Out By Local Site: (complete section and cc:mail to Basis Systems Admin.)
Requester Name Requester Phone Number Location (Bldg, Floor, City, State, Country) Location Code (Standard 2 Character Code):
ME - Melbourne, DA - Darwin BR - Brocks Creek, UR - Union Reef PE - Perth, SD - Sunrise Dam KA - Kalgoolie

Local Printer Support Contact (Name, Phone Number) Printer Model/Make Printer Serial Number: Network Interface Type (Internal/External) NT Server Name (if any - including domain) NT Printer Name TCP/IP Status TCP/IP Address Secured or Restricted Printer(yes/no) Use of Secured Printer (i.e., checks, special forms, high volume, Fax/SAPCOMM, etc.) Names of People Requiring Access to Secured Printer SAP Systems Requiring Printer Definition (Production, Quality Assurance)

Part II - To be Filled Out by SAP Basis Administrator:


Setup Request Received By Setup Request Received Date SAP Printer Name Assigned NT Printer Name Assigned DNS Name Assigned NT Servers to be Configured Work Request Date Work Request Completed By Work Request Completed Date SAP Printer Definitions (SID/Completed By/Date)

Part III - To be Filled Out by SAP Basis Administrator:


/opt/scribd/conversion/tmp/scratch24826/38867829.doc 77

SAP System Operations Manual

23-Aug-10

(Complete information and cc:mail back to local requester as confirmation of completed work. Local requester should cut and paste information below in a visible place on front of printer for future reference): SAP Printer Name: NT Printer Name: TCP/IP Address: Printer Serial Number:
Printer Request Form Details Minimum Requirements
printer network attached network card or printer server must support TCP/IP location / network segment must have permanent connection to WAN directly PC-attached printers (SAPLPD) will only be supported for remote dial-in users SAP driver exists for printer or printer emulates PCL 4 or 5 (no additional escape sequences for switching modes supported) sufficient memory to buffer average print job

Preferred Printers / Supported Printers


All types of installed printers will be supported if they meet the minimum requirements. It should be understood however that optimum support (including early testing with new software releases) can only be guaranteed for a small spectrum of printers. For new printers it is highly recommended to choose from this group of preferred printers. Preferred Printers: HP LaserJet (IV and higher) with JetDirect card (with IP software)

Concurrent Office printing


For the above mentioned preferred printers concurrent printing from an office environment seems to be feasible. For high volume or time-critical SAP printing dedicated printers should be preferred, though, as concurrent printing does not guarantee a well defined queuing of print jobs.

Information needed for connecting a printer to SAP


The information in the top section of the Printer Setup Request Form, Part I, should be filled out and sent via cc:mail to the SAP Basis Support Team. Once the work has been completed, Part II, a confirmation, Part III, will be cc:mailed back to the requester, who should then cut and paste the confirmation label in a conspicuous place on the printer. The information on this label will be required for reporting any SAP printing problems in the future.

Completing the Printer Setup Request Form


Some of the information in the Printer Setup Request form , Part I, which is to be filled out by the local site, is available from the printer configuration test page. That information appears in bold print below. Print out the configuration test page, or ask your local technical support person to print it, so the information is available for completing the request.

/opt/scribd/conversion/tmp/scratch24826/38867829.doc

78

SAP System Operations Manual

23-Aug-10

Requester Name Name of person requesting printer Requester Phone Number phone number of person requesting printer Location exact location of printer (e.g. Melbourne Office Level 11 (copy room)) this description will be visible when selecting printers for output from SAP. Location Code standard 2 character location code (e.g. SD for Sun Rise dam) Local Printer Support Contact name and phone number of person who provides local technical support for printer (e.g., John Smith, x1234) Printer Model/Make exact type of printer (e.g. HP LaserJet 5si with JetDirect card) available from printer configuration page Printer Serial Number serial number available from printer configuration page NT Server Name server name available from printer configuration page (e.g., gbo45-f) NT Printer Name node name available from printer configuration page (e.g., P10_LASER4_LJ5) TCP/IP Status TCP/IP status available from printer configuration page (e.g., ready) if not ready, request that the local technical support person enable this and provide date expected to be ready TCP/IP Address ip address available from printer configuration page (e.g. 151.208.34.216) Secured or Restricted Printer answer yes or no most printers are not secured Use of Secured Printer explain printers use typically secured printers are used for checks, special or pre-printed forms, high-volume printing or some other restricted use may also be physically secured in a floor location not accessible to general public Names of People Requiring Access to Secured Printer names of people having SAP login ids and using the SAP system special security profiles will need to be created by the SAP Basis Support Team within the SAP application and assigned to individual login ids to enable use of a secured printer consultation with the SAP Basis Support Team is required for any secured printing requirements so access can be implemented properly SAP Systems Requiring Printer Definition specify the systems where printer will be used, e.g. Production System Consolidation System

/opt/scribd/conversion/tmp/scratch24826/38867829.doc

79

SAP System Operations Manual

23-Aug-10

Problem Issue Log Form


Issue Log Number: Vendor Issue Log Number: Issue Title: Date Logged: Problem Reported by:___________________ Call Logged to Vendor by: Date Logged with Vendor: Current Status (Open, Closed, In Process) Problem Description: Program Name: _______________________ ______________ ______________ ______________ ______________ System(s): Instance(s): _________________________________ Vendor:_______

Recommended Solution provided by: Date Solution provided: Description of Solution: ______________ ______________ ______________ ______________ Date Solution Implemented: Solution Implemented by: Solution Tested/Verified by: Test Passed: Test Failed: Sent back to vendor for further resolution: Users Notified of Resolution: System(s): Instance(s):

/opt/scribd/conversion/tmp/scratch24826/38867829.doc

80

SAP System Operations Manual

23-Aug-10

Appendix B SQL Scripts


Hourly Transaction Log Dumps

Stored Procedure
The following stored procedure should be added to the master database on each server: CREATE PROCEDURE sp_acacia_log_dump @dbname varchar(100), @location varchar(150) AS IF (SELECT COUNT(*) FROM master..sysprocesses WHERE cmd LIKE 'DUMP%') > 0 BEGIN RAISERROR ('Long-Running Backup interfering with Log Dump', 19, 1) WITH LOG RETURN END

declare @deldate int declare @deldatecount int declare @del_str varchar(255) declare @exec_str varchar(255) declare @date_time varchar(12) select @deldatecount = -6 while @deldatecount > -13 begin select @deldate = CONVERT(int,CONVERT(varchar(8), dateadd(day,@deldatecount ,getdate()),112)) select @del_str = 'del ' + @location + @dbname + '_log_' + convert(varchar(8), @deldate) + '*.dmp' print @del_str exec master..xp_cmdshell @del_str select @deldatecount = @deldatecount - 1 end select @date_time = CONVERT(varchar(8), GETDATE(),112) + RIGHT('0' + CONVERT(varchar(2), DATEPART(Hour,GETDATE())),2) + RIGHT('0' + CONVERT(varchar(2), DATEPART(Minute,GETDATE())),2) select @exec_str = 'dump tran '+@dbname+' to DISK = "'+ @location + @dbname + '_log_' + @date_time + '.dmp"' exec(@exec_str)

Schedule Setup
A scheduled task should be set up on each server as follows: Name: <SID> Hourly Log Dump Type: TSQL Database: master Command: sap_log_dump <SID>, \\ServerName\Sharename\DirName\ Under Options, set up the e-mail operator. Schedule it to occur daily, every hour between 8am and 9.59pm. 81

/opt/scribd/conversion/tmp/scratch24826/38867829.doc

SAP System Operations Manual

23-Aug-10

Note that <SID> is the database name of the SAP database. \\ServerName\Sharename\DirName\ is the directory where the log dumps will be created. Note that a trailing backslash is required when specifying it.

/opt/scribd/conversion/tmp/scratch24826/38867829.doc

82

SAP System Operations Manual

23-Aug-10

SQL Alert Setup Stored Procedure


use msdb go sp_addalert 'master - Log Full',1105,NULL,1,60,'master database full - truncate the log as a matter of urgency without restarting SQL server. Expand the master database afterwards',EMAIL,master go sp_addalert 'model - Log Full',1105,NULL,1,60,'model database full - truncate the log as a matter of urgency without restarting SQL server. Expand the model database afterwards',EMAIL,model go sp_addalert 'msdb - Log Full',1105,NULL,1,60,'msdb database full - truncate the log as a matter of urgency without restarting SQL server. Expand the msdb database afterwards',EMAIL,msdb go ---Modify the following to suit your site sp_addalert 'AC1 - Log Full',1105,NULL,1,10,'Consolidation System Log is full',EMAIL,AC1 go sp_addalert 'Sev. 19 Errors',NULL,19,1,10,NULL,EMAIL,NULL go sp_addalert 'Sev. 20 Errors',NULL,20,1,10,NULL,EMAIL,NULL go sp_addalert 'Sev. 21 Errors',NULL,21,1,10,NULL,EMAIL,NULL go sp_addalert 'Sev. 22 Errors',NULL,22,1,10,NULL,EMAIL,NULL go sp_addalert 'Sev. 23 Errors',NULL,23,1,10,NULL,EMAIL,NULL go sp_addalert 'Sev. 24 Errors',NULL,24,1,10,NULL,EMAIL,NULL go sp_addalert 'Sev. 25 Errors',NULL,25,1,10,NULL,EMAIL,NULL go sp_addalert 'Sev. 140 Errors',NULL,140,1,10,NULL,EMAIL,NULL go sp_addalert 'Sev. 130 Errors',NULL,130,1,10,NULL,EMAIL,NULL go sp_addalert 'Sev. 120 Errors',NULL,120,1,10,NULL,EMAIL,NULL go sp_addalert 'Sev. 8 Errors',NULL,8,1,10,NULL,EMAIL,NULL go sp_addalert 'Possible Corruption',NULL,16,1,10,NULL,EMAIL,NULL,'corrupt' go use master go sp_altermessage 3201, with_log, true go use msdb go sp_addalert @name = 'Failed Transaction Log Dump - Missing File', @message_id = 3201, @severity = 0, @enabled = 1, @delay_between_responses = 60, @database_name = null, @notification_message = 'Transaction Log Dump Failed for AC1 - please check location', @task_name = null, @event_description_keyword = null, @include_event_description_in = 'email', @raise_snmp_trap = 0 go --Add Custom Message for log space alert sp_addmessage 100000, 7, '%s Log used threshold of %d percent exceeded for database %s' , us_english , true , REPLACE

/opt/scribd/conversion/tmp/scratch24826/38867829.doc

83

SAP System Operations Manual

23-Aug-10

go --Create procedure to accurately check log space and raise an error if it is low use master go if exists (select * from sysobjects where id = object_id('dbo.sp_AcaciaCheckLogSpace') and sysstat & 0xf = 4) drop procedure dbo.sp_AcaciaCheckLogSpace GO CREATE PROC sp_AcaciaCheckLogSpace @threshold smallint, @alertmsg varchar(255) AS --Must be executed from within the database you wish to check --Relies on error 100000 having been added to the database --Check that a backup isnt running as this can cause problems IF (SELECT COUNT(*) FROM master..sysprocesses WHERE cmd LIKE 'DUMP%') > 0 BEGIN RAISERROR ('Long-Running Backup interfering with Log Space Monitor', 19, 1) WITH LOG RETURN END --DECLARE @totalsize real --DECLARE @spaceused real DECLARE @CurrLogUsedPercent real DECLARE @dbname varchar(255) DECLARE @msgtxt varchar(255) --Update log usage stats in sysindexes DBCC CHECKTABLE (syslogs) WITH NO_INFOMSGS --Get Total Log Size ***This method creates quite an overhead --select @totalsize = (select (sum(size) * 2048/1024) from master..sysusages where dbid = db_id() and segmap & 4 != 0) --Get Space Used --select @spaceused = (select ((select sum(reserved) from sysindexes where id = 8)) * (2048 / 1024)) --Get Log space used ***This method pinched from sap_mon_logspace in AD1, so should be most efficient way create table #loginfo (dbname char(30), logsize float, logusedprct float, status bit) insert into #loginfo exec('dbcc sqlperf(logspace)') select @CurrLogUsedPercent = logusedprct from #loginfo where dbname = db_name() drop table #loginfo --Return % used select @msgtxt = convert(varchar(255),@CurrLogUsedPercent) select @dbname = db_name() print @dbname print @msgtxt if @CurrLogUsedPercent > @threshold begin RAISERROR (100000,7,1,@alertmsg, @threshold, @dbname) end GO

Schedule Setup

/opt/scribd/conversion/tmp/scratch24826/38867829.doc

84

SAP System Operations Manual

23-Aug-10

This job is now disabled due to new functionality in SQL 7.0. There is now the ability to auto extend the size of the datafiles. This means that when it is full, the datafile will be extended in size according to a user-defined formula. --3) Set up scheduled tasks to poll for log space --Set up manually for each database as required, and as often as required --Syntax: --sp_AcaciaCheckLogSpace threshold, message --Where threshold = integer threshold to fire error and message is 'Warning!', 'Critical!' etc --4) Set up alert as follows: use msdb go sp_addalert 'Log Filling Up Warning',100000,NULL,1,60,NULL,EMAIL,NULL go

/opt/scribd/conversion/tmp/scratch24826/38867829.doc

85

SAP System Operations Manual

23-Aug-10

Clean-up Backup History Store Procedure


sp_delete_backuphistory is a standard msdb stored procedure.

Schedule Setup
A scheduled task should be set up on each server as follows: Name: Clean Backup History 7.0 Type: TSQL Database: msdb Command: declare @deldate datetime select @deldate = getdate() select @deldate = dateadd(day, -35, @deldate) exec sp_delete_backuphistory @deldate Under Options, set up the e-mail operator. Schedule it to occur daily, every hour between 8am and 9.59pm. Note that <SID> is the database name of the SAP database. \\ServerName\Sharename\DirName\ is the directory where the log dumps will be created. Note that a trailing backslash is required when specifying it.

/opt/scribd/conversion/tmp/scratch24826/38867829.doc

86

SAP System Operations Manual

23-Aug-10

Appendix C Custom Programs and DOS Scripts


Display CTS Request Status - ZPSPTRAN
REPORT ZSTRANS LINE-SIZE 141. ******************************************* * PROGRAM....... ZSTRANSP * TITLE......... Display transport status of selected requests * ==========================================* * * Overview of transport requests *---------------------------------------------------------------------* PROGRAM TYPE.. Report * DEV. CLASS.... Local private * LOGICAL DB.... None * ==========================================* * CHANGE HISTORY * Date By Correction Number & Brief Description * ---------- ------- ---------------------------------------- ----* 18/8/1998 melbtpa1 Initial implementation ******************************************* TABLES: E070, E07T, E071, E070C, DEVL, TASYS. " R/3 command file " R/3 command file text " Objects of a request or task (E070) " Source and Target Client for Request E070 " Development Layers " Recipient Systems

DATA: T_E070 LIKE E070 OCCURS 0 WITH HEADER LINE, L_POSITION(2) TYPE N, LS_COFILE_HEADER LIKE TSTRFCOFIH, LT_COFILE_LINES LIKE TSTRFCOFIL OCCURS 50 WITH HEADER LINE, W_TEXT LIKE E07T-AS4TEXT, DEV LIKE DEVL-INTSYS, CONS LIKE DEVL-CONSYS, RECP(3), RECP2(3), INT_TASYS LIKE TASYS OCCURS 0 WITH HEADER LINE, FLAG_WARNING TYPE I, MSGID LIKE SY-MSGID VALUE 'E', OTAB(72) OCCURS 5 WITH HEADER LINE. " Sort / Order SELECTION-SCREEN BEGIN OF BLOCK 1 WITH FRAME TITLE TEXT-001. SELECT-OPTIONS: S_KORR FOR E070-TRKORR, S_STATUS FOR E070-TRSTATUS, S_TYPE FOR E070-KORRDEV, S_DATE FOR E070-AS4DATE, S_USER FOR E070-AS4USER, S_CLNT FOR E070C-CLIENT. SELECTION-SCREEN END OF BLOCK 1. SELECTION-SCREEN BEGIN OF BLOCK 2 WITH FRAME. PARAMETERS: P_TEXT LIKE E07T-AS4TEXT. SELECTION-SCREEN END OF BLOCK 2. SELECTION-SCREEN BEGIN OF BLOCK 3 WITH FRAME TITLE TEXT-011. PARAMETERS: P_SORT1 RADIOBUTTON GROUP 1 DEFAULT 'X', P_SORT2 RADIOBUTTON GROUP 1. SELECTION-SCREEN END OF BLOCK 3.

/opt/scribd/conversion/tmp/scratch24826/38867829.doc

87

SAP System Operations Manual


SELECTION-SCREEN BEGIN OF BLOCK 4 WITH FRAME TITLE TEXT-012. PARAMETERS: P_ASCEND RADIOBUTTON GROUP 2 DEFAULT 'X', P_DESCEN RADIOBUTTON GROUP 2. SELECTION-SCREEN END OF BLOCK 4. INITIALIZATION. AUTHORITY-CHECK OBJECT 'S_TRANSPRT' ID 'TTYPE' FIELD 'ORDR' ID 'ACTVT' FIELD '03'. IF SY-SUBRC <> 0. MESSAGE S003(ZS) . LEAVE PROGRAM. ENDIF. START-OF-SELECTION. IF P_SORT1 = 'X'. IF P_ASCEND = 'X'. OTAB = 'TRKORR ASCENDING'. APPEND OTAB. ELSE. OTAB = 'TRKORR DESCENDING'. APPEND OTAB. ENDIF. ELSE. IF P_ASCEND = 'X'. OTAB = 'AS4DATE ASCENDING'. APPEND OTAB. ELSE. OTAB = 'AS4DATE DESCENDING'. APPEND OTAB. ENDIF. ENDIF. SELECT * FROM E070 INTO TABLE T_E070 WHERE TRKORR IN S_KORR AND ( TRFUNCTION = 'W' OR TRFUNCTION = 'K' OR TRFUNCTION = 'T' ) AND TRSTATUS IN S_STATUS AND KORRDEV IN S_TYPE AND AS4DATE IN S_DATE AND AS4USER IN S_USER ORDER BY (OTAB). IF SY-SUBRC <> 0. MESSAGE S005(ZS) . "No records matching request number ENDIF. CONCATENATE '*' P_TEXT '*' INTO P_TEXT. FORMAT RESET. FORMAT COLOR 1. WRITE: /01 SY-VLINE, 02 TEXT-001, 14 SY-VLINE, 15 TEXT-002, 20 SY-VLINE, 21 TEXT-003, 26 SY-VLINE, 27 TEXT-004, 34 SY-VLINE, 35 TEXT-005, 42 SY-VLINE, 43 TEXT-006, 104 SY-VLINE, "Not authorised to do this

23-Aug-10

/opt/scribd/conversion/tmp/scratch24826/38867829.doc

88

SAP System Operations Manual


105 TEXT-007, 118 SY-VLINE, 119 TEXT-008, 141 SY-VLINE. FORMAT RESET. ULINE. LOOP AT T_E070. PERFORM WRITE_COL_LINE. SELECT SINGLE * FROM E070C WHERE TRKORR = T_E070-TRKORR. CHECK E070C-CLIENT IN S_CLNT. SELECT SINGLE AS4TEXT INTO E07T-AS4TEXT FROM E07T WHERE TRKORR = T_E070-TRKORR AND LANGU = SY-LANGU. W_TEXT = E07T-AS4TEXT. CHECK W_TEXT CP P_TEXT. CASE T_E070-TRSTATUS. WHEN 'R'. FORMAT INTENSIFIED OFF. WRITE: 02 T_E070-TRKORR COLOR COL_GROUP. CALL FUNCTION 'STRF_READ_COFILE' EXPORTING IV_DIRTYPE = 'T' IV_TRKORR = T_E070-TRKORR IMPORTING EV_COFI_HEADER = LS_COFILE_HEADER TABLES TT_COFI_LINES = LT_COFILE_LINES EXCEPTIONS NO_INFO_FOUND = 2. IF SY-SUBRC <> 0. WRITE: 12 'No logs' COLOR COL_NEGATIVE. ELSE.

23-Aug-10

* * Hack this for now. Need to get the system names from the CTS * SELECT * FROM DEVL WHERE DEVLAYER LIKE 'Z%'. IF SY-SUBRC = 0. DEV = DEVL-INTSYS. CONS = DEVL-CONSYS. ENDIF. ENDSELECT. SELECT * FROM TASYS INTO TABLE INT_TASYS WHERE CONSYS EQ CONS. LOOP AT INT_TASYS. CASE SY-INDEX. WHEN '0'. RECP = INT_TASYS-RECSYSTEM. WHEN '1'. RECP2 = INT_TASYS-RECSYSTEM. WHEN OTHERS. FLAG_WARNING = 1. ENDCASE. ENDLOOP. LOOP AT LT_COFILE_LINES. AT NEW TARSYSTEM. CASE LT_COFILE_LINES-TARSYSTEM. WHEN DEV. L_POSITION = 15. WHEN CONS.

/opt/scribd/conversion/tmp/scratch24826/38867829.doc

89

SAP System Operations Manual


L_POSITION = 21. WHEN RECP. L_POSITION = 27. WHEN RECP2. L_POSITION = 35. WHEN OTHERS. L_POSITION = 02. IF FLAG_WARNING = 1. WRITE:/ 'Error'. ENDIF. ENDCASE. IF L_POSITION <> 0. WRITE AT L_POSITION LT_COFILE_LINES-TARSYSTEM(3) COLOR 2. ENDIF. ENDAT. ENDLOOP. ENDIF. WHEN OTHERS. FORMAT INTENSIFIED OFF. WRITE: /02 T_E070-TRKORR COLOR COL_GROUP. ENDCASE. WRITE 43 E07T-AS4TEXT(60) COLOR 2. HIDE T_E070-TRKORR. WRITE 105 T_E070-AS4USER COLOR 2. WRITE 119 T_E070-AS4DATE COLOR 2. NEW-LINE. ENDLOOP. ULINE. CLEAR T_E070. AT LINE-SELECTION. IF T_E070-TRKORR <> ''. SUBMIT RDDPROTL WITH PV_KORR = T_E070-TRKORR AND RETURN. ENDIF. *&---------------------------------------------------------------------* *& Form WRITE_COL_LINE *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* * --> p1 text * <-- p2 text *----------------------------------------------------------------------* FORM WRITE_COL_LINE. WRITE: 01 SY-VLINE, 14 SY-VLINE, 20 SY-VLINE, 26 SY-VLINE, 34 SY-VLINE, 42 SY-VLINE, 104 SY-VLINE, 118 SY-VLINE, 141 SY-VLINE. ENDFORM. " WRITE_COL_LINE

23-Aug-10

/opt/scribd/conversion/tmp/scratch24826/38867829.doc

90

SAP System Operations Manual

23-Aug-10

Batch File to start SAP


@ECHO OFF REM REM Batch File to start SAP REM REM AP1start.bat - TXP 6/10/1998 REM REM ********************************************************************************** ***** REM This variable must be set so that SAP can find the correct computer name during startup REM ********************************************************************************** ***** set COMPUTERNAME=melbsap1 REM ********************************************************************************** ***** REM Set file variables used in this batch file. REM ********************************************************************************** ***** set LOGBKP=\\melbsap1\sapmnt\AP1\DVEBMGS00\work\AP1start.bak set LOGNAME=\\melbsap1\sapmnt\AP1\DVEBMGS00\work\AP1start.log set SLEEP=\\melbsap1\sapmnt\AP1\sys\exe\run\sleep set SAPGO=\\melbsap1\sapmnt\AP1\sys\exe\run\startsap set WINSERV=C:\Winnt\System32\net REM ********************************************************************************** ***** REM Set PATH so that the sapstart.exe program can be found (Do not remove this statement) REM ********************************************************************************** ***** set PATH=C:\WINNT\system32;C:\WINNT;;E:\MSSQL\BINN;\\melbsap1\sapmnt\AP1\sys\exe\run REM ********************************************************************************** ***** REM Copy/initialize the current startup log to a backup file for historical reference REM ********************************************************************************** ***** copy %LOGNAME% %LOGBKP% >nul echo Startup log for SAP Application and SAP Services > %LOGNAME% echo ****************************************************************** >> %LOGNAME% echo ****************************************************************** >> %LOGNAME% echo Starting the MSSQL Database Service >> %LOGNAME% echo ****************************************************************** >> %LOGNAME% date /T >> %LOGNAME% time /T >> %LOGNAME% %WINSERV% start MSSQLserver >> %LOGNAME%

/opt/scribd/conversion/tmp/scratch24826/38867829.doc

91

SAP System Operations Manual


%SLEEP% 10

23-Aug-10

echo ****************************************************************** >> %LOGNAME% echo Starting the SQLServer Agent Service >> %LOGNAME% echo ****************************************************************** >> %LOGNAME% date /T >> %LOGNAME% time /T >> %LOGNAME% %WINSERV% start SQLServerAgent >> %LOGNAME% %SLEEP% 10 echo ****************************************************************** >> %LOGNAME% echo Starting SAPAP1_00 Service >> %LOGNAME% echo ****************************************************************** >> %LOGNAME% date /T >> %LOGNAME% time /T >> %LOGNAME% %WINSERV% start SAPAP1_00 >> %LOGNAME% %SLEEP% 10 echo ****************************************************************** >> %LOGNAME% echo Starting the SAPOsCol Service >> %LOGNAME% echo ****************************************************************** >> %LOGNAME% date /T >> %LOGNAME% time /T >> %LOGNAME% %WINSERV% start SAPOsCol >> %LOGNAME% %SLEEP% 10 echo ****************************************************************** >> %LOGNAME% echo Starting the SAP Application >> %LOGNAME% echo ****************************************************************** >> %LOGNAME% date /T >> %LOGNAME% time /T >> %LOGNAME% %SAPGO% R3 AP1 melbsap1 START_DVEBMGS00_MELBSAP1 >> %LOGNAME% %SLEEP% 10 echo SAP R/3 System Ready >> %LOGNAME% date /T >> %LOGNAME% time /T >> %LOGNAME% exit

/opt/scribd/conversion/tmp/scratch24826/38867829.doc

92

SAP System Operations Manual

23-Aug-10

Appendix D SQL datafile change for AP1


Scenario 1) The data file was named master.ndf and has to be renamed to SAP standards as AD1data2.ndf.
This was performed on the 10th May 2000.

Actions
1) A full IDR backup was done prior to these steps being carried. 2) SAP R/3 was stopped. 3) Set the database into offline mode. This allows the database to be up, yet have no users attached to it. The corresponding SQL query command executed was: USE MASTER

EXEC sp_dboption AD1, offline , TRUE


4) Check and Display the database options set for the specified database AD1- it must be set to offline. The corresponding SQL query command executed was:

sp_dboption AD1
5) Once confirmed the database is detached from MS SQL. This allows the moving of the datafile. The corresponding SQL query command executed was:

sp_detach_db AD1, TRUE


6) Now rename the datafiles as required at the NT level using Windows Explorer

Create a new directory on the Database drive, called Ad1data2, copy master.ndf into this directory, and rename master.ndf as AD1data2.ndf.
7) Re-attach the database with the existing and new name as follows: EXEC sp_attach_db @dbname = NAD1, @filename1 = NF:\Ad1data1\AD1data1.mdf, @filename2 = NF:\Ad1data2\AD1data2.ndf, @filename3 = NF:\Ad1log2\AD1log2.ldf, @filename4 = NE:\Ad1log1\AD1log1.ldf 8) To confirm all these steps have been successful check through Enterprise Manager, the properties of AD1 are the files at the new locations/filenames that was specified in the attach. 9)Start SAP and check if it connects to the database with the newly defined structure.

/opt/scribd/conversion/tmp/scratch24826/38867829.doc

93

SAP System Operations Manual

23-Aug-10

10) Perform Checks on the SAP system and verify it is all the same. Also confirm the backup has worked post-datafile change.

/opt/scribd/conversion/tmp/scratch24826/38867829.doc

94

You might also like