IMP-00058: ORACLE error 1017 encountered

Oracle

Problema
IMP-00058: ORACLE error 1017 encountered

Solução
- Verifique a senha do usuário utilizado no comando imp.


BRTOOLS - BR0253E errno 13: Permission denied


Referência
583861-Unix-Errors due to Oracle Executable
97953 - UNIX-Relinking of the Oracle executables
113747 - Permissions dba tools and sapdba
134592 - Importing the SAPDBA role

Problema 1
- Na db13.
Job started
Step 001 started (program RSDBAJOB, variant &0000000000183, user ID DENISGOMES)
Execute logical command BRCONNECT On host unbru10
Parameters: -u / -jid CLNUP20111027162839 -c -f cleanup
BR0801I BRCONNECT 7.00 (32)
BR0252E Function fopen() failed for '/oracle/TSA/102_64/dbs/initTSA.sap' at location BrInitSapRead-1
BR0253E errno 2: No such file or directory
BR0159E Error reading BR*Tools profile /oracle/TSA/102_64/dbs/initTSA.sap

BR0806I End of BRCONNECT processing: cehbzqhk.log2011-10-27 16.28.40
BR0280I BRCONNECT time stamp: 2011-10-27 16.28.40
BR0804I BRCONNECT terminated with errors
External program terminated with exit code 3
BRCONNECT returned error status E
Job finished

Solução 1
- Entre no diretório $ORACLE_HOME/dbs. Verifique se o arquivo init<SID>.sap existe, senão existir, verifique se existe com outro SID e altere o SID para o corrente.

Problema 2
- Na db13
Job started
Step 001 started (program RSDBAJOB, variant &0000000000184, user ID DENISGOMES)
Execute logical command BRCONNECT On host unbru10
Parameters: -u / -jid CLNUP20111027163102 -c -f cleanup
BR0801I BRCONNECT 7.00 (32)
BR0805I Start of BRCONNECT processing: cehbzqmw.cln 2011-10-27 16.31.02
BR0252E Function fopen() failed for '/oracle/TSA/sapcheck/cehbzqmw.cln' at location main-11
BR0253E errno 13: Permission denied
BR0121E Processing of log file /oracle/TSA/sapcheck/cehbzqmw.cln failed

BR0806I End of BRCONNECT processing: cehbzqmw.cln2011-10-27 16.31.03
BR0280I BRCONNECT time stamp: 2011-10-27 16.31.03
BR0804I BRCONNECT terminated with errors
External program terminated with exit code 3
BRCONNECT returned error status E
Job finished

Problema 3
01.05.2013      21:00:16         BR0806I End of BRCONNECT processing: celckhfc.log2013-05-01 21.00.16
01.05.2013      21:00:16         BR0280I BRCONNECT time stamp: 2013-05-01 21.00.16
01.05.2013      21:00:16         BR0804I BRCONNECT terminated with errors
01.05.2013      21:00:16         External program terminated with exit code 3
01.05.2013      21:00:16         Internal session terminated with a runtime error (see ST22)
01.05.2013      21:00:16         Job cancelled


Solução 2
- No diretorio /sapmnt/<SID>/exe.

Formato:

chmod 4775 brarchive brbackup brconnect
chown ora<sid>:sapsys brarchive brbackup brconnect

chmod 755 brrestore brrecover brspace brtools
chown <sid>adm:sapsys brrestore brrecover brspace brtools


Exemplo:

chown oratsa:sapsys brarchive brbackup brconnect

chmod 755 brrestore brrecover brspace brtools

chown tsaadm:sapsys brrestore brrecover brspace brtools 

Bundle Script Log Files - INCOMPLETE

SAP

Problema
* Found the following unexpected errors:

catbundle_SBP_TST_APPLY_2013Nov27_13_12_29.log:2732: PLS-00201
catbundle_SBP_TST_APPLY_2013Nov27_13_12_29.log:2738: PLS-00302
catbundle_SBP_TST_APPLY_2013Nov27_13_12_29.log:2744: PLS-00302
catbundle_SBP_TST_APPLY_2013Nov27_13_12_29.log:63955: PLS-00302

***** Patch 17303664 (CBO Merge Patch), added in SBP 11.2.0.3.7 201309

* Post-processing complete.

***** Overall Status

Bundle Script Log Files                            INCOMPLETE
Patch 14524234                                     COMPLETE
Patch 17303664 (CBO Merge Patch)                   COMPLETE


Oracle

Referencia

Solução

- Execute o script utlrp.sql.
- Entre no diretorio /oracle/<SID>/112_64/rdbms/admin.

