Home » All posts
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';
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
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
Erro na porta 21200 durante instalação do SAP Ecc 6
- Adicionar no $PATH o
caminho do “java1.4.2”.
export PATH=/usr/java14_64/jre/bin:/usr/java14_64/bin:$PATH
set –o vi
Extending MAXPPs of a Logical Volume
Problema
maqtst@root:/oracle/TST:#chfs -a size=+5G /oracle/TST/sapdata2
0516-787 extendlv: Maximum allocation for logical volume tstsapdata2lv
is 900.
maqtst@root:/oracle/TST:#chfs -a size=+5G /oracle/TST/sapdata2
0516-787 extendlv: Maximum allocation for logical volume tstsapdata2lv
is 900.
Solução
- Formato do camando:
#chlv -x maxpps
logicalvolume
- MaxPPs: Número total de pps, incluindo os adicionais
- logicalvolume: Nome do logical volume
- Example:
#chlv -x 1024 tstsapdata2lv
Updating brtools - Guide
Download
Depending on the system
configuration, the following table describes the path to the BR*Tools program
package:
Operating system Oracle Version SAP Kernel Access Path
--------------------------------------------------------------------
LINUX 32-bit 10g 32-bit 32-bit 1
WINDOWS 32-bit 10g 32-bit 32-bit 1
WINDOWS 64-bit 10g 64-bit 64-bit 2
UNIX 64-bit 10g 64-bit 64-bit 2
--------------------------------------------------------------------
Important: The 32-bit versions of BR*Tools are available only with SAP Kernel 7.20.
Access Path 1:
Main path as starting point (see point [2]):
--> SAP KERNEL 32-BIT [UNICODE]
--> SAP KERNEL 7.20 32-BIT [UNICODE]
--> Linux on IA32 32bit | Windows Server on IA32 32bit
--> ORACLE
--> DBATL720O10_nn
Access Path 2:
Main path as starting point (see point [2]):
--> SAP KERNEL 64-BIT [UNICODE]
--> SAP KERNEL 7.20/7.20_EXT/7.40 64-BIT [UNICODE]
--> Support Package Patches <-- for 7.40 only
--> AIX 64bit | HP-UX on IA64 64bit | Linux on x86_64 64bit ...
--> ORACLE
--> DBATL720O10_nn / DBATL740O11_nn
Operating system Oracle Version SAP Kernel Access Path
--------------------------------------------------------------------
LINUX 32-bit 10g 32-bit 32-bit 1
WINDOWS 32-bit 10g 32-bit 32-bit 1
WINDOWS 64-bit 10g 64-bit 64-bit 2
UNIX 64-bit 10g 64-bit 64-bit 2
--------------------------------------------------------------------
Important: The 32-bit versions of BR*Tools are available only with SAP Kernel 7.20.
Access Path 1:
Main path as starting point (see point [2]):
--> SAP KERNEL 32-BIT [UNICODE]
--> SAP KERNEL 7.20 32-BIT [UNICODE]
--> Linux on IA32 32bit | Windows Server on IA32 32bit
--> ORACLE
--> DBATL720O10_nn
Access Path 2:
Main path as starting point (see point [2]):
--> SAP KERNEL 64-BIT [UNICODE]
--> SAP KERNEL 7.20/7.20_EXT/7.40 64-BIT [UNICODE]
--> Support Package Patches <-- for 7.40 only
--> AIX 64bit | HP-UX on IA64 64bit | Linux on x86_64 64bit ...
--> ORACLE
--> DBATL720O10_nn / DBATL740O11_nn
Instalação
- Verifique a versão da brtools
maq01:oramaq 27> brtools -V
BR0651I BRTOOLS 7.20 (1)
Patch
Date Info
1 2010-01-26 BR*Tools support for Oracle 11g (note
1430669)
release note 1428529
kernel release 720
patch date 2010-01-26
patch level 1
make platform rs6000_64
make mode OCI_102
make date Mar 6 2010
- Após o download do arquivo, envie-o via FTP.
- Ajuste as permissões e dono como abaixo.
maq01@root:/tmp:>chmod
777 brtools
maq01@root:/tmp:>chmod
-R 777 brtools
maq01@root:/tmp:>chown
-R maqadm:sapsys brtools
maq01@root:/tmp:>su - maqadm
maqadm> cd /tmp/brtools
maqadm> ls -l
total 51720
-rwxrwxrwx 1 maqadm
sapsys 26480541 Nov 14 09:11
DBATL720O10_34-20005193.SAR
-
Descompacte o arquivo com o SAPCAR.
maqadm>
SAPCAR -xvf DBATL720O10_34-20005193.SAR
SAPCAR:
processing archive DBATL720O10_34-20005193.SAR (version 2.01)
x brarchive
x brbackup
x brconnect
x brrecover
x brrestore
x brspace
x brtools
x dbatoolsora.lst
x dbatoolsora.mf
x initSID.sap
x libsbt.o
x sapconn_role.sql
x sapdba_role.sql
x sapuprof_profile.sql
x SIGNATURE.SMF
SAPCAR: 15 file(s) extracted
maqadm> ls -l
total 199232
-rwxrwxrwx 1 maqadm
sapsys 26480541 Nov 14 09:11
DBATL720O10_34-20005193.SAR
-rw------- 1 maqadm
sapsys 5919 Sep 09 05:16
SIGNATURE.SMF
-rwxr-xr-x 1 maqadm
sapsys 11259483 Sep 07 02:37
brarchive
-rwxr-xr-x 1 maqadm
sapsys 11443336 Sep 07 02:38
brbackup
-rwxr-xr-x 1 maqadm
sapsys 13680646 Sep 07 02:42
brconnect
-rwxr-xr-x 1 maqadm
sapsys 12081206 Sep 07 02:43
brrecover
-rwxr-xr-x 1 maqadm
sapsys 4768980 Sep 07 02:44
brrestore
-rwxr-xr-x 1 maqadm
sapsys 14285817 Sep 07 02:46
brspace
-rwxr-xr-x 1 maqadm
sapsys 5572286 Sep 07 02:46
brtools
-rw-r--r-- 1 maqadm
sapsys 171 Sep 07 02:46
dbatoolsora.lst
-rw-r--r-- 1 maqadm
sapsys 376 Sep 07 02:46
dbatoolsora.mf
-rw-r--r-- 1 maqadm
sapsys 27635 Sep 07 02:46
initSID.sap
-rwxr-xr-x 1 maqadm
sapsys 2333753 Sep 06 20:27
libsbt.o
-rw-r--r-- 1 maqadm
sapsys 1909 Sep 07 02:46
sapconn_role.sql
-rw-r--r-- 1 maqadm sapsys
5129 Sep 07 02:46 sapdba_role.sql
-rw-r--r-- 1 maqadm
sapsys 9218 Sep 07 02:46
sapuprof_profile.sql
maqadm>
rm DBATL720O10_34-20005193.SAR
maqadm>
ls -l
total 147512
-rw------- 1 maqadm
sapsys 5919 Sep 09 05:16
SIGNATURE.SMF
-rwxr-xr-x 1 maqadm
sapsys 11259483 Sep 07 02:37
brarchive
-rwxr-xr-x 1 maqadm
sapsys 11443336 Sep 07 02:38
brbackup
-rwxr-xr-x 1 maqadm
sapsys 13680646 Sep 07 02:42
brconnect
-rwxr-xr-x 1 maqadm
sapsys 12081206 Sep 07 02:43
brrecover
-rwxr-xr-x 1 maqadm
sapsys 4768980 Sep 07 02:44
brrestore
-rwxr-xr-x 1 maqadm
sapsys 14285817 Sep 07 02:46
brspace
-rwxr-xr-x 1 maqadm
sapsys 5572286 Sep 07 02:46 brtools
-rw-r--r-- 1 maqadm
sapsys 171 Sep 07 02:46
dbatoolsora.lst
-rw-r--r-- 1 maqadm
sapsys 376 Sep 07 02:46
dbatoolsora.mf
-rw-r--r-- 1 maqadm
sapsys 27635 Sep 07 02:46
initSID.sap
-rwxr-xr-x 1 maqadm
sapsys 2333753 Sep 06 20:27
libsbt.o
-rw-r--r-- 1 maqadm
sapsys 1909 Sep 07 02:46
sapconn_role.sql
-rw-r--r-- 1 maqadm
sapsys 5129 Sep 07 02:46
sapdba_role.sql
-rw-r--r-- 1 maqadm
sapsys 9218 Sep 07 02:46
sapuprof_profile.sql
- Execute o comando cp –p * para enviar os arquivos para o diretório
do kernel.
cp –p * /sapmnt/<SID>/exe
- Após, execute o comando brtools –V para conferir a atualização.
maqadm> brtools -V
BR0651I BRTOOLS 7.20 (34)
Patch
Date Info
1 2010-01-26 BR*Tools support for Oracle 11g (note
1430669)
9 2010-10-27 BR*Tools support for eSourcing databases
(note 1523205)
18
2011-09-07 BR*Tools support for
Oracle ASM and Exadata (note 1627541)
25
2012-06-28 Corrections in
BR*Tools 7.20 patch 25 (note 1735811)
26
2012-09-12 Corrections in
BR*Tools 7.20 patch 26 (note 1763972)
27
2012-09-12 Support for secure
storage in BR*Tools (note 1764043)
28
2012-10-25 Corrections in
BR*Tools 7.20 patch 28 (note 1780057)
29
2012-12-03 Corrections in
BR*Tools 7.20 patch 29 (note 1795814)
30
2013-01-31 Corrections in
BR*Tools 7.20 patch 30 (note 1816874)
31
2013-03-26 Corrections in
BR*Tools 7.20 patch 31 (note 1838852)
32
2013-05-28 Corrections in
BR*Tools 7.20 patch 32 (note 1865897)
33
2013-07-03 Corrections in
BR*Tools 7.20 patch 33 (note 1882181)
34
2013-09-05 Corrections in
BR*Tools 7.20 patch 34 (note 1909451)
release note 1428529
kernel release 720
patch date 2013-09-05
patch level 34
make platform rs6000_64
make codeline 720_REL
make mode OCI_102
make
date Sep 7 2013
Abraços
Exception CX_DBA_ADBC, CX_SQL_EXCEPTION - ORA-00942
Transações Afetadas
- DB02
- ST04
Problema
ORA-00942: table or view does not exist
Exception CX_DBA_ADBC in function unit READ_TEXT_FILE
line 12 ( function group S_ORA_COCKPIT_5 include )
Kernel Error ID:
WP
ID: 2
WP
PID: 13303910
SYSID: DEV
SY-SUBRC: 0
SQL
statement: SELECT line FROM sys.ext_tab_dbac_alert
Database: DEFAULT
caused by
Exception
CX_SQL_EXCEPTION in class CL_SQL_RESULT_SET
Kernel Error ID:
DB
Error: Yes
SQL
Code: 942
SQL
Message: ORA-00942: table or view does not exist
DB
Object Exists: No
Duplicated Key: No
Internal Error: 5
Invalid Cursor: No
Unknown Connection: No
Connection
Closed: No
Solução
- Crie o script sappost3.sql, copie e cole o script abaixo.
- Troque o SID TMP para o SID do seu sistema.
- Execute no sqlplus e verifique se o problema foi
resolvido.
spool sappost3.log
connect / as sysdba
drop directory ext_dir_dbac_client;
create directory ext_dir_dbac_client as
'/usr/sap/TMP/SYS/profile/oracle';
drop table ext_tab_dbac_tnsnames;
create table ext_tab_dbac_tnsnames
(line varchar2(2000))
ORGANIZATION EXTERNAL
(type oracle_loader
default directory ext_dir_dbac_client
access parameters
(RECORDS DELIMITED BY NEWLINE
NOLOGFILE)
location ('tnsnames.ora'));
drop table ext_tab_dbac_sqlnet;
create table ext_tab_dbac_sqlnet
(line varchar2(2000))
ORGANIZATION EXTERNAL
(type oracle_loader
default directory ext_dir_dbac_client
access parameters
(RECORDS DELIMITED BY NEWLINE
NOLOGFILE)
location ('sqlnet.ora'));
GRANT READ ON DIRECTORY
ext_dir_dbac_client TO SAPR3 WITH GRANT OPTION;
GRANT WRITE ON DIRECTORY ext_dir_dbac_client
TO SAPR3 WITH GRANT OPTION;
GRANT SELECT ON ext_tab_dbac_tnsnames
TO SAPR3;
GRANT SELECT ON ext_tab_dbac_sqlnet TO
SAPR3;
drop directory ext_dir_dbac_server;
create directory ext_dir_dbac_server as
'/oracle/TMP/102_64/network/admin';
drop table ext_tab_dbac_listener;
create table ext_tab_dbac_listener
(line varchar2(2000))
ORGANIZATION EXTERNAL
(type oracle_loader
default directory ext_dir_dbac_server
access parameters
(RECORDS DELIMITED BY NEWLINE
NOLOGFILE)
location ('listener.ora'));
GRANT READ ON DIRECTORY
ext_dir_dbac_server TO SAPR3 WITH GRANT OPTION;
GRANT WRITE ON DIRECTORY
ext_dir_dbac_server TO SAPR3 WITH GRANT OPTION;
GRANT SELECT ON ext_tab_dbac_listener
TO SAPR3;
drop directory ext_dir_dbac_alert;
create directory ext_dir_dbac_alert as
'/oracle/TMP/saptrace/background';
drop table ext_tab_dbac_alert;
create table ext_tab_dbac_alert
(line varchar2(2000))
ORGANIZATION EXTERNAL
(type oracle_loader
default directory ext_dir_dbac_alert
access parameters
(RECORDS DELIMITED BY NEWLINE
NOLOGFILE)
location ('alert_TMP.log'));
GRANT READ ON DIRECTORY
ext_dir_dbac_alert TO SAPR3 WITH GRANT OPTION;
GRANT WRITE ON DIRECTORY
ext_dir_dbac_alert TO SAPR3 WITH GRANT OPTION;
GRANT SELECT ON ext_tab_dbac_alert TO
SAPR3;
spool
off
exit
Abraços