Re: Getting feet wet with users in Multi-Tenant Users and 12c

From: Hans Forbrich <fuzzy.graybeard_at_gmail.com>
Date: Tue, 22 Mar 2016 09:51:35 -0600
Message-ID: <56F16A07.4010708_at_gmail.com>



Perhaps it's time to get out of the habit of using SYS. Remember that it has a special role that is much more powerful than just a DBA. I'd suggest using it only for operations required instance-wide.

In my multi-tenant test environment, I have instance orcl, services orcl.example.com and samples.example.com

The SYS password when connecting to CDB$ROOT, I can change the SYS password, and it appears to be set for all (makes sense, as it is in the orapw file). When I set to a container and attempt to change the password, I get an error with the message that this password must be changed for the user across all containers.

I've gotten out of the habit is adding a TNS entry - the overhead in the long run will become very very tedious. EZ-connect seems to be the way to go.

Console session showing access to sys in both CDB$ROOT and SAMPLES

    [oracle_at_db1host Desktop]$ sqlplus     sys/***_at_localhost:1521/orcl.example.com <http://orcl.example.com>as     sysdba

    SQL*Plus: Release 12.1.0.2.0 Production on Tue Mar 22 09:47:40 2016

    Copyright (c) 1982, 2014, Oracle. All rights reserved.

    Connected to:
    Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit     Production
    With the Partitioning, OLAP, Advanced Analytics and Real Application     Testing options

    SQL> show con_name

    CON_NAME



    CDB$ROOT
    SQL> exit
    Disconnected from Oracle Database 12c Enterprise Edition Release     12.1.0.2.0 - 64bit Production
    With the Partitioning, OLAP, Advanced Analytics and Real Application     Testing options
    [oracle_at_db1host Desktop]$ sqlplus     sys/***_at_localhost:1521/samples.example.com     <http://samples.example.com>as sysdba

    SQL*Plus: Release 12.1.0.2.0 Production on Tue Mar 22 09:47:56 2016

    Copyright (c) 1982, 2014, Oracle. All rights reserved.

    Connected to:
    Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit     Production
    With the Partitioning, OLAP, Advanced Analytics and Real Application     Testing options

    SQL> show con_name

    CON_NAME



    SAMPLES
    SQL> exit
    Disconnected from Oracle Database 12c Enterprise Edition Release     12.1.0.2.0 - 64bit Production
    With the Partitioning, OLAP, Advanced Analytics and Real Application     Testing options
    [oracle_at_db1host Desktop]$

On 22/03/2016 8:25 AM, Chris Taylor wrote:
> Ok, we have a POC 12c environment and I'm just getting started so I
> had a couple of questions regarding USERS.
>
> 1.) The SYS password for the CDB is not the same as the PDB - does SYS
> exist in the PDB? I can connect fine to the CDB " connect sys as
> sysdba", but the inside the PDB (using tnsnames alias), it gives me
> invalid username/password.
>
> 2.) When creating users inside the PDB, do I have to do it while
> connected to the CDB and do an "alter session set container = xxxxxx;"
> then create the user? Or can I login directly to the PDB service and
> create the user? I'm hoping I can login directly to the PDB and
> create the user, but then I'm curious why my SYS password doesn't work
> going to the PDB.
>
> Tips/Suggestions?
>
> Chris
>

--
http://www.freelists.org/webpage/oracle-l
Received on Tue Mar 22 2016 - 16:51:35 CET

Original text of this message