Analise High load SAP HANA

Notas:

1804811 - SAP HANA Database: Kernel Profiler Trace

Solution 
Connect to your HANA database server as user sidadm (for example via putty) and start hdbcons by typing command "hdbcons".
To do a Kernel Profiler Trace of your query, please follow these steps:
    1. "profiler clear" - Resets all information to a clear state
    2. "profiler start" - Starts collecting information.
    3. Execute the affected query.
    4. "profiler stop" - Stops collecting information.
    5. "profiler print -o /path/on/disk/cpu.dot;/path/on/disk/wait.dot" - writes the collected information into two dot files which can be sent to SAP.
Attention: Specifying both a database user and an application user with SAP HANA SPS <= 10 can result in a crash. This problem is fixed as of SAP HANA SPS 11.

1732157 - Collecting diagnosis information for SAP HANA [VIDEO]

1813020 - How to generate a runtime dump on SAP HANA 

1) From the OS Level


1) Log into the linux HANA host presenting the issue as sidadm user;
2) Run command 'hdbcons';
3) On the hdbcons console run command below:
 > runtimedump dump

This will create a runtimedump for the host you logged in. The generated file will be under traces directory with naming like 'indexserver....rtedump.trc'.
4) Attach generated trace file to the OSS Message

Na prática


  1. generate a kernel profiler trace. Please refer to SAP note 1804811

  • 1. "profiler clear" - Resets all information to a clear state
  • 2. "profiler start" - Starts collecting information.
  • 3. Execute the affected query. - in the case of our problem, it is not necessary
  • 4. "profiler stop" - Stops collecting information.
  • 5. "profiler print -o /hana/shared/SID/HDB00/serverXX/trace//wait.dot" - writes the collected information into two dot files which can be sent to SAP.


2 . generate 3 runtime dumps with 2 minutes interval between each. These must be generated DURING the system hang. Please refer to 1813020.

  • cd /hana/shared/SID/HDB00/serverX/trace/      
  • exec /hana/shared/rtedump_script.sh


3. generate a full system dump as per note 1732157 during the time frame of the high cpu.
cd /usr/sap/SID/HDB00/exe/python_support/
python fullSystemInfoDump.py
cd /usr/sap/SID/SYS/global/sapcontrol/snapshots/
ls –larth
Copy the newer files on diretory


PARA executar tudo em um comando (copiar e colar na linha de comando e lembrar de alterar serverX pelo nome correto do servidor):


hdbcons "runtimedump dump" ; hdbcons  "profiler clear" ; hdbcons   "profiler start" ; hdbcons  "profiler stop" ; hdbcons   "profiler print -o /hana/shared/SID/HDB00/serverX/trace/wait.dot" ; cd /hana/shared/SID/HDB00/serverX/trace/  ; /hana/shared/rtedump_script.sh ; cd /usr/sap/SID/HDB00/exe/python_support/ ; python fullSystemInfoDump.py

Depois da execução, proceder com a coleta, compressão e envio do arquivo para a SAP.

Executar $hdbcons "runtimedump dump"
    hdbcons  "profiler clear"
hdbcons   "profiler start" hdbcons  "profiler stop" hdbcons   "profiler print -o /hana/shared/SID/HDB00/backup/wait.dot"

verificar qual thread consome mais recursos:

top -H -u sidadm
Guardar este número para procurar nos dumps

listar threads:

ps -eLf

Executar $hdbcons "runtimedump dump"
    hdbcons  "profiler clear"
hdbcons   "profiler start" hdbcons  "profiler stop" hdbcons   "profiler print -o /hana/shared/SID/HDB00/backup/wait.dot"

Dicas LVM / TIPS and Tricks LVM



Resize com LVM
- Adicionar o novo disco e criar a partição:
  # fdisk /dev/sdb (id 8e)

- visualiza todos os lvm
  # lvdisplay

- ver LVM com:
  # vgs
  # lvs
  # pvs

- Criar PV
  # pvcreate /dev/sdb1

- Criar VG
  # vgcreate vg1 /dev/sdc1

- Criar LV
  # lvcreate -L "tamanho" -n "device" vg0

- Extendendo PV
# pvresize --setphysicalvolumesize 40G /dev/sda1 
  
- Extendendo VG
  # vgextend vg0 /dev/sdb1

- extendendo LVM
  # lvextend -L 5G /dev/vg0/opt (tamanho da partição será 5gb)
  # resize2fs -p /dev/vg0/opt

- reduzindo LVM
  # e2fsck -f /dev/vg0/opt (sempre rodar FSCK antes de realizar resize)       
  # resize2fs /dev/vg0/opt 10G (margem de 10% de segurança)
  # lvreduce -L 10G /dev/vg0/opt (tamanho da partição será 10gb)

- removendo disco do VG
  # vgreduce vg0 /dev/sdb1

- extendendo PV
  # pvresize /dev/sdb

