Where am I at: CDB vs. PDB? – 12 edition

All right, how many of us use the V$INSTANCE view to verify the instance name and current status of the database after we connect?  In Oracle Database 12c, we can still find this information from V$INSTANCE.  Breath a sigh of relief, for the moment!  What if I connect to a container database and then issue an ALTER SESSION command to move into a different container, i.e. as PDB?  Will I get the name of the PDB that I move into from the V$INSTANCE view or do I need to look somewhere else?  Lets take a look.

Connect to the container database as usual and use the V$INSTANCE view to see where I’m at.

[oracle@oel6 dbhome_1]$ sqlplus / as sysdba
SQL> select instance_name, version, status, con_id from v$instance;
INSTANCE_NAME     VERSION           STATUS       CON_ID
----------------- ----------------- ------------ ----------
ora12cb                  12.1.0.1.0       OPEN          0

Lets move into a PDB.  I have quite a few PDBs created, lets just use PDB1.

SQL> alter session set container=PDB1;
Session altered.

Did I actually move containers?  How can I tell?  Instead of selecting INSTANCE_NAME from V$INSTANCE; we have two new SHOW commands that will provide us the information we are looking for.  These command are quite simple (SHOW CON_ID & SHOW CON_NAME).

SQL> show con_id
CON_ID
------------------------------
3
SQL> show con_name
CON_NAME
------------------------------
PDB1

Now that we are confident that we are in PDB1, lets take a look at the V$INSTANCE view again.  What you will notice is that V$INSTANCE provides us with information relative to the container database (CDB).  It only makes sense that the V$INSTANCE would return CDB information. So, how do we identify items related to the pluggable database (PDB) without the SHOW commands?

Lets take a look at a view that is similar to V$INSTANCE.  Enter the V$PDBS view!  

SQL> desc v$pdbs;
Name Null? Type
----------------------- -------- ----------------------------
CON_ID NUMBER
DBID NUMBER
CON_UID NUMBER
GUID RAW(16)
NAME VARCHAR2(30)
OPEN_MODE VARCHAR2(10)
RESTRICTED VARCHAR2(3)
OPEN_TIME TIMESTAMP(3)
CREATE_SCN NUMBER
TOTAL_SIZE NUMBER

This view provides similar information as V$INSTANCE does; yet is only specific to PDBs.  If we wanted to find out the container_id, name, open_mode and size of the PDB we are currently connected to, we can use this query:

SQL> select con_id, name, open_mode, total_size from v$pdbs;
CON_ID     NAME                           OPEN_MODE  TOTAL_SIZE
---------- ------------------------------ ---------- ----------
3 PDB1 READ WRITE 393216000

What is interesting to point out, is that since we used an ALTER SESSION statement to switch to PDB1, the V$PDBS view only lists the PDB we are currently working in.  If we want to get a complete list of PDBs within the container database, we need to go back to the root container database and run the same SQL statement.

SQL> alter session set container=CDB$ROOT;
Session altered.
SQL> show con_name
CON_NAME
------------------------------
CDB$ROOT

SQL> select con_id, name, open_mode, total_size from v$pdbs;
CON_ID     NAME                           OPEN_MODE  TOTAL_SIZE
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY 283115520
3 PDB1 READ WRITE 393216000
4 PDBTEST MOUNTED 0
5 PDB2 READ ONLY 393216000

I hope that everyone now understands how to find information related to PDBs from SQL*Plus.  

Enjoy!

twitter: @curtisbl294

blog: http://dbasolved.com

Please follow and like:
Comments
  • Conde Nast initially stood by her and allowed her to maintain the position. Staffers were irate that she was allowed to keep her job and mentioned it despatched the incorrect message throughout a time of elevated assaults on American Asians but she stayed on. The Every day Beast reported that Condé Nast management called a gathering with staffers for Thursday afternoon to debate the new editor’s exit. Earlier this month, it was announced that McCammond would take over as the brand new editor-in-chief of Teen Vogue, however staffers at the online publication mounted fierce resistance to the move over decade-old tweets wherein she disparaged Asians. The issue with the United States, Canada or Europe, is that it could possibly take a couple of years thus far somebody through the Web. It was launched to assist males from Western countries meet and date Asian women. It is crucial that area indicators be printed under the date discipline to point which format is being used. He embraced being different and was forthright with it to everybody he met. Condé Nast’s human resources division additionally met with the Teen Vogue employees, and the workers had been reminded of an organization coverage requiring them to examine with the communications team earlier than making public statements.

    Wintour idateasia scam tried to build support for the would-be Teen Vogue editor, the paper stated, and included her in group conferences. Earlier on Friday, it was discovered that Anna Wintour tried to avoid wasting McCammond but could not cease her from being compelled out lower than two weeks after taking the job. Teen Vogue’s new editor Alexi McCammond has resigned lower than two weeks after taking the job over anti-Asian tweets she wrote as a teenager which surfaced online and value Conde Nast a seven-figure advert campaign. To that finish, after talking with Alexi this morning, we agreed that it was greatest to half ways, in order to not overshadow the necessary work happening at Teen Vogue,’ he went on. In addition, we have been hopeful that Alexi would turn into part of our team to provide perspective and insight that’s underrepresented all through the media. In a Twitter statement on Thursday, McCammond stated she and the company had determined to ‘part methods’. On Thursday, McCammond tweeted that she and the corporate have been ‘parting methods’.

    There have been additionally talks amongst gross sales groups that it might cost the company much more in advertising revenues. Alexi McCammond is a superb reporter and even a progressive, however she has been canceled for stuff she tweeted practically a decade ago in faculty. On Monday a gathering, scheduled for Wednesday with Wintour and high Vogue executives, was abruptly canceled and not rescheduled, indicating to McCammond that her position was not tenable. It has additionally emerged that in an e-mail to employees round the same time Conde Nast HR boss Stan Duncan revealed that Anna Wintour and CEO Roger Lynch knew concerning the decade-previous racist tweets however employed her anyway. However when interacting with other singles online, an Asian American can learn a little bit bit about the personalities of different singles, which makes it simpler for him or her to start out speaking with someone of the identical race, nationality or ethnic group. For me to love her, I need to love myself and for the past few months I need to search out myself a bit once more. One other characteristic of Asian American single girls or males joining Asian American singles sites is that they are going to be in a position to use it to seek out someone of their choice inside a matter of months.

    When Alexi was was a teenager she made racially charged statements on social media about Asian folks. White individuals get a childhood and the privilege to make errors within the name of ethical improvement. And union with a white man is often seen as an opportunity to marry above their socioeconomic standing. McCammond is dating disgraced former Deputy White House Secretary TJ Ducklo who was fired after threatening to destroy a reporter if she exposed their relationship. McCammond’s resignation also comes after her boyfriend was fired from his function as Deputy White Home Secretary for threatening to ‘destroy’ a feminine reporter if they exposed their relationship. Millie had previously she was finding single life ‘very enjoyable’ and had moved in with Chloe Burrows, who had split with her boyfriend Toby Aromolaran. With the invasion of Asian dating sites in USA, discovering a trustworthy one could appear an actual challenge, particularly in case you are an aspiring dater. Accounts are verified, so you may ensure that there is a right particular person on the other facet of the display screen. Naturally, it’s doable to depend on widespread evaluate platforms with their very own rankings, but due to the hints offered in this text, you may make your individual alternative of the best mail order bride site and keep away from rough mistakes in this fairly difficult task.

Leave a Reply

Your email address will not be published. Required fields are marked *

Enquire now

Give us a call or fill in the form below and we will contact you. We endeavor to answer all inquiries within 24 hours on business days.