SQL> @?/rdbms/admin/utlrp.sql


- Resultado
######################################################################
#  The following PL/SQL blocks checks completeness of the SAP        #
#  Bundle Patch installation.  In particular, it checks the log      #
#  files generated by the bundle scripts for errors.                 #
#                                                                    #
#  If this block fails, you must check the following log files       #
#  under directory $ORACLE_BASE/cfgtoollogs/catbundle manually       #
#  for errors:                                                       #
#                                                                    #
#    catbundle_PSU_TST_GENERATE_2013Nov27_13_46_58.log               #
#    catbundle_PSU_TST_APPLY_2013Nov27_13_46_59.log                  #
#    catbundle_SBP_TST_GENERATE_2013Nov27_13_47_00.log               #
#    catbundle_SBP_TST_APPLY_2013Nov27_13_47_01.log                  #
######################################################################

***** Verifying bundle log files

* No unexpected errors found.

***** Patch 14524234, added in SBP 11.2.0.3.3 201209

*** NO INVALID OBJECTS FOUND ***

*** END RECOMPILING OBJECTS ***


***** Patch 17303664 (CBO Merge Patch), added in SBP 11.2.0.3.7 201309

* Post-processing complete.

***** Overall Status

Bundle Log Files                                   COMPLETE
Patch 14524234                                     COMPLETE
Patch 17303664 (CBO Merge Patch)                   COMPLETE

######################################################################
#  The above report is available in the following log file under     #
#  directory $ORACLE_BASE/cfgtoollogs/catbundle:                     #
#                                                                    #
#    SBP_112037_201309_TST_2013Nov27_13_46_57.log                    #

######################################################################

Brspace-f tscreate - Options

Listando tablespaces, tamanho total, espaço livre

Oracle
Referencia
http://psoug.org/snippet/TABLESPACE--List-tablespaces-files-allocated-and-free-space_852.htm

Script
SELECT df.tablespace_name TABLESPACE, df.total_space TOTAL_SPACE,
fs.free_space FREE_SPACE, df.total_space_mb TOTAL_SPACE_MB,
(df.total_space_mb - fs.free_space_mb) USED_SPACE_MB,
fs.free_space_mb FREE_SPACE_MB,
ROUND(100 * (fs.free_space / df.total_space),2) PCT_FREE
FROM (SELECT tablespace_name, SUM(bytes) TOTAL_SPACE,
      ROUND(SUM(bytes) / 1048576) TOTAL_SPACE_MB
      FROM dba_data_files
      GROUP BY tablespace_name) df,
     (SELECT tablespace_name, SUM(bytes) FREE_SPACE,
       ROUND(SUM(bytes) / 1048576) FREE_SPACE_MB
       FROM dba_free_space
       GROUP BY tablespace_name) fs
WHERE df.tablespace_name = fs.tablespace_name(+)
ORDER BY fs.tablespace_name;

Checking swap space: 0 MB available, 150 MB required. Failed

Oracle


Checking swap space: 0 MB available, 150 MB required. Failed <<<<

I checked the tmp file system space and the swap from Aix, there any
problem with it.

maqtst@root:/oracle/TST:>swap -l
device maj,min total free
/dev/paging03 10, 6 4096MB 4049MB
//paging02 10, 5 4096MB 4054MB
/dev/paging01 10, 4 4096MB 4054MB
/dev/paging00 10, 3 4096MB 4054MB
/dev/hd6 10, 2 4096MB 4055MB

maqtst@root:/oracle/TST:>df -g /tmp
Filesystem GB blocks Free %Used Iused %Iused Mounted on
/dev/hd3 9.00 1.47 84% 2068 1% /tmp


Solução
./runInstaller -ignoreSysPrereqs

Oracle 11.2.0: Database Parameter Settings

DB13 não exibe logs do arquivo alert log

Oracle
Problema
- Após migação do Oracle 10g para o Oracle 11g, a transação DB13 não exibie os logs do arquivo alert.log.

Solução
- Na postagem EXCEPTION CX_DBA_ADBC, CX_SQL_EXCEPTION - ORA-00942 indiquei um script para correção de um erro ao tentar ler o arquivo alert.log.
- Para resolver o problema acima, basta obter o mesmo script, alterando apenas a linha abaixo,
create directory ext_dir_dbac_alert as '/oracle/TMP/saptrace/background';
para,
create directory ext_dir_dbac_alert as '/oracle/TMP/saptrace/diag/rdbms/tmp/TMP/trace/alert_TMP.log';


SAP