- crescer LVM em SWAP

# swapoff -a
# lvextend -L 5G /dev/vg0/swap (tamanho da partição será 5gb)
# mkswap /dev/vg0/swap
# swapon -a

SQL Oracle 1 e SAP - Dicas


--Long RAW TABLES--------------------------------------------------------------------

select
   owner c1,
   table_name c2,
   pct_free c3,
   pct_used c4,
   avg_row_len c5,
   num_rows c6,
   chain_cnt c7,
   chain_cnt/num_rows c8,
   tablespace_name c0
from dba_tables
where
owner not in ('SYS','SYSTEM')
and
table_name in
 (select table_name from dba_tab_columns
where
 data_type in ('RAW','LONG RAW','CLOB','BLOB','NCLOB')
 )
and
chain_cnt > 0
order by chain_cnt desc
;

--LONG RAW TABLES--------------------------------------------

select table_name,data_type from dba_tab_columns
where
 data_type in ('RAW','LONG RAW','CLOB','BLOB','NCLOB');



 --LONG Raw tables and tablespaces status--------------------------------------

 select table_name, tablespace_name, num_rows, cluster_owner, PCT_USED, LAST_ANALYZED, DEPENDENCIES, (BLOCKS * 8192)     from dba_tables where tablespace_name = 'TABLESPACE' order by num_rows desc;




--ORACLE JOBS PROGRESS----------------------------------------------------------

SELECT sid, to_char(start_time,'hh24:mi:ss') stime,
message,( sofar/totalwork)* 100 percent
FROM v$session_longops
WHERE sofar/totalwork < 1;

--ORACLE LONGOPS----------------------------------------------------------------

select * from v$session_longops

--Searching for a SID session---------------------------------------------------

select
*
from
   v$session
where
   sid = SID;

--Searching for a background job exhibiting some details------------------------ 

   SELECT s.inst_id,
       s.sid,
       s.serial#,
       p.spid,
       s.username,
       s.program
FROM   gv$session s
       JOIN gv$process p ON p.addr = s.paddr AND p.inst_id = s.inst_id
WHERE  s.type != 'BACKGROUND'
ORDER BY SID;

--Killing a session-------------------------------------------------------------

alter system kill session 'SID,SERIAL';



--DATAPUMP JOBS-----------------------------------------------------------------

select * from dba_datapump_jobs;

--Showing tables from a tablespace----------------------------------------------

select * from dba_tables where TABLESPACE_NAME ;

desc sys.dba_free_space

--Free space of a tablespace----------------------------------------------------

SELECT TABLESPACE_NAME,SUM(FREEMB),SUM(CONTIGUOMB)
FROM
(select tablespace_name,FILE_ID
                      , round(sum(bytes)/1024/1024,2) FreeMb
                      , round(max(bytes)/1024/1024,2) ContiguoMb
from sys.dba_free_space where tablespace_name='TABLESPACE'
group by tablespace_name,FILE_ID
having round(max(bytes)/1024/1024,2) > 70)
GROUP BY tablespace_name
ORDER BY tablespace_name;


--Free space of a tablespace----------------------------------------------------

select
   a.tablespace_name,
   a.bytes_alloc/(1024*1024) "TOTAL ALLOC (MB)",
   a.physical_bytes/(1024*1024) "TOTAL PHYS ALLOC (MB)",
   nvl(b.tot_used,0)/(1024*1024) "USED (MB)",
   (nvl(b.tot_used,0)/a.bytes_alloc)*100 "% USED"
from
   (select
      tablespace_name,
      sum(bytes) physical_bytes,
      sum(decode(autoextensible,'NO',bytes,'YES',maxbytes)) bytes_alloc
    from
      dba_data_files
    group by
      tablespace_name ) a,
   (select
      tablespace_name,
      sum(bytes) tot_used
    from
      dba_segments
    group by
      tablespace_name ) b
where
   a.tablespace_name = b.tablespace_name (+)
and
   a.tablespace_name not in
   (select distinct
       tablespace_name
    from
       dba_temp_files)
and
   a.tablespace_name not like 'UNDO%'
   AND a.tablespace_name like '%TABLESPACE%'
order by 1;

--Space of a table--------------------------------------------------------------

select segment_name,segment_type,bytes/1024/1024 MB from dba_segments where segment_type='TABLE' and segment_name='USER'.'TABLE';

--Size of a table---------------------------------------------------------------

SELECT DS.TABLESPACE_NAME, SEGMENT_NAME, ROUND(SUM(DS.BYTES) / (1024 * 1024)) AS MB
  FROM DBA_SEGMENTS DS
  WHERE SEGMENT_NAME IN (SELECT TABLE_NAME FROM DBA_TABLES) and SEGMENT_NAME like 'TABLE'
 GROUP BY DS.TABLESPACE_NAME,
       SEGMENT_NAME;
     
