Return-Path: <oracle-l-bounce@freelists.org>
X-Original-To: oracle-l@orafaq.com
Delivered-To: oracle-l@orafaq.com
Received: from puck1183.startdedicated.com (localhost [127.0.0.1])
 by puck1183.startdedicated.com (Postfix) with ESMTP id DDA5C196034A
 for <oracle-l@orafaq.com>; Thu,  6 Jun 2013 22:58:25 +0200 (CEST)
Received: from turing.freelists.org (freelists-180.iquest.net [206.53.239.180])
 by puck1183.startdedicated.com (Postfix) with ESMTP
 for <oracle-l@orafaq.com>; Thu,  6 Jun 2013 22:58:25 +0200 (CEST)
Received: from localhost (localhost [127.0.0.1])
 by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id EEAE721F7B;
 Thu,  6 Jun 2013 16:45:13 -0400 (EDT)
Authentication-Results: turing.freelists.org; dkim=permerror
 (verification error: signature timestamp in the future)
 header.i=@yahoo.com; dkim-adsp=none (insecure policy)
X-Virus-Scanned: Debian amavisd-new at turing.freelists.org
Received: from turing.freelists.org ([127.0.0.1])
 by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id 5TpsoJCD5eYM; Thu,  6 Jun 2013 16:45:13 -0400 (EDT)
Received: from turing.freelists.org (localhost [127.0.0.1])
 by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 75D1523017;
 Thu,  6 Jun 2013 16:44:32 -0400 (EDT)
Received: with ECARTIS (v1.0.0; list oracle-l); Thu, 06 Jun 2013 16:43:51 -0400 (EDT)
Received: from localhost (localhost [127.0.0.1])
 by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 1A6F422FFC
 for <oracle-l@freelists.org>; Thu,  6 Jun 2013 16:43:51 -0400 (EDT)
Received: from turing.freelists.org ([127.0.0.1])
 by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id Of31xowcbMRH for <oracle-l@freelists.org>;
 Thu,  6 Jun 2013 16:43:51 -0400 (EDT)
Received: from nm9-vm3.bullet.mail.ne1.yahoo.com (nm9-vm3.bullet.mail.ne1.yahoo.com [98.138.91.139])
 by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id B974822605
 for <oracle-l@freelists.org>; Thu,  6 Jun 2013 16:43:49 -0400 (EDT)
Received: from [98.138.90.55] by nm9.bullet.mail.ne1.yahoo.com with NNFMP; 06 Jun 2013 20:56:59 -0000
Received: from [98.138.89.163] by tm8.bullet.mail.ne1.yahoo.com with NNFMP; 06 Jun 2013 20:56:59 -0000
Received: from [127.0.0.1] by omp1019.mail.ne1.yahoo.com with NNFMP; 06 Jun 2013 20:56:59 -0000
X-Yahoo-Newman-Property: ymail-3
X-Yahoo-Newman-Id: 660734.24689.bm@omp1019.mail.ne1.yahoo.com
Received: (qmail 63126 invoked by uid 60001); 6 Jun 2013 20:56:59 -0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1370552219; bh=6/gKv4lUVhuNT32xPXQ4LFAue7er8Hf+OUZ2kde4+VE=; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=fcsYKJNhDn29WITG1dmLtGk5T4RiqX+FXbzy9NRoZRyKp0/FtjKAuOiyel6mnDqIwWJHaaiSrdV7B9El0XrB6lqv++gETgAafcJWdKt2pVKX4cpXVDnatmEq/r3zPBiPt+5Su35uMgwY59U1zBv51XT8onpWTSKawhByrZjhk7A=
DomainKey-Signature:a=rsa-sha1; q=dns; c=nofws;
  s=s1024; d=yahoo.com;
  h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type;
  b=rLTS9O02nGbNWygOz6luf/o03wpd2Q0GbjbfmI6nd+3x1CbthBAICkq+XSGTx8c8gXtZv22IMC47W49haRtAcyOBwLgXJT3YC3Vx2hOIxJuzprCxywtFh576RlJWgrba4OXuYS//8h55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pc3QgPG8BMAEBAQE-
