Re: Hyphenated user names

From: Mikhail Velikikh <mvelikikh_at_gmail.com>
Date: Thu, 9 May 2019 19:47:37 +0100
Message-ID: <CALe4Hpk+2KbouLhk9wvt7DCUQd9ZgLVG=m9urR81x=3LY=wB-Q_at_mail.gmail.com>



There are some use cases for that as well. For instance, you may want those quoted objects not to be used.

Bryn Llewellyn once suggested using quoted names for tables when introducing editioning views (EV).
If there is a table named "EMP", it will be renamed to "emp" and its EV will be "EMP".
Evidently it is harder to misuse tables in such a way as the intent is to use EVs as much as it makes sense.

Otherwise, some naming scheme is usually adopted to differentiate between tables and editioning views.
It can lead to name collisions.
A naming scheme may introduce extra prefix or suffix (such as: EMP->EMP#). It makes easier to hit the maximum length object limit, which was more actual before 12.2.

On Thu, 9 May 2019 at 15:23, Jeff Smith <jeff.d.smith_at_oracle.com> wrote:

> You can do many things…you shouldn’t do most of them.
>
>
>
> We’re building a list of ‘things you should NOT do in an Oracle Database’
> – creating objects which require quoting is definitely one of those things.
>
>
>
> Jeff
>
>
>
>
>
> *From:* Patrice sur GMail <patrice.boivin_at_gmail.com>
> *Sent:* Thursday, May 9, 2019 10:19 AM
> *To:* Adric Norris <landstander668_at_gmail.com>
> *Cc:* ORACLE-L <oracle-l_at_freelists.org>
> *Subject:* Re: Hyphenated user names
>
>
>
> Thanks.
>
>
>
> I don't believe using quotation marks is practical for our users, they are
> connecting using an Oracle Forms app and we want their lives to be as
> simple as possible.
>
>
>
> On Thu, May 9, 2019, 11:15 Adric Norris <landstander668_at_gmail.com> wrote:
>
> You actually can connect using such a username, but it's a bit of a PITA
> due to the quoting requirements.
>
>
>
> [SYSTEM_at_test ] SQL> create user "test-user" identified by "boGus1234%";
>
> User created.
>
> [SYSTEM_at_test ] SQL> grant create session to "test-user";
>
> Grant succeeded.
>
> [SYSTEM_at_test ] SQL> select username from dba_users where lower(username)
> like 'test%';
>
> USERNAME
>
> --------------------------------------------------------------------------------------------------------------------------------
> test-user
>
> [SYSTEM_at_test ] SQL> conn "test-user"/boGus1234%_at_test
> Connected.
>
>
>
> Specifying credentials on the command line may require nested quotes
> (likely depending upon platform), since the shell removes the outermost set
> before launching the client.
>
>
>
> $ sqlplus '"test-user"_at_testdr'
>
> SQL*Plus: Release 18.0.0.0.0 - Production on Thu May 9 09:11:09 2019
> Version 18.5.0.0.0
>
> Copyright (c) 1982, 2018, Oracle. All rights reserved.
>
> Enter password:
> Last Successful login time: Thu May 09 2019 09:09:08 -05:00
>
> Connected to:
> Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit
> Production
> With the Partitioning, Real Application Clusters, Automatic Storage
> Management, OLAP,
> Advanced Analytics and Real Application Testing options
>
>
>
> Not that I'd actually *recommend* doing this... but it is possible.
>
>
>
> On Thu, May 9, 2019 at 8:08 AM Patrice sur GMail <patrice.boivin_at_gmail.com>
> wrote:
>
> We discovered it is possible to create hyphenated usernames if quotation
> marks are used, but then people cannot connect.
>
>
>
> For now I am recommending they come up with different usernames or use _
> instead of -.
>
>
>
> Maybe ASCII should not have conflated the hyphen and the minus sign but I
> suppose they were building on the typewriter keys back then.
>
>
>
> --
>
> "In the beginning the Universe was created. This has made a lot of people
> very angry and been widely regarded as a bad move." -Douglas Adams
>
>

--
http://www.freelists.org/webpage/oracle-l
Received on Thu May 09 2019 - 20:47:37 CEST

Original text of this message