--Abort a Redef table job-------------------------------------------------------   

BEGIN
DBMS_REDEFINITION.ABORT_REDEF_TABLE(
   uname       => 'USER',
   orig_table  => 'Table Origem',
   int_table   => 'Tabela destino#$');
END;


--Verifica paralelismo de um indice

select degree from dba_indexes where index_name LIKE 'indice';

Links úteis SAP IQ

Links úteis SAP IQ

https://launchpad.support.sap.com/#/incident/pointer/002075129400003642812017

https://launchpad.support.sap.com/#/notes/1910965

https://help.sap.com/viewer/a893f37e84f210158511c41edb6a6367/16.0.11/en-US/a87fbd6184f2101599e284403f769f66.html

https://blogs.sap.com/2014/04/30/sap-sybase-iq-how-to-restore-your-backups-to-another-system/

http://www.rocket99.com/techref/8746.html

https://help.sap.com/saphelp_iq1608_iqbackup/helpdata/en/a6/236d0484f2101591fabb9064294f1d/frameset.htm

Troubleshooting SAP IQ e BACKUP/RESTORE

Troubleshooting IQ

Verificar situação dos discos / RAW Devices

Verificar catalogo de arquivos no IQ:  SELECT * FROM SYS.SYSDBFILE;

Verificar Header dos arquivos: iqheader


Comandos úteis:

Conectar no banco
dbisql -c "uid=dba;pwd=senha" -host localhost -port 2741 -nogui

Verificar header do backup:

db_backupheader

Procedures e SQL:

Espaço:
sp_iqdbspace

sp_iqfile

Alterar ou deletar dbfiles:

alter dbspace DBSPACE drop file "nome_arquivo"'

select Value from sp_iqstatus() where name like '%Main IQ Blocks Used%';

Backup:

backup database full to @BackupFileName

Verificar status do banco com filtro:

select Value from sp_iqstatus() where name like '%Main IQ Blocks Used%';
go



Restore do sistema:

Pré requisitos: os dbfiles do sistema devem ter o mesmo tamanho do banco original na mesma quantidade. O sistema destino deve ter a mesma versão da origem ou versão superior.

Iniciar em modo utility_db: start_iq -n utility_db -iqmc 40000 -iqtc 60000

Executar Restore:

dbisql -nogui -c "uid=DBA;pwd=senha;eng=utility_db;dbn=utility_db"

RESTORE database 'caminho_do_backup/DATABASE.db'
FROM 'arquivos_de_backup.dmp sem stripe';

Upload de nova versão de EPM no download center do BPC

Para upload de nova versão de EPM no download center do BPC:

Link: https://help.sap.com/doc/4c5f3dca0ead4cfb9105d18a1efeef24/10.0.28/en-US/EPMofc_10_install_en.pdf

Procedure
1. Do one of the following:
? If your version of SAP NetWeaver BW is prior to the SAP_BW Release 730 SP3, you must implement the
following SAP Notes: 1558149, 1553052, 1578760 and 1547050.
? If your version of SAP NetWeaver BW is 740, 750, 800, 801 or 810, you must implement the following SAP
Note: 2369339.
? If you need to install EPM add-in Support Package 27 or upper versions for the x64 edition, from the
Planning and Consolidation web client, please upgrade Planning and Consolidation accordingly. See SAP
note 2403723.
2. Log on to SAP NetWeaver and execute the RSBPCLD transaction.
3. In the Program field, enter UJ0_FILE_UPLOAD and click Execute (F8).
The Upload window opens.
4. In the Option and version section, select the type of update you want to perform depending on whether or not
the support package is mandatory.
EPM Add-in for Microsoft Office Installation Guide
Installing the EPM Add-in for Microsoft Office C U S T O M E R 19
Option Description
Force update
When updates are defined as "force update", a message pops up on your local machine, prompting you to
install the update. If you do not install the update, you will not be able to use the EPM add-in.
The version XXX of the EPM Add-in is now available. It must be installed before you can use the EPM Add-in
Auto update
When updates are defined as "auto update", a message pops up every time an update is available, prompting
you whether you want to install it now or later.
"Version xxx of the EPM Add-in is now available. Do you want to install it?
User update
When updates are defined as "user update", if you choose the Notify me when updates are
available option, a message pops up every time an update is available, prompting you whether you want
to install it now or later.
"Version xxx of the EPM Add-in is now available. Do you want to install it?
You can choose to select the Do not show this message again option.
5. In the File version field, enter the EPM Add-in version number (for example: 10.0.0.5054).
6. Select the Full Installer type.
7. In the Upload section, click Browse to select the EPM Add-in.exe file and then click Upload.
The Enter Transport Request dialog box opens.
8. Click the New icon.
The Select Request Type dialog box opens.
9. Select Customizing Request and validate.
The Create Request dialog box opens.
20 C U S T O M E R
EPM Add-in for Microsoft Office Installation Guide
Installing the EPM Add-in for Microsoft Office
10. Enter a short description text and click the Save icon.
11. In the Enter Transport Request dialog box, click the Validate icon.
12. Once the transport has been created, open the Transport Management System.
13. In the Import Queue of your system, select the transport you created and click Import.
Next Steps
To perform an upgrade of the EPM add-in on the server, follow the same procedure


