Monday, January 31, 2011

Script to set NLS Parameters like 'NLS_LANGUAGE' in TOAD or SQLPlus

dbms_session.set_nls(param IN VARCHAR2, value IN VARCHAR2);

Equivalent to: ALTER SESSION SET = ;

---------------------------------------------------------------

exec dbms_session.set_nls('nls_date_format','''DD-MON-YY''');

---------------------------------------------------------------

select userenv('LANG') from dual;

SELECT LANGUAGE FROM wf_users WHERE NAME LIKE 'INATECH';

BEGIN
fnd_client_info.set_org_context('185');
DBMS_SESSION.set_nls ('NLS_LANGUAGE', 'AMERICAN');
END;

begin
dbms_session.set_nls('NLS_LANGUAGE','''SIMPLIFIED CHINESE''');
END;


select userenv('LANG') from dual;

More information on NLS_Parameter can be found here http://www.toadworld.com/KNOWLEDGE/KnowledgeXpertforOracle/tabid/648/TopicID/FUNC22/Default.aspx

-- Equivalent to SQL "ALTER SESSION SET = "
-- Input arguments:
-- param
-- The NLS parameter. The parameter name must begin with 'NLS'.
-- value
-- The value to set the parameter to. If the parameter is a
-- text literal then it will need embedded single-quotes. For
-- example "set_nls('nls_date_format','''DD-MON-YY''')"

2 comments:

GAMESH TAWADE said...

Very fast delivery assume product.
Read more here

cracklie said...

Wow, amazing block structure! How long
Have you written a blog before? Working on a blog seems easy.
The overview of your website is pretty good, not to mention what it does.
In the content!
cracklie.net
Toad for Oracle Crack
DLNow Video Downloader Crack
Enfocus PitStop Pro Crack
Express Scribe Crack
RonyaSoft Poster Designer Crack
CyberGhost VPN Crack