References: <1370536139.11081.YahooMailNeo@web120004.mail.ne1.yahoo.com> <CAFU3ey7jBpv+VB_04PHRg8-Lqh_Jc2b3CuBUNSiP2O3qLgaSmA@mail.gmail.com>
Message-ID: <1370552219.52991.YahooMailNeo@web120006.mail.ne1.yahoo.com>
Date: Thu, 6 Jun 2013 13:56:59 -0700 (PDT)
From: Lu Jiang <lu.jiang69@yahoo.com>
Subject: Re: NLS_LENGTH_SEMANTICS=CHAR does not set the default character length type to char
To: "watt0012@umn.edu" <watt0012@umn.edu>
Cc: list <oracle-l@freelists.org>
In-Reply-To: <CAFU3ey7jBpv+VB_04PHRg8-Lqh_Jc2b3CuBUNSiP2O3qLgaSmA@mail.gmail.com>
MIME-Version: 1.0
Content-type: text/plain
Content-Transfer-Encoding: 8bit
X-archive-position: 49224
X-ecartis-version: Ecartis v1.0.0
Sender: oracle-l-bounce@freelists.org
Errors-to: oracle-l-bounce@freelists.org
X-original-sender: lu.jiang69@yahoo.com
Precedence: normal
Reply-To: lu.jiang69@yahoo.com
List-help: <mailto:ecartis@freelists.org?Subject=help>
List-unsubscribe: <oracle-l-request@freelists.org?Subject=unsubscribe>
List-software: Ecartis version 1.0.0
List-Id: oracle-l <oracle-l.freelists.org>
X-List-ID: oracle-l <oracle-l.freelists.org>
List-subscribe: <oracle-l-request@freelists.org?Subject=subscribe>
List-owner: <mailto:steve.adams@ixora.com.au>
List-post: <mailto:oracle-l@freelists.org>
List-archive: <http://www.freelists.org/archives/oracle-l>
X-list: oracle-l

No, I logged in as an application user. 
Set this parameter at instance level is required by the application vendor. I like to explicitly delared it in ddl too.
 
Thanks,
Lu

________________________________
From: Andy Wattenhofer <watt0012@umn.edu>
To: lu.jiang69@yahoo.com 
Cc: list <oracle-l@freelists.org> 
Sent: Thursday, June 6, 2013 1:13 PM
Subject: Re: NLS_LENGTH_SEMANTICS=CHAR does not set the default character length type to char


Are you connected as SYS user when you do these tests? From the Oracle
documentation:
Sessions logged in as SYS do not use the NLS_LENGTH_SEMANTICS parameter.
> They use BYTE length semantics for all created objects unless overridden by
> the explicit BYTE and CHAR qualifiers in object definitions (SQL DDL
> statements).


I would also reiterate Oracle's recommendation that you do not set this
parameter at the instance level unless the alternatives are not workable.
Alternatives are to set it at the session level or explicitly declare it in
your DDL.

Andy


On Thu, Jun 6, 2013 at 11:28 AM, Lu Jiang <lu.jiang69@yahoo.com> wrote:

> Hi all,
>
> I just found that set parameter NLS_LENGTH_SEMANTICS=CHAR at instance
> level does not make the default character length type to char when created
> table with  char/varchar column in one of our11g database. Has any one seen
> this before?
>
> The following if what I got from this database:
>
> 1.
> SQL> show parameter length
> NAME TYPE VALUE
> ------------------------------------ -----------
> ------------------------------
> nls_length_semantics string CHAR
>
> 2. I created a table as following, but the length semantics does not use
> the default 'char'
> SQL> Create table test (Col1 CHAR(20),Col2 VARCHAR2(100));
>
> Table created.
>
> SQL> desc test
> Name Null? Type
> ----------------------------------------- --------
> ----------------------------
> COL1 CHAR(20 byte)
> COL2 VARCHAR2(100 byte)
>
> 3. Create a table with the length semantic explicitly specify to char
>
> SQL> Create table test1 (Col1 CHAR(20 char),Col2 VARCHAR2(100 char));
>
> Table created.
>
> SQL> desc test
> Name Null? Type
> ----------------------------------------- --------
> ----------------------------
> COL1 CHAR(20 CHAR)
> COL2 VARCHAR2(100 CHAR)
>
> Although define the the data type explicitly is a good practice, but i
> don't know why set NLS_LENGTH_SEMANTICS parameter is useless.  Could any
> one shed any light on this?
>
> Thanks,
> Lu
> --
> http://www.freelists.org/webpage/oracle-l
>
>
>


-- 
Andy Wattenhofer
Manager, Database Administration
University of Minnesota


--
http://www.freelists.org/webpage/oracle-l

--
http://www.freelists.org/webpage/oracle-l