Para verificar versões disponíveis :

SE16 -> RSBPC0_AUTO_UPDT ou UJ0_AUTO_UPDATE


Ver link: https://wiki.scn.sap.com/wiki/display/CPM/Understanding+the+UJ0_FILE_UPLOAD+Options+for+EPM+Add-in+Client+For+BPC+10+NW

Carga entre SAP BW e SAP ERP com IDOCS parados na SM58

A carga entre SAP BW e SAP ERP com IDOCS parados na SM58

Sintomas :

IDOCs ficam parados na SM58 e não chegam no BW.

O QOUT fica em status Waiting.

Execução LUW faz IDOC chegar no BW.

Solução:

Procurar por processos bloqueando a execução tRFC e qRFC, normalmente processos com longo tempo de duração na sm66/sm50

Material para consulta:

https://wiki.scn.sap.com/wiki/display/ABAPConn/Outbound+Scheduler+%28SMQS%29+remains+in+status+WAITING

.

Alterar número de processos na SUM após inicio do Update/Upgrade

Como alterar número de processos na SUM após inicio do Update/Upgrade:

Acessar a url  http://servidor_sap:1128/lmsl/sumabap/PHM/set/procpar  e alterar o número de processos.

DICA - ERROR: Tipo de IDOC XXXXXXX do BW diferente do tipo de IDOC do sistema fonte.


Source system no BW, ao checar aparece o erro:

BW desconhecido sistema fonte

ou

tipo de IDOC XXXXXXX do BW diferente do tipo de IDOC do sistema fonte.


Soluções possíveis:

verificar RFCs, usuários e permissões;

Verificar se entradas das tabelas EDIPORT e EDIPOA estão iguais - nota SAP 110849

Verificar intervalo de numeração de portas disponiveis na transação snum - nota 110849
--------------------------------------------------------------------------------------------------------------------------

Nota 110849:

Symptom
"Error during insert in port table" during creation of source system.

Other Terms
SourceSystem, porttable

Reason and Prerequisites
You get the error message "Error during insert in port table (E0 552)" during creation of a source system. "Please enter a valid receiver port" E0420

Solution
Take a look at table EDIPORT of your BW system and note the next free number for the field "Port". This is the adjacent number of the highest entry like 'A0000000123' for example. In this case e.g. take '124'.
Choose transaction "snum" and object "ediport".
Select "number ranges" from the menu "Goto" and here the button "status".
Change the CURRENT NUMBER of the ranges to the next free number you noted from table EDIPORT.

If the number range of your BW system is correct please check the same in your OLTP system.

Check inconsistency (port) between tables EDIPOA and EDIPORT.
If affected port is only exists in EDIPOA table, delete the entry from EDIPOA.

Also reset the buffering for all servers on system via transaction /$tab

Transactions for SAP ERP administration

Programming and Debugging

Transaction
Description
  SE80 Abap Development WorkBench
*SE38 Abap Editor. Shows source code, attributes, documentation, variants and text elements.
*SE37 Manage Function modules. It can create, display or edit them.
*SE24 Manage Classes. It can create, display or edit them.
*SE11 ABAP Dictionary.
ST22 Abap Runtime Error. You can filter by a lot of parameters.
ST11 Developer traces. Shows error log files, contain error files from each Dialog.
SU53 Permissions Issue Solver
ST01 System Trace (authorization checks). Used by programmers to find errors in authorizations.
SM30 Show Tables
SE16 Maintain Tables
SE16N Maintain Tables (stronger).
SE18 BADI Builder
SICF  WebDynpro Access. Shows the graphical screens.
SE51   Screen Painter (Creates WebDynpro screens)             

System Maintenance

