Thursday, 11 October 2012

Switch Oracle Archive Log Destination

 If the SAP system/Oracle database is 'stuck' due to lack of space in the oraarch folder, the archive log destination can be dynamically changed so that log files are produced in a different location.
  • Create new folder, for example: /oracle/<SID>/sapdata1/arch
  • sqlplus /as sysdba
  • show parameter log_archive_dest;
  • alter system archive log stop;

If log_archive_dest is set:
  • alter system set log_archive_dest='/oracle/<SID>/sapdata1/arch/<SID>arch';

If log_archive_dest_n is set:

  • alter system set log_archive_dest_n='location=/oracle/<SID>/sapdata1/arch/<SID>arch';
  • alter system archive log start;
  • alter system switch logfile;
Note: This step can take a while if the system is busy or the database was previously stuck.

The location of where an archive log has been written is recorded in the Oracle table v$archived_log. Therefore it is not advisable to move the archive log files after the space in oraarch has been freed up - let brarchive backup the files and delete them.

Thursday, 20 September 2012

Oracle Trace Folder

If there are no trace files in /oracle/<SID>/saptrace the configure destination may be different.
To find the configured destination:
Log into Oracle
Type:
show parameter user_dump_dest

Alternatively run:
SELECT VALUE FROM V$DIAG_INFO WHERE NAME = 'Default Trace File';

Friday, 14 September 2012

SAP Backup and Restore

Info taken from:
http://help.sap.com/saphelp_nw04/helpdata/en/e6/f3d0ed99634078be2da254b97104d7/content.htm

Restore full database:
brrestore -d util_file -p init<SID>.sap.online -m full -b <backup log file to use>

Restore individual datafiles:
brrestore -d util_file -p init<SID>.sap.online -m <file number> -b <backup log file to use>

File number is the Oracle file number. To list the Oracle file numbers in the original database:

select file#, name from v$datafile;


FILE#       NAME  
---------------------------------------------- 
1 /oracle/ECY/sapdata1/system_1/system.data1 
2 /oracle/ECY/sapdata1/undo_1/undo.data1 
3 /oracle/ECY/sapdata1/sysaux_1/sysaux.data1...


Restore archive log files:
brrestore -a util_file -p init<SID>.sap.online -m <file number> -b <backup log file to use>

Thursday, 30 August 2012

BDLS Notes


Transaction BDLS complains if it is not run in test mode first.

If the BDLS run fails subsequent runs may show an error:



To get around the message "Another Process is Running for Conversion":

  • Run SE38
  • Enter program RBDLSMAP_RESET
  • Execute

No message is shown during or after the program is run.

Thursday, 2 August 2012

SAP Web/Java Management Console (SAPMC)

Info taken from here:
http://help.sap.com/saphelp_nwce10/helpdata/en/44/c707c053550f2ce10000000a1553f7/frameset.htm

Hosted on Java instance:
Connect to following URL on any Java instance:
http://<servername>:5<instance>13/

To install the SAP Java MC locally:
Copy all files from following location to PC:
/usr/sap/<SID>/JC<instance>/exe/servicehttp/sapmc

Open the sapmc.html file in Internet Explorer

Wednesday, 25 July 2012

Starting and Stopping SAP Systems

Info taken from here:
http://help.sap.com/saphelp_nwpi71/helpdata/en/47/1d6feeff6e0d46e10000000a155369/content.htm

stopsap/startsap -t <task> -i <instance> -v <virtual host>

E.g. stopsap -t r3 -i DVEBGMS00 -v vserver1

(Quick form: startsap/stopsap <virtual host> to start all services on that particular virtual host)

Parameters
[-t | -task <task>] Specify task (see list below)
[-i | -instance <instance>] Specify SAP system instance (see list below)
[-v | -vhost "<virtual hostname="">[ <virtual hostname="">]*"] Specify virtual host names
[-c | -check] Check database and SAP instance status
[-h | -help] Display help
[-V | -VERSION] Display startsap script version
[-C | -checkVHost] Check virtual host name

Task List
check - Check status of database and SAP system instancesr3 | j2ee - Start or stop SAP instances only. You can use either r3 or j2ee, regardless if the instance to be started or stopped is an ABAP or Java instance.
db - Start or stop ABAP database only
jdb - Start or stop Java database only
all | <blank> - Start or stop database and SAP instance
startupsrv - Start or stop sapstartsrv program

SAP System Instance List
DVEBMGS<nn> - ABAP primary application server Instance
D<nn> - ABAP additional application server instance
ASCS<nn> - ABAP central services instance (ASCS instance)
SCS<nn> - Java central services instance (SCS instance)
J<nn> - Java application server instance
TRX<nn> - TREX instance
ERS<nn> - Enqueue replication server instance (ERS instance)
SMDA<nn> - Diagnostics agent instance
W<nn> - Web services instance
G<nn> - Gateway instance

Stopping Order