Lembrando:
- Altere o valor TMP para o SID do seu sistema.






Alterando um datafile para autoextend on

Modelo
alter database tempfile '/path/datafile_name' autoextend on next valueM maxsize sizeM'

onde,
 path: Caminho do datafile
 datafile_name: Nome do datafile
 value: Valor que será acrecido quando um datafile precisa de espaço
 size: Tamanho máximo de crescimento


Exemplo
alter database tempfile '/oracle/TST/sapdata1/temp_1/temp.data1' autoextend on next 10M maxsize 10000M'

ORA-01652: unable to extend temp segment by 128 in tablespace PSAPTEMP

Oracle




Problema
BR0301E SQL error -1652 in thread 3 at location tab_onl_reorg-26, SQL statement:
'CREATE UNIQUE INDEX "SAPR3"."MLCRP~0#$" ON "SAPR3"."MLCRP#$" ("MANDT", "BELNR", "KJAHR", "POSNR", "BDATJ", "POPER", "CURTP")
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
  STORAGE(INITIAL 16384 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "PSAPBTABI" '
ORA-01652: unable to extend temp segment by 128 in tablespace PSAPTEMP




Solução

- Faça um extend na PSAPTEMP e altere os datafiles para auto extend.

Exibindo espaço usado por datafile

ORA-20002: Version of statistics table is too old

Problema 
BR0280I BRSPACE thread 2: time stamp: 2013-11-21 12.12.07
BR0301W SQL error -20002 in thread 2 at location tab_onl_reorg-12, SQL statement:
'BEGIN DBMS_STATS.EXPORT_TABLE_STATS (OWNNAME => '"SAPR3"', TABNAME => '"WWWDATA"', STATTAB => '"STATTAB"', STATID => '"20131121114343-81481"', CASCADE => TRUE, STATOWN => '"SYSTEM"'); END;'
ORA-20002: Version of statistics table SYSTEM.STATTAB is too old.  Please try upgrading it with dbms_stats.upgrade_stat_table
ORA-06512: at "SYS.DBMS_STATS", line 11229
ORA-06512: at "SYS.DBMS_STATS", line 12429
ORA-06512: at line 1

BR0280I BRSPACE thread 1: time stamp: 2013-11-21 12.12.11

Solução
- No sqlplus, execute:

exec DBMS_STATS.UPGRADE_STAT_TABLE('SYSTEM','STATTAB');

No Server Parameter File (SPFILE) created

Problema
**********************************************************************
SAP-Specific Pre-Upgrade Warnings
**********************************************************************
WARNING: ----> No Server Parameter File (SPFILE) created.
               Recommendation: Configure a Server Parameter File.
               See SAP note 601157.

Solução
601157 - Oracle9i: Server Parameter File


Reorganization of tables with BRSPACE

Creating OPS$ users on Unix

R3trans - Error 2EETW169 - Listener

Problema
maqtst:tstadm 1> R3trans -x
This is R3trans version 6.24 (release 720 - 14.03.13 - 20:13:02 ).
sizeof(Selection_t) = 336
2EETW169 no connect possible: "DBMS = ORACLE                           --- dbs_ora_tnsname = 'TST'"
R3trans finished (0012).

Analise

maqtst:oratst 2> lsnrctl status

LSNRCTL for IBM/AIX RISC System/6000: Version 11.2.0.3.0 - Production on 14-NOV-2013 08:29:27

Copyright (c) 1991, 2011, Oracle.  All rights reserved.

Connecting to (ADDRESS=(PROTOCOL=IPC)(KEY=TST.WORLD))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for IBM/AIX RISC System/6000: Version 10.2.0.4.0 - Production
Start Date                08-NOV-2013 13:25:47
Uptime                    5 days 19 hr. 3 min. 40 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      ON
Listener Parameter File   /oracle/TST/102_64/network/admin/listener.ora
Listener Log File         /oracle/TST/102_64/network/log/listener.log
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=TST.WORLD)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=TST)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=maqtst)(PORT=1527)))
Services Summary...
Service "TST" has 1 instance(s).
  Instance "TST", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully

Solução
- Ajuste as variaveis de ambiente para o diretorio da nova versão.
- Execute a opção stop do listener.
- Execute a opção start do listener e observe a alteração

maqtst:oratst 4> lsnrctl start

LSNRCTL for IBM/AIX RISC System/6000: Version 11.2.0.3.0 - Production on 14-NOV-2013 08:30:15

Copyright (c) 1991, 2011, Oracle.  All rights reserved.

Starting /oracle/TST/112_64/bin/tnslsnr: please wait...

TNSLSNR for IBM/AIX RISC System/6000: Version 11.2.0.3.0 - Production
System parameter file is /oracle/TST/112_64/network/admin/listener.ora
Log messages written to /oracle/diag/tnslsnr/maqtst/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=TST.WORLD)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=TST)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=maqtst)(PORT=1527)))

Connecting to (ADDRESS=(PROTOCOL=IPC)(KEY=TST.WORLD))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for IBM/AIX RISC System/6000: Version 11.2.0.3.0 - Production
Start Date                14-NOV-2013 08:30:19
Uptime                    0 days 0 hr. 0 min. 3 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      ON
Listener Parameter File   /oracle/TST/112_64/network/admin/listener.ora
Listener Log File         /oracle/diag/tnslsnr/maqtst/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=TST.WORLD)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=TST)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=maqtst)(PORT=1527)))
Services Summary...
Service "TST" has 1 instance(s).
  Instance "TST", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully


BRCONNECT - A file or directory in the path name does not exist

Problema
maqtst:oratst 3> brconnect -u system/zebra*01 -c -f stats -t oradict_stats
system/: A file or directory in the path name does not exist.

Solução
- Execute o comando com o usuário e a senha entre aspas duplas.

maqtst:oratst 3> brconnect -u "system/zebra*01" -c -f stats -t oradict_stats

Abraços





PSAPTEMP is empty

Oracle



Problema 1:
ORA-12012: error on auto execute of job 8936
ORA-25153: Temporary Tablespace is Empty

Problema 2:
- No alert.log.
WARNING: The following temporary tablespaces contain no files.
This condition can occur when a backup controlfile has
been restored.  It may be necessary to add files to these
tablespaces.  That can be done using the SQL statement:
Solução
Rode o comando find / -name file para localizar os datafiles referentes a esta tablespace.
Ex:
maqtst@root:/:#find / -name temp.*
/oracle/TST/sapdata1/temp_1/temp.data1
maqtst@root:/:#

- No sqlplus rodar o comando abaixo para cada datafile localizado.
Comando: alter tablespace PSAPTEMP add tempfile '<filename>' reuse;
Ex:
SYS@TST>alter tablespace PSAPTEMP add tempfile '/oracle/TST/sapdata1/temp_1/temp.data1' reuse;

Tablespace altered.

SYS@TST>

Executar novamente o job na db13 e verificar na db02.

Abraços

Setting the national character set to UTF8

Referência

Aplicável
- Oracle 9, Oracle 10 e Oracle 11

Solução
###################################################
   Antes de realizar esta alteração, faça um backup do banco de dados
###################################################

- Verifique a versão atual.

maq01:oramaq 3> sqlplus "/as sysdba"

SQL*Plus: Release 11.2.0.3.0 Production on Thu Nov 14 15:08:03 2013

Copyright (c) 1982, 2011, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> select property_value from database_properties
     where upper(property_name) = 'NLS_NCHAR_CHARACTERSET';

PROPERTY_VALUE
--------------------------------------------------------------------------------
AL16UTF16

- Verifique se seu banco de dados não está usando nenhum campo do tipo NCHAR, NVARCHAR2 or NCLOB. Caso encontre, entre em contato com o suporte da SAP.

SQL> select owner, table_name, column_name
     from dba_tab_columns
    where (data_type = 'NCHAR' or
            data_type = 'NVARCHAR2' or
            data_type = 'NCLOB') and
            owner != 'SYS' and

            owner != 'SYSTEM';

no rows selected

Changing the national character set
- Para realizar esta alteração, é necessário possuir permissão SYSDBA.

- Execute os comandos nesta ordem.

sqlplus “/as sysdba”
CONNECT / AS SYSDBA
SHUTDOWN IMMEDIATE
STARTUP MOUNT
ALTER SYSTEM ENABLE RESTRICTED SESSION;
ALTER SYSTEM SET JOB_QUEUE_PROCESSES=0 SCOPE = MEMORY;
ALTER SYSTEM SET AQ_TM_PROCESSES=0 SCOPE = MEMORY;
ALTER DATABASE OPEN;
ALTER DATABASE NATIONAL CHARACTER SET UTF8;
SHUTDOWN IMMEDIATE
STARTUP

- Verificando o national character set.

SQL> select property_value from database_properties
     where upper(property_name  2  ) = 'NLS_NCHAR_CHARACTERSET';

PROPERTY_VALUE
--------------------------------------------------------------------------------

UTF8

Oracle Database 11.2.0.3 - Patches by SAP