Transaction
Description
SM50 Shows process overview of the SAP system, including Dialogs, Spoolers, background jobs and update jobs.
SM66 Global Work Process Overview
SM51 Show all SAP Servers in the Landscape.
SLG1 Analyzes logs from the System. It has filters like: user, transaction and program that triggered the log.
RZ20 System Monitoring. You can monitore a lot of events on the system. This transaction can run for others systems.
RZ70 System Landscape Directory: Administration
-- --
SP02 Show global spool request list.
SM37 View System_Wide Jobs
AL08 List of users logged in on the server. It shows users logged on into each client.
SM04 List logged in users. Better view.
SU01 User Maintenance.
SU3 Maintain User Profile (normally you don't have authorization with SU01).
SU01D Display User (normally you don't have authorization with SU01).
PFCG Role Maintenance.
SM13 Shows Update Requests. Also, show who and when it was requested.
SM59 Config RFC connections
SM12 Lock Tables
SM21 System Log
AL11 SAP Explorer. Show directory structures from the SAP system and permits you to display files.
SE95 Modification Browser: Shows which notes were applied, BADis activated and objects modified. Very good T-code.
-- --
SNOTE Note Assistant. Transaction that shows implemented notes, notes to be implemented and other details regarding SAP notes.
SMSY SAP Solution Manager (doesn't contain per default).
SPAM Support Package Manager (upgrades)
SAINT Add-on Installation Tool
SBWP Business Workplace
--  --
SE09 Transport Organizer
SE10 Transport Organizer
SE01 Transport Organizer (Extended View)
STMS Transport Management System
SWDD Workflow builder. Let's you check and customize the workflows visually.


User Specific

Transaction
Description
SUIM User Information System. Shows details about the user and its roles.
SM36 Define Background Job
SMX View own jobs
/O Show Opened Sessions
/N Goto Sap Easy Access

Background Processing

Transaction
Description
RZ01 Job Scheduling Monitor
RZ04 CCMS: Maintain Operation Modes/Instance
SM36 Define Background Job
SM37 Simple Job Selection
SM37C Extended Job Selection
SM49 External Operating System Commands
SM61 Bacground Controller List
SM62 Event History
SM64 Background Events
SM65 Analysis Tool - Background Processing
SM69 External Operating System Commands
SMX Job Overview

Documentation

Transaction
Description
SE81 Application Hierarchy. Shows all the abbreviations for all of the components. On double-click, opens the package on the SE80.
ABAPDOCU Abap Documentation and Examples. The examples are very intuitive.
SEARCH_SAP_MENU Search by text for items in the SAP Menu.
SEARCH_USER_MENU Search by text for items in the User Menu.

Error Current imported l_th_trkorr_import_all has 2 (lines) in TP command Fatal error: Import all mismatch



Transport 

Post-import methods for change/transport request: xxxxxxxxxxxxx

Post-import method RS_AFTER_IMPORT started for TRFN L, date and time: xxxxxxxxxxx
Invalid objects: 'After Import' terminated (see long text)

Error Current imported l_th_trkorr_import_all has 2 (lines) in TP command Fatal error: Import all mismatch

Error xxxxxxxxxxxxxxxx (0008) in TP command Returncode of trkorr trkorr_no_1
Errors occurred during post-handling RS_AFTER_IMPORT for TRFN L
The errors affect the following components:
   BW-WHM-MTD (Metadata (Repository))
Post-import methods of change/transport request xxxxxxxxx completed

Error Current imported l_th_trkorr_import_all has 2 (lines) in TP command Fatal error: Import all mismatch
.
.
.
ended with return code:  ===> 12 <===


Solution:

In program
SAP_RSADMIN_MAINTAIN
Include:
OBJECT = RSVERS_BI_IMPORT_ALL
VALUE  = <SPACE>

Notes:

SAP HANA Network Ports

SAP HANA Network Ports:

SQL for client access: 3<instance>15
XSEngine: 80<instance>/43<instance>
System Admin Access: 5<instance>13 / 5<instance>14 ( SSL )
SUM ( HTTP/HTTPS ): 8080/8443
Internal/SAP protocol: 3<instance>00 / 3<instance>01 / 3<instance>02 / 3<instance>03 / 3<instance>05 / 3<instance>07

SAMPLE QUESTIONS C_TADM51_ - 1

 *Based on the sample questions provided by SAP


1- Update work processes are categorized as V1 or V2.   Mark  for correct entrie(s) Which of the 2 types of Update work processes has priority?

A. V1 and V2 work processes are handled simultaneously without priority.
B. V1 and V2 work processes are handled on a first-in-first-out basis.
C. Processing priority is determined by the rdisp/wp_no_vb profile parameter.
D. V1 work processes have priority.
E. V2 work processes have priority.

2 - How can you change a profile parameter for an AS ABAP-based SAP system?  
Note: There are 2 correct answers to this question.  

A. Using transaction RZ11 (Maintain Profile Parameters) 
B.  Using the ABAP Config Tool
C.  Using transaction RZ10 (Edit Profiles) 
D.  Using transaction RZ03 (CCMS Control Panel)

3 - Which applications/solutions are part of SAP Business Suite?  
Note: There are 3 correct answers to this question.  
A. SAP SOA 
B. SAP ERP 
C. SAP Business One 
D. SAP CRM 
E. SAP SRM

4 - You have changed the password of the administrative user of an AS Java- based SAP system. 
Is there any additional recommended task related to this password change?  Please choose the correct answer.
A.  Yes – changing the respective database entry by using the Config Tool is recommended.
B.  Yes – changing the secure store content by using the Config Tool is recommended.
C.  No – changing the administrator’s password is sufficient.
D.  Yes – changing the secure store content by using the command line „icmon -a“ is recommended.



Leave your responses in the comments for the correction!

Error on R3trans: ORA-01017: invalid username/password; logon denied

 

Este problema ocorre por conta da senha armazenada na tabela DBCO e a senha do usuário SAPSR3 ( ou outro esquema ), no banco.
Na maioria das vezes a senha para este usuário na DBCO está setada para "sap" ou "SAP".
Neste caso deve-se alterar com o comando brconnect no banco ( nunca alterar via sqlplus ou outra ferramenta que não seja da SAP.Por questões de segurança, sistemas produtivos tevem ter esta senha diferente do "padrão". Exemplo:

brconnect -u system/sap -f chpass -o SAPSR3 -p SAP

Após este ajuste, testar com R3trans:

$>R3trans -d

This is R3trans version 6.22 (release 720 - 26.10.11 - 13:00:00). R3trans finished (0000).


Enable or reset SAP* (SAP Star) logon with default password PASS

Letus assume all the ids in your SAP system are locked or noone remembers their passwords. So how are you going to login to the system to unlock users or reset passwords. SAP has created a default user id SAP* (SAP Star) for this purpose. The default password for this id is PASS

However, SAP* logon is enabled by default. You would need to add following profile paramter to the instance profile at /usr/sap/<SID>/SYS/profile/<SID>_DVEBMGS<instance>_<host>
 login/no_automatic_user_sapstar = 0
You would need to restart for this to take into effect. Then you would be able to login with SAP* and with password PASS provided there is no entry for SAP* user in usr02 table for that client.
If you still can't login after doing above steps it means there is an entry in usr02 table for  user SAP* for that particular client. You would need to delete this entry at the dabase level then you would be able to login with SAP* user and default password PASS
Below are the steps to delete the SAP* user from usr02 table for a DB2 database. It would be similar steps and concept for other databases too.
1. Login to your database server as the user db2<sid>
2. Issue below statment to delete SAP* user from usr02 table. Please note that here sapr3 is the default schema, it might be different in you system. And 000 is the client for which we want to reset SAP* (star) password.
  db2 "delete from sapr3.usr02 where bname='SAP*' and mandt='000'"
You would now be able login with sap* user id with the default password. 
This procedure is also useful when you are not able to login with regular ids after system copy/refresh because of expired SAP license. You will be able login with SAP* id even if when the license is expired then you can isntall the correct licence with SAP* id.
Some times, is mandatory  restart the system to complete the procedure.

Erro: "WSATYPE_NOT_FOUND: The specified class was not found"


Erro: "WSATYPE_NOT_FOUND: The specified class was not found"

Situação: O erro "Erro: WSATYPE_NOT_FOUND: The specified class was not found" foi apresentado
no momento em que é realizado o login em qualquer ambiente do SAP.
Correção: Para corrigirmos esse erro devemos:
- editar o arquivo "services": C:\WINDOWS\system32\drivers\etc
- inserir no final desse arquivo as seguintes portas:

# SAPGUI
sapdp00  3200/tcp
sapdp01  3201/tcp
sapdp02  3202/tcp
sapdp03  3203/tcp
sapdp04  3204/tcp
sapdp05  3205/tcp
sapdp06  3206/tcp
sapdp07  3207/tcp
sapdp08  3208/tcp
sapdp09  3209/tcp
sapdp10  3210/tcp
sapdp11  3211/tcp
sapdp12  3212/tcp
sapdp13  3213/tcp
sapdp14  3214/tcp
sapdp15  3215/tcp
sapdp16  3216/tcp
sapdp17  3217/tcp
sapdp18  3218/tcp
sapdp19  3219/tcp
sapdp20  3220/tcp
sapdp21  3221/tcp
sapdp22  3222/tcp
sapdp23  3223/tcp
sapdp24  3224/tcp
sapdp25  3225/tcp
sapdp26  3226/tcp
sapdp27  3227/tcp
sapdp28  3228/tcp
sapdp29  3229/tcp
sapdp30  3230/tcp
sapdp31  3231/tcp
sapdp32  3232/tcp
sapdp33  3233/tcp
sapdp34  3234/tcp
sapdp35  3235/tcp
sapdp36  3236/tcp
sapdp37  3237/tcp
sapdp38  3238/tcp
sapdp39  3239/tcp
sapdp40  3240/tcp
sapdp41  3241/tcp
sapdp42  3242/tcp
sapdp43  3243/tcp
sapdp44  3244/tcp
sapdp45  3245/tcp
sapdp46  3246/tcp
sapdp47  3247/tcp
sapdp48  3248/tcp
sapdp49  3249/tcp
sapdp50  3250/tcp
sapdp51  3251/tcp
sapdp52  3252/tcp
sapdp53  3253/tcp
sapdp54  3254/tcp
sapdp55  3255/tcp
sapdp56  3256/tcp
sapdp57  3257/tcp
sapdp58  3258/tcp
sapdp59  3259/tcp
sapdp60  3260/tcp
sapdp61  3261/tcp
sapdp62  3262/tcp
sapdp63  3263/tcp
sapdp64  3264/tcp
sapdp65  3265/tcp
sapdp66  3266/tcp
sapdp67  3267/tcp
sapdp68  3268/tcp
sapdp69  3269/tcp
sapdp70  3270/tcp
sapdp71  3271/tcp
sapdp72  3272/tcp
sapdp73  3273/tcp
sapdp74  3274/tcp
sapdp75  3275/tcp
sapdp76  3276/tcp
sapdp77  3277/tcp
sapdp78  3278/tcp
sapdp79  3279/tcp
sapdp80  3280/tcp
sapdp81  3281/tcp
sapdp82  3282/tcp
sapdp83  3283/tcp
sapdp84  3284/tcp
sapdp85  3285/tcp
sapdp86  3286/tcp
sapdp87  3287/tcp
sapdp88  3288/tcp
sapdp89  3289/tcp
sapdp90  3290/tcp
sapdp91  3291/tcp
sapdp92  3292/tcp
sapdp93  3293/tcp
sapdp94  3294/tcp
sapdp95  3295/tcp
sapdp96  3296/tcp
sapdp97  3297/tcp
sapdp98  3298/tcp
sapdp99  3299/tcp
sapgw00  3300/tcp
sapgw01  3301/tcp
sapgw02  3302/tcp
sapgw03  3303/tcp
sapgw04  3304/tcp
sapgw05  3305/tcp
sapgw06  3306/tcp
sapgw07  3307/tcp
sapgw08  3308/tcp
sapgw09  3309/tcp
sapgw10  3310/tcp
sapgw11  3311/tcp
sapgw12  3312/tcp
sapgw13  3313/tcp
sapgw14  3314/tcp
sapgw15  3315/tcp
sapgw16  3316/tcp
sapgw17  3317/tcp
sapgw18  3318/tcp
sapgw19  3319/tcp
sapgw20  3320/tcp
sapgw21  3321/tcp
sapgw22  3322/tcp
sapgw23  3323/tcp
sapgw24  3324/tcp
sapgw25  3325/tcp
sapgw26  3326/tcp
sapgw27  3327/tcp
sapgw28  3328/tcp
sapgw29  3329/tcp
sapgw30  3330/tcp
sapgw31  3331/tcp
sapgw32  3332/tcp
sapgw33  3333/tcp
sapgw34  3334/tcp
sapgw35  3335/tcp
sapgw36  3336/tcp
sapgw37  3337/tcp
sapgw38  3338/tcp
sapgw39  3339/tcp
sapgw40  3340/tcp
sapgw41  3341/tcp
sapgw42  3342/tcp
sapgw43  3343/tcp
sapgw44  3344/tcp
sapgw45  3345/tcp
sapgw46  3346/tcp
sapgw47  3347/tcp
sapgw48  3348/tcp
sapgw49  3349/tcp
sapgw50  3350/tcp
sapgw51  3351/tcp
sapgw52  3352/tcp
sapgw53  3353/tcp
sapgw54  3354/tcp
sapgw55  3355/tcp
sapgw56  3356/tcp
sapgw57  3357/tcp
sapgw58  3358/tcp
sapgw59  3359/tcp
sapgw60  3360/tcp
sapgw61  3361/tcp
sapgw62  3362/tcp
sapgw63  3363/tcp
sapgw64  3364/tcp
sapgw65  3365/tcp
sapgw66  3366/tcp
sapgw67  3367/tcp
sapgw68  3368/tcp
sapgw69  3369/tcp
sapgw70  3370/tcp
sapgw71  3371/tcp
sapgw72  3372/tcp
sapgw73  3373/tcp
sapgw74  3374/tcp
sapgw75  3375/tcp
sapgw76  3376/tcp
sapgw77  3377/tcp
sapgw78  3378/tcp
sapgw79  3379/tcp
sapgw80  3380/tcp
sapgw81  3381/tcp
sapgw82  3382/tcp
sapgw83  3383/tcp
sapgw84  3384/tcp
sapgw85  3385/tcp
sapgw86  3386/tcp
sapgw87  3387/tcp
sapgw88  3388/tcp
sapgw89  3389/tcp
sapgw90  3390/tcp
sapgw91  3391/tcp
sapgw92  3392/tcp
sapgw93  3393/tcp
sapgw94  3394/tcp
sapgw95  3395/tcp
sapgw96  3396/tcp
sapgw97  3397/tcp
sapgw98  3398/tcp
sapgw99  3399/tcp
- Salve o arquivo e reinicie o SAPGUI.

Alterando a variavel LANG no shell dos usuários


Alterando a variavel LANG no shell dos usuários



Essa alteração é necessária quando temos problemas com caracteres invalidos em aplicações

Alterar o arquivo /etc/sysconfig/i18n
localizar a linha LANG="en_US.UTF8"
alterar para LANG="en_US"

Erro ORA-01119 ORA-27054 ORA-01111 ORA-01110 ORA-01157 no dataguard


Erro no alert.log do Oracle dataguard  (spare):
Existing file may be overwritten
File #1401 added to control file as 'UNNAMED01401'.
Originally created as:
'/oracle/SID/sapdata64/btabd_587/btabd.data587'
Recovery was unable to create the file as:
'/oracle/SID/sapdata64/btabd_587/btabd.data587'
Errors with log /oracle/SID/saparch/SIDarch1_267599_761383197.dbf
MRP0: Background Media Recovery terminated with error 1119
Wed Dec  5 17:45:04 2012
Errors in file /oracle/SID/saptrace/background/SID_mrp0_29567.trc:
ORA-01119: error in creating database file '/oracle/SID/sapdata64/btabd_587/btabd.data587'
ORA-27054: NFS file system where the file is created or resides is not mounted with correct options
Linux-x86_64 Error: 13: Permission denied
Some recovered datafiles maybe left media fuzzy
Media recovery may continue but open resetlogs may fail
Wed Dec  5 17:45:04 2012
Errors in file /oracle/SID/saptrace/background/SID_mrp0_29567.trc:
ORA-01119: error in creating database file '/oracle/SID/sapdata64/btabd_587/btabd.data587'
ORA-27054: NFS file system where the file is created or resides is not mounted with correct options
Linux-x86_64 Error: 13: Permission denied
Wed Dec  5 17:45:04 2012
MRP0: Background Media Recovery process shutdown (SID)
Wed Dec  5 17:48:56 2012
RFS[1]: Archived Log: '/oracle/SID/saparch/SIDarch1_267600_761383197.dbf'
A causa do erro era permissão no diretório /oracle/SID/sapdata64, que estava root:root. Ao criar o novo datafile btabd.data587 no server origem, este não foi replicado na server, travando o dataguard.
A permissão do diretório foi corrigido (oraSID:dba) e o Oracle na server reiniciado:
SQL> shutdown immediate;
SQL> startup nomount;
SQL> alter database mount standby database;
SQL> alter database recover managed standby database disconnect;
Porém o erro persistiu, o dataguard não criou o arquivo automaticamente:
MRP0: Background Managed Standby Recovery process started (SID)
Managed Standby Recovery not using Real Time Apply
MRP0: Background Media Recovery terminated with error 1111
Thu Dec  6 11:33:45 2012
Errors in file /oracle/SID/saptrace/background/SID_mrp0_30181.trc:
ORA-01111: name for data file 1401 is unknown - rename to correct file
ORA-01110: data file 1401: '/oracle/SID/102_64/dbs/UNNAMED01401'
ORA-01157: cannot identify/lock data file 1401 - see DBWR trace file
ORA-01111: name for data file 1401 is unknown - rename to correct file
ORA-01110: data file 1401: '/oracle/SID/102_64/dbs/UNNAMED01401'
Thu Dec  6 11:33:45 2012
Errors in file /oracle/SID/saptrace/background/SID_mrp0_30181.trc:
ORA-01111: name for data file 1401 is unknown - rename to correct file
ORA-01110: data file 1401: '/oracle/SID/102_64/dbs/UNNAMED01401'
ORA-01157: cannot identify/lock data file 1401 - see DBWR trace file
ORA-01111: name for data file 1401 is unknown - rename to correct file
ORA-01110: data file 1401: '/oracle/SID/102_64/dbs/UNNAMED01401'
Thu Dec  6 11:33:45 2012
MRP0: Background Media Recovery process shutdown (SID)
Thu Dec  6 11:33:45 2012
O arquivo teve que ser criado manualmente na Server. Primeiro foi criado o seu diretório:
 server:oraSID 105> mkdir /oracle/SID/sapdata64/btabd_587

Modo recovery desativado:
SQL> recover managed standby database cancel;
ORA-16136: Managed Standby Recovery not active

Gerenciamento dos arquivos setado para ser executado manualmente:
SQL> alter system set standby_file_management=manual;
System altered.
Datafile criado:
alter database create datafile '/oracle/SID/102_64/dbs/UNNAMED01401' as '/oracle/SID/sapdata64/btabd_587/btabd.data587';

O nome do arquivo determinado no alert.log:
ORA-01110: data file 1401: '/oracle/SID/102_64/dbs/UNNAMED01401'
ORA-01157: cannot identify/lock data file 1401 - see DBWR trace file
ORA-01111: name for data file 1401 is unknown - rename to correct file
Reativando o dataguard:
SQL> alter system set standby_file_management=auto;
System altered.

SQL> alter database recover managed standby database disconnect;
Database altered.