Skip to content

Instantly share code, notes, and snippets.

@danielbaccin
Created April 26, 2012 12:56
Show Gist options
  • Save danielbaccin/2499371 to your computer and use it in GitHub Desktop.
Save danielbaccin/2499371 to your computer and use it in GitHub Desktop.
comando uteis para config do oracle
Comandos uteis do oracle para obter configiurações:
Parâmetros da NLS:
=> Select * from nls_database_parameters
=> Select * from nls_session_parameters
=> Select * from nls_instance_parameters
Exibe os valores de database_parameters
=> SELECT name,value$ from sys.props$ where name like '%NLS_LANG%'
=> SELECT name,value$ from sys.props$ where name like '%NLS_CHAR%'
=> SELECT name,value$ from sys.props$ where name like '%_CHARACTER%'
=> Select nls_charset_id('WE8MSWIN1252') from dual
=> Select nls_charset_name(178) from dual
Para se alterar os valores das configurações da NLS temos os seguintes comandos:
=> Alter Session Set NLS_LANGUAGE = "PORTUGUESE"
=> Alter Session Set NLS_TERRITORY = "BRAZIL"
=> Alter System Set NLS_LANGUAGE='BRAZILIAN PORTUGUESE' scope=spfile;
=> Alter System Set NLS_TERRITORY='BRAZIL' SCOPE=SPFILE;
=> Update sys.props$ set value$ = 'WE8MSWIN1252' where name = 'NLS_NCHAR_CHARACTERSET';
=> Update sys.props$ set value$ = 'WE8MSWIN1252' where name = 'NLS_CHARACTERSET';
shutdown immediate;
startup mount;
alter system enable restricted session;
alter system set job_queue_processes=0;
alter system set aq_tm_processes=0;
alter database open;
alter database character set AL32UTF8;
shutdown immediate;
startup restrict;
shutdown immediate;
startup;
maiores esclarecimento no link
http://tosemopcao.blogspot.com.br/2009/11/bd-oracle-acentos-no-10g-xe.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment