sábado, junho 03, 2006
NC oracle criando uma base nova com novo charset
no sqlplus:
faz backup dos aqruivos .dbf ou .ora
faz backup dos aqruivos .dbf ou .ora
shutdown
startup nomount
CREATE DATABASE XE
LOGFILE '/usr/lib/oracle/xe/oradata/XE/log1_sisponto.ORA' SIZE 10M,
'/usr/lib/oracle/xe/oradata/XE/log2_sisponto.ORA' SIZE 10M,
'/usr/lib/oracle/xe/oradata/XE/log3_sisponto.ORA' SIZE 10M,
'/usr/lib/oracle/xe/oradata/XE/log4_sisponto.ORA' SIZE 10M,
'/usr/lib/oracle/xe/oradata/XE/log5_sisponto.ORA' SIZE 10M
EXTENT MANAGEMENT LOCAL
MAXDATAFILES 100
DATAFILE '/usr/lib/oracle/xe/oradata/XE/datafile_sisponto.ORA' SIZE 50 M
sysaux datafile '/usr/lib/oracle/xe/oradata/XE/sysaux_sisponto.ORA' size 10M autoextend on next 10M maxsize unlimited
DEFAULT TEMPORARY TABLESPACE temp TEMPFILE '/usr/lib/oracle/xe/oradata/XE/temp_sisponto.ORA' SIZE 50 M
UNDO TABLESPACE undo DATAFILE '/usr/lib/oracle/xe/oradata/XE/undo_sisponto.ORA' SIZE 50 M
NOARCHIVELOG
CHARACTER SET AL32UTF8;
SQL> @?/rdbms/admin/catalog.sql
SQL> @?/rdbms/admin/catproc.sql
NC ORACLE XE erro de linguagem na importação/exportação
oracle windows:
set NLS_LANG='BRAZILIAN PORTUGUESE_BRAZIL.WE8MSWIN1252'
set NLS_CHARACTERSET='AL16UTF16'
oracle linux:
export NLS_LANG='BRAZILIAN PORTUGUESE_BRAZIL.WE8MSWIN1252'
export NLS_CHARACTERSET='AL16UTF16'
http://www.oracle.com/technology/tech/globalization/htdocs/nls_lang%20faq.htm
http://www.utexas.edu/its/unix/reference/oracledocs/v92/B10501_01/server.920/a96529/appa.htm#967868
http://www.utexas.edu/its/unix/reference/oracledocs/v92/B10501_01/server.920/a96529/ch10.htm
Database Level This way will effect all sessions that make the connection to the database server
Add the following lines in init.ora file :
NLS_LANGUAGE=THAI
NLS_TERRITORY=THAILAND
Environment level This way will effect only client that uses this environment
Terminal session
(Multi-user environment such as telnet)
In UNIX environment, set the environment variable as follows:
In born, korn shell
$NLS_LANG=THAI_THAILAND.TH8TISASCII; export NLS_LANG
Win95/NT/2000 client
1. Run regedit, Registry window will appears
2. Select HKEY_LOCAL_MACHINE
3. Select SOFTWARE
4. Select ORACLE
5. Select NLS_LANG
Type the NLS_LANG and then enter the value THAI_THAILAND.TH8TISASCII
Session Level This way will effect a current session only.
SQL> alter session set NLS_LANGUAGE=THAI;
SQL> alter session set NLS_TERRITORY=THAILAND
http://mates.ms.mff.cuni.cz/oracle/doc/ora815nt/server.815/a68694/Output/ape.htm
The NLS_LANG parameter uses the following format:
NLS_LANG = LANGUAGE_TERRITORY.CHARACTER_SET
where:
LANGUAGE
Specifies the language and conventions for displaying messages, day name, and month name.
TERRITORY
Specifies the territory and conventions for calculating week and day numbers.
CHARACTER_SET
Controls the character set used for displaying messages.
Language NLS_LANG Value
Brazilian Portuguese
BRAZILIAN PORTUGUESE_BRAZIL.WE8ISO8859P1
set NLS_LANG='BRAZILIAN PORTUGUESE_BRAZIL.WE8MSWIN1252'
set NLS_CHARACTERSET='AL16UTF16'
oracle linux:
export NLS_LANG='BRAZILIAN PORTUGUESE_BRAZIL.WE8MSWIN1252'
export NLS_CHARACTERSET='AL16UTF16'
http://www.oracle.com/technology/tech/globalization/htdocs/nls_lang%20faq.htm
http://www.utexas.edu/its/unix/reference/oracledocs/v92/B10501_01/server.920/a96529/appa.htm#967868
http://www.utexas.edu/its/unix/reference/oracledocs/v92/B10501_01/server.920/a96529/ch10.htm
Database Level This way will effect all sessions that make the connection to the database server
Add the following lines in init.ora file :
NLS_LANGUAGE=THAI
NLS_TERRITORY=THAILAND
Environment level This way will effect only client that uses this environment
Terminal session
(Multi-user environment such as telnet)
In UNIX environment, set the environment variable as follows:
In born, korn shell
$NLS_LANG=THAI_THAILAND.TH8TISASCII; export NLS_LANG
Win95/NT/2000 client
1. Run regedit, Registry window will appears
2. Select HKEY_LOCAL_MACHINE
3. Select SOFTWARE
4. Select ORACLE
5. Select NLS_LANG
Type the NLS_LANG and then enter the value THAI_THAILAND.TH8TISASCII
Session Level This way will effect a current session only.
SQL> alter session set NLS_LANGUAGE=THAI;
SQL> alter session set NLS_TERRITORY=THAILAND
http://mates.ms.mff.cuni.cz/oracle/doc/ora815nt/server.815/a68694/Output/ape.htm
The NLS_LANG parameter uses the following format:
NLS_LANG = LANGUAGE_TERRITORY.CHARACTER_SET
where:
LANGUAGE
Specifies the language and conventions for displaying messages, day name, and month name.
TERRITORY
Specifies the territory and conventions for calculating week and day numbers.
CHARACTER_SET
Controls the character set used for displaying messages.
Language NLS_LANG Value
Brazilian Portuguese
BRAZILIAN PORTUGUESE_BRAZIL.WE8ISO8859P1
select NLS_LANGUAGE.VALUE || '_' || NLS_TERRITORY.value || '.' || NLS_CHARACTERSET.value NLS_LANG
from
(SELECT t.value FROM NLS_DATABASE_PARAMETERS t where t.parameter='NLS_LANGUAGE') NLS_LANGUAGE,
(SELECT t.value FROM NLS_DATABASE_PARAMETERS t where t.parameter='NLS_TERRITORY') NLS_TERRITORY,
(SELECT t.value FROM NLS_DATABASE_PARAMETERS t where t.parameter='NLS_CHARACTERSET') NLS_CHARACTERSET