Go to www.jdvnotes.info
JdV's Notes
My notes on: SAP, Oracle, Windows, AIX, Solaris and other stuff
Monday, 8 July 2019
Wednesday, 20 February 2019
Repeat Linux Command
To repeat every 2 seconds (default):
watch <command>
To repeat every X seconds:
watch -n <X> <command>
Sunday, 17 June 2018
Excel Notes
Find the existence of a value in an Excel spreadsheet
=IF(ISERROR(VLOOKUP(<input cell>,<page>!<col>:<col>, 1, FALSE)),"No","Yes")
Returns "No" if <input cell> isn't found in column <col> on page <page>
Format Row Based on Value in a Cell
Click Conditional Formatting
Click New Rule
Choose "Use a Formula to determine which cells to format"
Enter the formula: =INDIRECT("<column>"&ROW())="<value>"
Enter the desired format (text colour, fill colour, etc).
Click OK to save the new format
Wednesday, 24 January 2018
Friday, 16 June 2017
SAP MaxDB Notes
Connect to remote DB
dbmcli -d <SID> -n <server name> -u <username>,<password>Switch to a different user while logged in
dbmcli> user_logon <user name>,<password>
Run SQL
dbmcli> sql_execute <command>Check status
dbmcli> db_state -vSAP note on XUSER mechanism
39439 - XUSER entries for SAP MaxDBRecreate DBM user:
xuser -U c -u CONTROL,<password> -d <SID> -n <server> -S INTERNAL set
Tuesday, 4 April 2017
SAP URL Shortcuts
Go to http://<server>:<port>/urlapi_app_manager
Create new Application ID
Go to http://<server>:<port>/sap/url/go/<app ID>
Saturday, 1 October 2016
SAP HANA Notes
Change System User's Password
ALTER DATABASE <DB> SYSTEM USER PASSWORD <new password>Log Into HANA Database
List Tenants in HANA Database
List HANA User
hdbuserstore listDATA FILE : /home/<sid>adm/.hdb/<server>/SSFS_HDB.DAT
KEY FILE : /home/<sid>adm/.hdb/<server>/SSFS_HDB.KEY
KEY DEFAULT
ENV : <server>:<port>
USER: <user>
DATABASE: <db>
Update HANA User Store
hdbuserstore SET DEFAULT "<server>:<port>@<db>" <user> <password>SAP Help Pages
http://help.sap.com/hana_platformSAP HANA Studio
http://help.sap.com/saphelp_hanaplatform/helpdata/en/c8/aa369bbb57101497c4e0f9c1028266/frameset.htmHANA SQL Reference
help.sap.com/hana/SAP_HANA_SQL_Script_Reference_en.pdfFree HANA Trial Database
hanatrial.ondemand.comThe SAP HANA Reference for SAP Basis Administrators
http://scn.sap.com/community/hana-in-memory/blog/2013/05/27/andy-silvey--sap-hana-command-line-tools-and-sql-reference-examples-for-netweaver-basis-administratorsTuesday, 17 May 2016
Find Text Code for Icon in SAP
To display all the available standard icons
- Transaction ICON
- Note the icon's name (e.g. ICON_POSITIVE)
To find the allocated 2-character code for the icon
- Transaction SE11
- Choose Type Group and enter ICON
- Click Display
- Search for the text code (e.g. ICON_POSITIVE)
- Code is @04
Wednesday, 11 May 2016
Unicode conversion notes
http://scn.sap.com/docs/DOC-8616
Transaction
SPUMG - Unicode Preconversion
1051576 - Conversion of Single Code Page Systems to Unicode
1096903 - Tutorial: "Table splitting in SPUMG or SPUM4"
551344 - Unicode Conversion Documentation
1319517 - Unicode Collection Note
765475 - Unicode Conversion: Troubleshooting
Tuesday, 10 May 2016
Browse roles and users without PFCG access
Browse table AGR_USERS to see users assigned to roles
Thursday, 5 May 2016
Wednesday, 6 April 2016
Approve Download Basket Without Solution Manager
Login to Solution Manager system
Run SE37
Enter: /TMWFLOW/MO_UI_BASKET_AUTHORIZ
Press F8
Leave the default values
Press Execute
Select the items in the basket to approve
Click Confirm Download
Items can now be downloaded directly from the download basket on SAP's website
Clean memory on Unix and Linux
To list semaphores and event flags
cleanipc
To remove leftover semaphores and event flags
cleanipc
To list shared memory
ipcs -m
To remove entry
ipcrm -M
ipcrm -m
To list semaphores
ipcs -s
To remove semaphore entry
ipcs - S
ipcs -s
Details from:
http://www.ibm.com/support/knowledgecenter/ssw_aix_53/com.ibm.aix.cmds/doc/aixcmds3/ipcs.htm
http://www.ibm.com/support/knowledgecenter/ssw_aix_53/com.ibm.aix.cmds/doc/aixcmds3/ipcrm.htm
Thursday, 1 October 2015
EH&S notes (Environment Health and Saftey)
Transactions:
CGSADM - Administer connections
CG5Z - WWI monitor (make servers active)
Customising Configuration:
SPRO
-> SAP Reference IMG
-> Environment, Health and Safety
-> Basic Data and Tools
-> Report Definition
-> Windows Wordprocessor Integration (WWI)
-> Configuration of Generation Servers
-> Manual Configuration of Generation Servers
-> Specify Generation Servers
Allows direct editing of table TCGS8
Tables:
TCGS1 - EHS: WWI spool cluster Spool dest. <->->
TCGS2 - EHS: Assignment EHS doc. cat. < > DMS doc.
TCGS3 - EHS: WWI destinations
TCGS4 - EHS: Language-Dependent Description for WWI destinations
TCGS5 - EHS: Assignment of WWI destinations to PCs used for gen.
TCGS6 - EHS: Definition of WWI printer types
TCGS7 - EHS: Language-Dependent Description for WWI printer types
TCGS8 - EHS: Definition of PCs used for WWI document generation
TCGS9 - EHS: Language-Dependent Description for WWI generation PCs
TCGSGP - EHS: Search parameter (reproduction from SET/GET memory)
TCGST01 - EHS: Control Table for EH&S Status
TCGST02 - EHS: Assignment Value Assignment Type to Status
Monday, 28 September 2015
Adjust Stack.xml file
Run transaction SE38
Enter program name RPT_MOPZ_COPY_STACK_XML
See SAP note 1600302 - MOpz: Copy stack xml with a report
Wednesday, 16 September 2015
DB2: Restart db2vend process
IBM's recommendation is to run the following command:
db2pd -db <dbname> -fvp lam1 term
(where "lam1" stands for LOGARCHMETH1)
See here (http://www-01.ibm.com/support/docview.wss?uid=swg21607001)
Friday, 24 July 2015
Map Drive in DOS
- pushd \\server\folder
To see which drive letter has been mapped:
- net use
To end the temporary mapping:
- popd
To map a drive to a specific letter:
- net use <letter>: \\server\folder
To unmap the drive letter:
- net use <letter>: /DELETE
Friday, 10 July 2015
SAP Host Agent Notes
SAP Host Agent Troubleshooting:
http://scn.sap.com/docs/DOC-342171862333 - Common Host Agent issues displayed in Agent Administration
http://service.sap.com/sap/support/notes/1862333Host Agent Automatic Upgrade
- Unpack newer agent to /usr/sap/hostctrl/new
- Host agent checks the location every 5 minutes (by default) and upgrades the agent if necessary
Thursday, 18 June 2015
Edit an RFC entry in SM59 which is greyed out
- Run transaction SM59
- Double-click on the appropriate RFC connection
- Type TOGL into the OK code field
View Solution Manager Diagnostic (SMD) Agent Log files in Solution Manager
- Run transaction SOLMAN_WORKCENTER
- Click on the Root Cause Analysis page tab
- Click on the Host Analysis link
- Filter the system list for the appropriate system
- Click File System Browser
- Navigate to the appropriate folder (typically /usr/sap/DAA/SMDA<nr>/SMDAgent/log) using the folder icons on the left or type in the location manually
View Current Monitoring Status/Alerts in Solution Manager
- Run transaction SOLMAN_WORKCENTER
- Click on the Technical Monitoring page tab
- Click on the System Monitoring link
- Click on the Systems page tab
- Click on the All Systems page tab (and filter for the required SID)
- Highlight the system
- Click System Monitoring -> click Start New Window or Start Embedded
- Select the system
- View the current state of alerts/metrics
Monday, 8 June 2015
Oracle DB Start Up Time
SELECT to_char(startup_time,'DD-MON-YYYY HH24:MI:SS') "DB Startup Time" FROM sys.v_$instance;
Result:
DB Startup Time
--------------------
09-MAY-2015 20:23:13
Wednesday, 19 November 2014
Reset J2EE_Admin or Administrator Password
STEP 1: Enable user "SAP*"
- Start the Config Tool C:\usr\sap\<SID>\<engine-instance>\j2ee\configtool\configtool.bat
- Goto cluster-data -> Global server configuration -> services -> com.sap.security.core.ume.service
- Double-click on the property "ume.superadmin.activated"
- Set the value to "TRUE"
- Double-click on the property "ume.superadmin.password"
- Set the value to the required password
- Click Save
- Restart the J2EE engine
STEP 2: Login to NetWeaver as user "SAP*"
- http://<host>:<port>/useradmin/index.jsp
- Click User Admin
- Enter userid SAP* with the password that was set above
- Search for user to unlock or change the password (i.e. "Administrator" or "J2EE_Admin")
- Unlock and/or change password for the required admin user
STEP 3: Disable "SAP*"
- Start the Config Tool C:\usr\sap\<SID>\<engine-instance;>\j2ee\configtool\configtool.bat
- Goto cluster-data -> Global server configuration -> services -> com.sap.security.core.ume.service
- Double-click on the property "ume.superadmin.activated"
- Set the value to "FALSE"
- Click Save
- Restart the J2EE engine
STEP 4: Login as "Administrator" or "J2EE_Admin"
- Go to http://<host>:<Port>/useradmin/index.jsp
- Enter appropriate user ID and password
- When prompted change the password
Wednesday, 5 November 2014
BI/BW transactions and information
RSMO - Monitor InfoPackages
RSADMIN - Set various parameters in BW, including the user ID responsible for running the jobs
RSA1 - Configure source systems etc in BW/BI system
RSA7 - View delta queue in source system
WE05 - View IDOCs
WE20 - Partner profiles
WE21 - Ports in IDOC processing
The user ID in the source and/or BW system needs the following profiles:
SAP_ALL
SAP_NEW
S_BI-WHM_RFC
S_BI-WX_RFC
S_RS_ALL
(SAP_ALL and SAP_NEW alone are not enough).
"No IDocs could be sent to BW using RFC."
Automate the running of process chains with variants by scheduling the program RSPROCESS appropriately
SAP notes:
150315 - BW-Authorizations for Remote-User in BW and OLTP
1964223 - No Idocs Arrived from the Source System
Thursday, 30 October 2014
List local wireless networks
- Open command prompt
- Enter following command: netsh wlan show networks bssid
Wednesday, 22 October 2014
Change TMSADM Password
- Log on to the transport domain controller in client 000
- Run SE38
- Enter program name TMS_UPDATE_PWD_OF_TMSADM
- Enter a new password
- Click Execute
You will be required to log into client 000 of all the connected systems
More details:
http://help.sap.com/saphelp_nw73/helpdata/en/e7/c5066e05034f4a9cbcf9c84b513b7b/frameset.htm
Thursday, 4 September 2014
Find Table Entry Changes in SAP
Table: CDHDR
Search for the user and/or date the change was made
Copy the contents of the 'Object value' field
Transaction SE16
Table: CDPOS
Search for the object value found above
Wednesday, 20 August 2014
TP Notes
Manually Add Transport To a SAP Import Queue
tp addtobuffer <Transport> <SID> client=<Client no.> pf=<Path to transport profile file .PFL>Manually Import Transport
tp import <Transport> <SID> client=<Client no.> U<Mode> pf=<Path to transport profile file .PFL>TP Command Options (Mode)
0 - Overtaker: - Import from the buffer without deleting and set unconditional mode 1 in the buffer to trigger another import.1 - During export: - Ignore the incorrect status of the command file.
1 - During import: - Ignore the fact that the change request was already imported.
2 - During export: - Do not expand the selection with TADIR brackets.
2 - During import: - Overwrite original objects.
3 - During import: - Overwrite system-dependent objects.
4 - During import: - Ignore invalid component version.
6 - During import: - Overwrite objects in unconfirmed repairs.
8 - During import: - Ignore restrictions based on table classification.
9 - During import: - Ignore the fact that the system is locked for this type of transport.
Thursday, 14 August 2014
Unlock SAP User Account / Delete SAP* user in DB2
- db2
- connect
- update sapsr3.usr02 set uflag=0 where mandt='<client>' and bname='<username>'
- delete from sapsr3.usr02 where mandt='<client>' and bname='SAP*'
Response should be:
DB20000I The SQL command completed successfully.
Effect is immediate. No 'commit' required.
(* Assumes the schema is sapsr3)
Friday, 13 June 2014
DB2 Manual Failover
Got to dir /db2/db2<sid>/sqllib
Modify db2nodes.cfg file to show:
0 <servername> 0
As root:
cd /db2/db2_software/adm
./db2set -g DB2SYSTEM=<server name>
As db2<sid>:
db2gcf -u -t 60 -p 0 -i db2<sid>
Thursday, 8 May 2014
Wednesday, 7 May 2014
Find SAP System Installation Date
Enter table name TPFHT
Press F8 or click Execute
The generation date should indicate when the profiles were initially created.
Wednesday, 30 April 2014
AIX C++ Library Version
lslpp -L | grep xlC
Monday, 7 April 2014
Content Server Notes
Check Database Connection
Run transaction DB59Execute connection tests from all servers
Retrieve Document
Run transaction CV01NSearch for any document
Display document
Check Repository Configuration
Run transaction CSADMINTuesday, 28 January 2014
SMD Agent Admin URL
Wednesday, 22 January 2014
SAP Host Agent, SAPOSCOL, SAP Host Control URLs
SAP Host Agent URL:
http://<server name>:5<inst>13/SAPHostAgent/?wsdlSAP Host Control URL:
http://<server name>:1128/SAPHostControl/?wsdlSAPOSCOL URL:
http://<server name>:1128/SAPOscol/?wsdlEnd points can be queried using Wizdler extension for Chrome
Wednesday, 8 January 2014
Find executable and process ID from port number
lsof -i :1527
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
tnslsnr 11534508 oradep 12u IPv4 0xf1000e0014b5dbb8 0t0 TCP hdep001a:tl isrv (LISTEN)
ps -ef |grep 11534508
oradep 11534508 1 0 Feb 04 - 0:09 /oracle/DEP/102_64/bin/tnslsnr LISTENER_DEP -inherit
Saturday, 12 October 2013
Wily Starting and Stopping
./EMCtrl.sh (start|stop|help)
status - status of the Enterprise Manager
start - start Enterprise Manager
stop - stop Enterprise Manager
help - lists these commands
Tuesday, 24 September 2013
Providing DB2 Support Info to SAP
As <SID>adm or db2<SID>:
db2support <work_dir> -d <dbsid> -c -s -f
Windows Server Uptime
Open a command prompt
Type "net statistics server"
The line that starts "Statistics since …" shows the date and time the server was last restarted.
(The command can be shortened to "net stats srv".)
On Windows 2008:
SystemInfo | find "Boot Time"
Returns:
System Boot Time: 02/03/2014, 00:06:12
(Windows Task Manager also shows uptime in Windows 2008)
Tuesday, 17 September 2013
DB2 Notes
Log In To DB2 As a Specific User
To bring a database out of backup pending mode
Ensure DB is offlineRun the following command:
db2dart <dbname> /CHST /WHAT DBBP OFFInfo from here:
http://publib.boulder.ibm.com/infocenter/db2luw/v8/index.jsp?topic=/com.ibm.db2.udb.doc/core/r0003477.htm
Create or Copy a Table
- CREATE TABLE <schema>.<new table name> LIKE <schema>.<existing table name>
- INSERT INTO <schema>.<new table name> SELECT * FROM <schema>.<existing table name>
Delete or Drop a Table
DROP TABLE <schema>.<table name>Rename a Table
RENAME TABLE <schema>.<new table name> TO <new table name>To see DB2 version
Run the following command at OS level:db2level
Backups
To take an ad-hoc online backup
db2 "backup db <DBSID> online to /staging/area, /staging/area, /staging/area, /staging/area"(The number of '/staging/area's governs the size of the dumped file.)
To take an ad-hoc offline backup
db2 "backup db <DBSID> to /staging/area, /staging/area, /staging/area, /staging/area"(The DB2 default is to take offline backups. The number of '/staging/area's governs the size of the dumped file.)'
View DB2 backup history
To view the backup history in a decent, readable format:db2 "select substr(comment,1,20) "TYPE", substr(start_time,7,2)||'/'||substr(start_time,5,2)||'/'||substr(start_time,1,4)||' '||substr(start_time,9,2)||':'||substr(start_time,11,2) "START", substr(end_time,7,2)||'/'||substr(end_time,5,2)||'/'||substr(end_time,1,4)||' '||substr(end_time,9,2)||':'||substr(end_time,11,2) "END", SQLCODE "ERROR" from sysibmadm.DB_history Where ENTRY_STATUS='A' and comment like 'DB2 BACKUP%' group by substr(comment,1,20), start_time, end_time, SQLCODE order by end_time desc"
To view all of the backup histories:
db2 list history BACKUP all for <SID>To view all of the history since a certain date:
db2 list history BACKUP since 20130301 for <SID>To view the archive log history since a certain date:
db2 list history archive log since 20130301 for <SID>
Provide DB2 diagnostic info to SAP
Refer to following SAP note 83819 - DB6: collect support datadb2support <work_dir> -d <dbsid> -f
This produces a file called db2support.zip in the 'work_dir'
Find Schema Names in a DB2 Database
db2 select schemaname from syscat.schemataList Tables in a DB2 Database
db2 list tables for schema sapsr3dbor
db2 select tabname from syscat.tables where tabschema = '
Check the validity/consistency of a DB2 archive log file
db2cklog check (more info here)
Find database size
db2 "call get_dbsize_info(?,?,?,-1)"Value of output parameters
--------------------------
Parameter Name : SNAPSHOTTIMESTAMP
Parameter Value : 2015-04-30-08.55.09.658199
Parameter Name : DATABASESIZE
Parameter Value : 1630123229184
Parameter Name : DATABASECAPACITY (total amount of disk space allocated)
Parameter Value : 4276539830272
Return Status = 0
To run a script file of DB2 commands
db2 -tvs <filename>.clpFind DB2 startup time
db2 get snapshot for dbm | grep -i managerDatabase Manager Snapshot
Database manager status = Active
Start Database Manager timestamp = 02/20/2015 18:13:27.587803
Remote connections to db manager = 111
Remote connections executing in db manager = 1
Local connections executing in db manager = 0
Restart db2vend process cleanly
Find more info on an error code
db2diag -rc <number including minus sign>Find out if a database has more than one partition
db2pd - -alldbpartitionnumsDB2 error ADM6017E
FUNCTION: DB2 UDB, buffer pool services, sqlbClnrAsyncWriteCompletion, probe:0
MESSAGE : ADM6017E The table space "PSAPTEMPX" (ID "30") is full. Detected on
container "/db2/SID/saptemp1/NODE0000/tempX/PSAPTEMPX.container000"
(ID "0"). The underlying file system is full or the maximum allowed
space usage for the file system has been reached. It is also possible
that there are user limits in place with respect to maximum file size
and these limits have been reached.
334608 - DB6: SMS tablespace ##(PSAPTEMP##) is FULL
Create an additional temporary tablespace with the same page size.
db2 list tablespaces show detail
Tablespace ID = 30
Name = PSAPTEMPX
Type = System managed space
Contents = Temporary data
State = 0x0000
Detailed explanation:
Normal
Total pages = 1
Useable pages = 1
Used pages = 1
Free pages = Not applicable
High water mark (pages) = Not applicable
Page size (bytes) = 4096
Extent size (pages) = 8
db2 list tablespace containers for 30
Tablespace Containers for Tablespace 30
Container ID = 0
Name = C:\db2\SID\sapdatat
Type = Path
Now create a new temporary tablespace on another disk with more freespace.
db2 "create temporary tablespace PSAPTEMPY PAGESIZE 4096 managed by system using ('D:\db2\SID\sapdatat')"
After the new temporary tablespace has been successfully created, you can delete tablespace PSAPTEMPX:
db2 "drop tablespace PSAPTEMPX"
Thursday, 15 August 2013
Default Passwords
Wily Introscope
Username | Password |
---|---|
Admin | Admin89 |
Guest | guest12 |
Default SAP Passwords
Details | Client | Username | Password |
---|---|---|---|
RFC to SAP | 000 | OSS_RFC | cpic |
Comms user | All | SAPCPIC | ADMIN |
STMS user | All | TMSADM | PASSWORD |
STMS user | All | TMSADM | $1Pawd2& |
Earlywatch | 066 | EARLYWATCH | SUPPORT |
Admin user | All | SAP* | PASS |
Default Apache Tomcat Password
Username | Password |
---|---|
admin | admin |
Default SAP MaxDB Passwords
Username | Password |
---|---|
CONTROL | control |
SUPERDBA | admin |
Friday, 14 June 2013
Unix Commands And Info
Switch to 'root' User in SUDO
Type:sudo su -
Prompt should change to reflect the fact you're now logged in as root.
If the following text appears, you don't have root access:
Email a File from Unix
To email a binary/data file from Unix use:uuencode <filename> <name-to-call-attachment> | mail -s "Subject" <email address>
If uuencode isn't available the contents of a text file can be emailed from Unix:
mail -s "Subject" user@example.com
Search for Files by Contents
To find a file based on its contents in Unix:find . -name "*.txt" -exec grep -il "hello" {} \;
To scan all files in the current folder for particular text and return the filename:
grep -il "hello"
('i' = ignore case, 'l' = return file names of matches)
Find files and Delete Them
Find a file By Date
To find a file based on its date (in this case more than 365 days) and move it:find . -mtime +365d -exec mv {} /new/destination/folder \;
Copy Hidden Files in Unix
The following command copies any hidden files (files starting with full stop, dot, '.') followed by any letter or number:
cp /path/to/source/.[a-zA-Z0-9]* /path/to/target/
Sort Directory Listing
See Who Is or Was on a Server
Type: last | moreCreate Softlink (Symbolic link)
ln -s <destination folder> <alias>The '-s' switch is required to link across filesystems.
More info here:
http://pic.dhe.ibm.com/infocenter/aix/v7r1/index.jsp?topic=%2Fcom.ibm.aix.cmds%2Fdoc%2Faixcmds3%2Fln.htm
Thursday, 13 June 2013
Register Content Server/SAP MaxDB In LMDB/SMSY
How To Register a Content Server/SAP MaxDB in LMDB/SMSY
(Info taken from SAP note 1794004)Assume Solution Manager Diagnostic agent and Host Agent are installed on server. Host Agent needs to be at least patch 143.
Find Location of Database Tools Path
saphostctrl.exe -host <Content Server host> -user sapadm - -dbname <DB SID> -dbtype ada -function GetDatabaseProperties -dbuser <db user ID> -dbpass <db user password>
Enter password for sapadm user.
Locate line saying Database/DatabaseToolsPath=<Path>
Set Connection Details
Run the following command:saphostctrl.exe -host <DB hostname> -user sapadm - -function ExecuteOperation -name SetupMaxDBCredentials SID=<DB SID> DatabaseToolsPath=<Path> USERNAME=<DB user ID> PASSWORD=<DB user password>
Enter password for sapadm user
If the line "FATAL: Close xuser entry failed:" appears in the reponse carry out the steps below:
- Enter the following line to register a user:
- xuser -u <DB user>,<Password> -d <DB SID> -n <DB hostname>
- Enter the following line to ensure the user details have been saved:
- xuser list
- Re-run the previous saphostctrl command to set the connection details.
Test The Connection
Enter the following command:saphostctrl.exe -host <DB hostname> -user sapadm - -dbname <DB SID> -dbtype ada -function GetDatabaseStatus
Enter password for sapadm user
LMDB and SMSY
After restarting the host agent service the details of the Content Server or SAP MaxDB will be pushed to the LMDB of the configured SMD Agent.The database's details will be visible in LMDB/SMSY after a few minutes.
Friday, 24 May 2013
Suspend Or Release All SAP Background Jobs
Run SE38
Enter program name BTCTRNS1
Click Execute
This program has no selection screen. It just returns the screen below:
In SM37 the jobs go into status "Release/Suspended":
To Release All Currently Suspended SAP Background Jobs
Run SE38
Enter program name BTCTRNS2
Click Execute
This program has no selection screen. It just returns the screen below:
Friday, 17 May 2013
Adobe Document Services (ADS) Notes
Run SE38
Enter program name FP_TEST_00
Choose form FP_TEST_00
Click Execute
Enter a 'real' printer such as LP01 (as opposed to LOCL)
Click Print Preview
Document will appear embedded in SAP GUI
To Display Info About the Adobe Document Services (ADS) Service
Adding Extra Fonts to ADS
Create folder fonts under:
/usr/sap/<SID>/SYS/global/AdobeDocumentServices/FontManagerService
Create folder customer under fonts
Ensure that the <sid>adm user has read and write permission for the directory
Restart following services in NWA: ADS (com.adobe/AdobeDocumentServices), font manager and XML template
More info here.
Tuesday, 2 April 2013
PAL - Printing Assistant for Landscapes
Requires RFCs to target systems
SAP doc on setting up PAL
(PAL is to SAP printing what CUA is to SAP users!)
Thursday, 11 October 2012
Switch Oracle Archive Log Destination
- 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;
Thursday, 20 September 2012
Oracle Trace Folder
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
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)
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
http://help.sap.com/saphelp_nwpi71/helpdata/en/47/1d6feeff6e0d46e10000000a155369/content.htm
stopsap/startsap -t <task> -i <instance> -v <virtual host>
(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:
- Additional application server instances (if available)
- Primary application server instance
- ASCS instance (if available)
- ERS instance for the ASCS instance (if available)
- Database instance
- Application server instances
- SCS instance
- ERS instance for the SCS instance (if available)
- Database instance
- Additional application server instances (if available)
- Primary application server instance
- ASCS instance (if available)
- SCS instance
- ERS instance for the ASCS instance (if available)
- ERS instance for the SCS instance (if available)
- Database instance
Starting Order
- Database instance
- ERS instance for the ASCS instance (if available)
- ASCS instance (if available)
- Primary application server instance
- Additional application server instances (if available)
- Database instance
- ERS instance for the SCS instance (if available)
- SCS instance
- Application server instances
- Database instance
- ERS instance for the SCS instance (if available)
- ERS instance for the ASCS instance (if available)
- SCS instance
- ASCS instance (if available)
- Primary application server instance
- 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
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
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
MDM Notes
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
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
Friday, 26 August 2011
Wednesday, 24 August 2011
Register SAP Java system in Solution Manager (SLD)
Log into NetWeaver Administrator http://<host>:<port>/nwa
Navigate to Configuration Management -> Security -> Destinations
Create 2 (*) new destinations which point to the Solution Manager system:
SLD_Client - user ID supplied must have SAP_SLD_DATA_SUPPLIER role or better
SLD_DataSupplier - user ID supplied must have SAP_SLD_GUEST role or better
Click Home to return to previous NWA screen
Navigate to Configuration Management -> Infrastructure -> SLD Data Supplier Configuration
Click on Collect and Send Data
System data will now be in the Solution Manager's SLD. Check in http://<solman host>:<solman port>/sld and navigate to Technical Systems -> Web AS Java
To ensure it's also in SMSY run 'Landscape fetch' background job.
Info from here:
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/90f7d52e-8637-2e10-5caf-950dd1a4a42c?QuickLink=index&overridelayout=true
(*) Following page suggests only the SLD_DataSupplier destination is required:
http://help.sap.com/saphelp_nw73/helpdata/en/48/b6847d96655295e10000000a42189b/content.htm
Monday, 8 August 2011
Trusted System Set-Up
Ensure the RFC connection does not have 'Trusted System' option ticket
Run transaction SMT1 in remote system
Click Create
Enter the name of the RFC connection to the central system
Enter log in details
Save new entry
Run SMT1 in the central system to create connection to the remote system and repeat steps above
Run SM59
Change RFC connection so that the 'Trusted System' option is selected
Wednesday, 3 August 2011
Thursday, 12 May 2011
SAP SRM Catalogues HTTP HTTPS Switch
The inbound and outbound handlers needs to be bypassed in order to make the switch successful:
Run SPRO
Go to Supplier Relationship Management -> SRM Server -> Master Data -> Content Management -> Define External Web Services
Select the catalogue
Double click Standard Call Structure
Add the following:
Parameter = BYPASS_OUTB_HANDLER, Value = X, Type = Fixed value
Parameter = BYPASS_INB_HANDLER, Value = X, Type = Fixed value
Click Save
Updating and Repairing SLD
Note 669669 - Updating the SAP Component Repository in the SLD
For repairing the SLD refer to SAP note:
Note 1093168 - Repair of SLD CR content
Build the reference SLD using an import of data from the same model version and CR data version as the afflicted local productive SLD.
Run the CRRepair process to rebuild the sld/active SLD to a clean version of the data.
Tuesday, 1 March 2011
Testing connectivity to monitoring agent
If this fails the port is probably closed.
Thursday, 7 October 2010
Freespace in Oracle database
Wednesday, 15 September 2010
URL for web GUI
http://<server>:<port>/sap/bc/gui/sap/its/webgui/!
Tuesday, 27 July 2010
Some terminal commands
- ctl+z
- jobs
- fg %<number in brackets from 'jobs'>
- xterm -sb &
SAP GUI installation check
For previous versions of the GUI run "sapsetup.exe /check"
Thursday, 10 June 2010
Thursday, 3 June 2010
SAP PI URL
http://<server>:<port>/rwb/
To invoke Integration Tools web page from ABAP:
SXMB_IFR
Tuesday, 11 May 2010
Find the volume group for a file system
df -g <file system>
Filesystem GB blocks Free %Used Iused %Iused Mounted on
/dev/<filesystemname> 40.00 2.42 94% 541 1% /oracle/EXD
lslv <filesystem name>
VOLUME GROUP: cstdexdvg VG IDENTIFIER: 00c724b200004c000000011f1381fa92
VG STATE: active PP SIZE: 128 megabyte(s)
VG PERMISSION: read/write TOTAL PPs: 959 (122752 megabytes)
MAX LVs: 256 FREE PPs: 366 (46848 megabytes)
LVs: 6 USED PPs: 593 (75904 megabytes)
OPEN LVs: 6 QUORUM: 2 (Enabled)
TOTAL PVs: 1 VG DESCRIPTORS: 2
STALE PVs: 0 STALE PPs: 0
ACTIVE PVs: 1 AUTO ON: yes
MAX PPs per VG: 32512
MAX PPs per PV: 1016 MAX PVs: 32
LTG size (Dynamic): 256 kilobyte(s) AUTO SYNC: no
HOT SPARE: no BB POLICY: relocatable
Friday, 12 February 2010
Run transaction in another user's session
- SE37
- Enter "TH_CREATE_FOREIGN_MODE"
- Execute
- Enter the client, username and transaction code you wish to run
- Execute
Note: You must be on the same application server as the user in order for this to work.
Wednesday, 3 February 2010
Microsoft App-V Commands
- Open command prompt
- sftmime /query obj:app /short
To start a command prompt in a the same session that an application is running in:
- List applications as shown above
- sfttray.exe /exe cmd "<full application name>"
- SFTCMC.MSC
Monday, 30 November 2009
How to create a text file printer in AIX/Unix
- Create a file 'output.txt' in /dev
- Type: smit print
- Choose ‘Add a print queue’
- Choose ‘File’
- Choose ‘Other’
- Choose ‘Generic’
- Enter ‘output.txt’ as the file name
- Name the ASCII queue ‘textfile’
- Press enter
Wednesday, 18 November 2009
View computer/server shares
- net view \\<host name>
Reading the Registry through DOS
- reg /?
Friday, 13 November 2009
Cancel print jobs
- lpstat -W -o<printer name>
To cancel a job:
- cancel <spool number> <printer name>
To cancel all prints for a printer:
- qcan -X -P<printer name>
Helpful Unix links
http://homepages.ed.ac.uk/unixhelp/index.html
IBM AIX command reference library:
http://publib.boulder.ibm.com/infocenter/pseries/v5r3/topic/com.ibm.aix.doc/doc/base/commandsreference.htm
Thursday, 12 November 2009
Comprehensive PC info
- msinfo32
- (Can be found in: Accessories -> System Tools -> System Information)
Wednesday, 11 November 2009
To delete the contents of a file in VI
- When on the first line enter the command: dG
- Anywhere else in the file: :1,$d
Tuesday, 27 October 2009
To find a transport request
- Run transaction SE16
- Enter table name E070V
Definition of SAPS
In technical terms, this throughput is achieved by processing 6,000 dialog steps (screen changes), 2,000 postings per hour in the SD benchmark, or 2,400 SAP transactions.
Fully business processed in the SD Standard Application Benchmark means the full business process of an order line item: creating the order, creating a delivery note for this order, displaying the order, changing the delivery, posting a goods issue, listing orders, and creating an invoice.
(From here)
Thursday, 22 October 2009
Oracle job scheduler
- select * dba_scheduler_schedules;
- select * from dba_scheduler_jobs;
- select * from dba_scheduler_job_log;
Make the cancel print button active
- Run regedit
- Go to: HKEY_CURRENT_USER\Software\SAP\SAPlpd\SAPLPD
- Add character string "EnableCancelButton"
- Enter value '1'
See SAP note 1449136
Creating and viewing memory snapshots in SAP
- Run transaction S_MEMORY_INSPECTOR
- To create a memory snapshot, enter /hmusa into the transaction field
- Message shown in status bar:
Compare SAP config between two systems
- Run transaction SCU0
Choose SAP Refernce IMG
Click Create
Choose Select activites
Click the green tick
Choose an area and click the green tick
Note: This process uses a lot of session memory, particularly from the extended memory area whether run in foregoround or background.
Running SQL statements in SAP (Oracle and DB2)
Oracle
Free-form statements:
- SE38
- Program name RSORADJV
- Execute
- SE38
- Program name RSORAVDV
- Execute
DB2
- Run transaction ST04
- Expand Diagnostics
- Double-click SQL Command Line
Monday, 22 October 2007
SAP Issues And How To Resolve Them
BR0301E SQL error -1031 at location BrDdartRead-1
ORA-01031: insufficient privileges
See SAP note:
Note 900525 - BRCONNECT fails with ORA-01031 at location BrDdartRead-1
Essentially:
Re-run SQL file sapdba_role.sql from \usr\sap\SID\SYS\exe\run
Long running BBP/SRM job BBP_GET_STATUS_2:
See SAP note:
Note 521857 - Selection parameters for BBP_GET_STATUS/BBP_GET_STATUS_2
See SAP note:
SQLPLUS> Alter table sapr3.tablename monitoring;