ABAP system:
  1. Additional application server instances (if available)
  2. Primary application server instance
  3. ASCS instance (if available)
  4. ERS instance for the ASCS instance (if available)
  5. Database instance
Java system:
  1. Application server instances
  2. SCS instance
  3. ERS instance for the SCS instance (if available)
  4. Database instance
Dual-stack (ABAP+Java) system:
  1. Additional application server instances (if available)
  2. Primary application server instance
  3. ASCS instance (if available)
  4. SCS instance
  5. ERS instance for the ASCS instance (if available)
  6. ERS instance for the SCS instance (if available)
  7. Database instance

Starting Order

ABAP system:
  1. Database instance
  2. ERS instance for the ASCS instance (if available)
  3. ASCS instance (if available)
  4. Primary application server instance
  5. Additional application server instances (if available)
Java system:
  1. Database instance
  2. ERS instance for the SCS instance (if available)
  3. SCS instance
  4. Application server instances
Dual-stack (ABAP+Java) system:
  1. Database instance
  2. ERS instance for the SCS instance (if available)
  3. ERS instance for the ASCS instance (if available)
  4. SCS instance
  5. ASCS instance (if available)
  6. Primary application server instance
  7. Additional application server instances (if available)

Wednesday, 18 July 2012

Ping SAP ICM


http://<server>:<port>/sap/public/icman/ping (doesn't require login)



http:// <server>:<port> /sap/bc/ping (requires login to the backend system)



VNC Server

The following has been tested on Solaris


To start a VNC Server process:

bash
export DISPLAY='hostname':10.0
export PATH=$PATH:/usr/X11/bin:/usr/openwin/bin
vncserver

To reset the VNC password:
vncpasswd

To start a new Xterm session in an existing VNC session:
hostname (to get the server name)
setenv DISPLAY <hostname result>:1
nohup /usr/openwin/bin/xterm &

SAP Web dispatcher

Starting SAP Web Dispatcher on Unix
Change to sapwebdisp folder, typically /usr/sap/<SID>/W<instance>/sapwebdisp
Enter command: nohup sapwebdisp pf=<profile file>.pfl &

Test Web Dispatcher
The admin URL is http://<server>:<port>/sap/admin
Log in as webadm

SAP Content Server Notes


SAP Content Server consists of a DB and Apache front end on Unix or an IIS service on Windows. Both components are started independently.

Starting SAP MaxDB
login as the Database Instance Owner (eg sqd<SID>)
dbmcli -u superdba,<password> –d <sid> db_online
(/sapdb/<SID>/db/pgm/dbmstart –d <db sid> might also work)
./sapdb/programs/bin/x_server start

Starting Apache2 and Content Server
Log in as <SID>cs
cd /usr/sap/<SID>/apache2/bin
apachectl start
It may take quite a while to start

Stopping Apace2 and Content Server
Log in as <SID>cs
cd /usr/sap/<SID>/apache2/bin
apachectl stop

Stopping SAP MaxDB
login as the Database Instance Owner (eg sqd<SID>)
/sapdb/<SID>/db/pgm/dbmstop –d <SID>
or
/sapdb/programs/bin/dbmcli –d <SID> –u DBM, <password> db_offline

MaxDB Status
/sapdb/programs/bin/dbmcli –d <SID> –u DBM, <password> db_state

Test Content Server Web Page
http://<server>:1090/sapcs (this always returns an "HTTP 400 Bad Request" page")
A better one is:
http://<server>:1090/ContentServer/ContentServer.dll?serverInfo

Test Apache Web Page
http://<server>:1090/ returns the page below:

Test Content Server From SAP
Transaction SE38
Enter program name RSCMST and click execute
Choose the repository and click execute
Click execute to run the tests

MDM Notes

Starting MDM:
startsap pf=/usr/sap/<sid>/SYS/profile/<mds profile>
startsap pf=/usr/sap/<sid>/SYS/profile/<mdis profile>

Stopping MDM:
sapcontrol -nr <mds instance> -function Stop
sapcontrol -nr <mdis instance> -function Stop

Testing MDM Catalogue:
http://<server>:<j2ee port>/SRM-MDM/SRM_MDM


Tuesday, 17 July 2012

Emergency SAP Portal login

Emergency SAP Portal log in procedure:
http://help.sap.com/saphelp_nw04s/helpdata/en/3a/4a0640d7b28f5ce10000000a155106/frameset.htm

Log in as <SID>adm
Navigate to /usr/sap/<SID>/JC<instance>/j2ee/configtool
Run Configtool
Navigate to Global server configuration -> Services -> com.sap.security.core.ume.service
Change field ume.superadmin.activated to TRUE
Change field ume.superadmin.password to a new password
(under CUA this may have to be set to blank in order to use the password from the backend UME system)


Save changes
Restart the Java instance

Log in as SAP* user. All other users will be locked out at this stage and they will be shown a warning on the Portal log in page.

When Portal config work is complete:
Change field ume.superadmin.activated back to FALSE
Restart Java instance