Oracle 12c Upgrade: 04 – Managing CDBs and PDBs

Card Set Information

Author:
Tralala
ID:
296064
Filename:
Oracle 12c Upgrade: 04 – Managing CDBs and PDBs
Updated:
2015-04-22 02:55:17
Tags:
Oracle 12c Upgrade Managing CDBs PDBs
Folders:
Oracle 12c Upgrade
Description:
Oracle 12c Upgrade: 04 – Managing CDBs and PDBs
Show Answers:

Home > Flashcards > Print Preview

The flashcards below were created by user Tralala on FreezingBlue Flashcards. What would you like to do?


  1. When is a PDB service created?
    When the PDB is created
  2. How can one connect to a PDB or CDB?
    • EZCONNECT
    • Oracle Net Services
    • ALTER SESSION SET CONTAINER
  3. Describe the EZCONNECT syntax
    • sqlplus system/password@//crip230.crippledick.com:1521/PDB01
    • sqlplus system/password@//crip230.crippledick.com:1521/CDB01
  4. Which views show the services?
    • DBA_SERVCES
    • CBD_SERVCES
    • V$SERVICES
  5. How can one show which container you are currently connected to?
    • SHOW CON_NAME
    • SHOW CON_ID
    • Can also use SYS_CONTEXT
  6. What is the name of the root container?
    CDB$ROOT
  7. If two or more CDBs on the same server use the same listener and they contain two or more PDBs with the same service name which one does the listener connect to?
    Either, it's random
  8. In order to connect to CDB$ROOT, what do you need?
    User must be a common user with CREATE SESSION in Root
  9. In order to connect to PDB, what do you need?
    • User must be a common user with CREATE SESSION in Root
    • A local user in the PDB with CREATE SESSION in PDB
  10. Can user connect to PDB$SEED?
    Yes
  11. What permissions are required to connect to a database in mounted mode?
    • SYSDBA
    • SYSOPER
    • SYSBACKUP
    • SYSDG
  12. What kind of users can connect to CDB$ROOT?
    Common Users
  13. To use the ALTER SESSION SET CONTAINER command, what must a common user must have?
    The SET CONTAINER privilege.
  14. What suffix to common users start with?
    C##
  15. How can a PDB be started is CDB is not available?
    It can't
  16. How is a PDB started/stopped?
    ALTER PLUGGABLE DATABASE MYPBD OPEN/CLOSE;
  17. How are all PDBs started/stopped?
    ALTER PLUGGABLE DATABASE ALL OPEN/CLOSE;
  18. How should a PDB be closed to ensure all current transaction will rollback?
    ALTER PLUGGABLE DATABASE PDB01 CLOSE IMMEDIATE;
  19. How are all PDBs started/stopped apart from named ones?
    ALTER PLUGGABLE DATABASE ALL EXCEPT PDB01 PDB01 OPEN/CLOSE;
  20. When the CBD is opened, what state are the PDBs?
    MOUNTED
  21. What view shows the OPEN_MODE of PDBs
    V$PDBS
  22. What are the possible states of a PDB?
    • OPEN READ WRITE
    • OPEN READ ONLY
    • OPEN MIGRATE- To execute database upgrade scripts
    • MOUNTED
  23. To change the state of a PDB, what should the current container be?
    ROOT
  24. What does STARTUP PLUGGABLE DATABASE db1 FORCE; do?
    Same as non-CDB database, closes then opens
  25. Where is a PDBs SPFILE located?
    Only CDB has SPFILE
  26. Which view shows which parameter that can be changed for a PDB?
    • V$PARAMETER (this also called V$SYSTEM_PARAMETER)
    • SELECT name, value FROM v$parameter WHERE ispdb_modifiable=’TRUE';
  27. What are the default parameters for a PDB?
    They are inherited from the CDB
  28. Which view shows information about the history of PDBs in the CDB?
    CDB_PDB_HISTORY
  29. Which view shows how and when each PDB was created?
    CDB_PDB_HISTORY
  30. Which view shows information about PDBs in the current instance?
    V$PDBS
  31. Which view shows information about PDBs and the root associated with the current instance.
    V$CONTAINERS
  32. In a multitenant environment, which views show information about the CDB$ROOT and all the PDBS?
    CDB_XXX
  33. In a multitenant environment, which views show information for the current container (PDB or CDB)?
    DBA_XXX
  34. In a multitenant environment, which views show information about objects a user can access inside a specific container?
    ALL_XXX
  35. In a multitenant environment, which views show information about objects owned by a user inside a specific container?
    USER_XXX
  36. When issuing the CONTAINER=ALL, what must the current container be?
    Root
  37. To user CONTAINER=ALL, what privilege must a common user have?
    SET CONTAINER
  38. What tasks can only be done when the current container is root?
    • Starting and shutting down the CDB instance
    • Creating, plugging/unplugging, and dropping PDBs
    • Modifying the CDB or the root
    • Executing DDL statements on a CDB or the root
    • Managing instance-level components such as processes, memory, alerts,
    • control files, undo, and the online/archived redo log files
  39. In order to connect to a PDB, what must a user must be?
    • A common user with a CREATE SESSION privilege granted commonly or locally in a specific PDB
    • A local user in the CDB with the CREATE SESSION privilege
  40. How can PDBs be opened when the CDB opens?
    • With a trigger
    • create trigger open_pdbs
    • after startup on database…
  41. What does issuing SHUTDOWN IMMEDIATE when connected to a PDB achieve?
    The pluggable database is shutdown and transactions rolled back in that database
  42. If a common user is connected to a PDB, what is the scope of what they can reference?
    • Only the PDB
    • (ie only an ASH report pertaining to the connected PDB)
  43. If a common user is connected to Root, what is the scope of what they can reference?
    • CDB and all PDBs
    • (ie ASH reports pertaining to all Root and all PDBs)
  44. What is a Container Data Object? Examples?
    • One containing data pertaining to multiple containers
    • V$ and CDB_XXX tables
  45. What kind of privileges can a local user be granted?
    Only local privileges
  46. What kind of privileges can a common user be granted?
    Local and Common
  47. Where can a commonly granted privilege be used?
    In all PDBs and Root
  48. Who can grant common privileges?
    A common user
  49. What kind of privilege can be granted commonly?
    System and object
  50. Can a local privilege apply to the root container?
    • Yes.
    • grant drop user to c##_sam container=current
  51. Who can grant privileges locally?
    Common and Local users
  52. To whom can local privileges be granted?
    Common and Local users
  53. How would drop user privilege be removed for common user C##BOB for all containers
    REVOKE DROP USER FROM C##BOB CONTAINER=ALL
  54. What kind of roles are defined in a Multitenant environment?
    Local and Common
  55. Where are common roles visible?
    In all PDBs and Root
  56. What are all Oracle predefined roles classed as?
    Common roles
  57. What can a local user do with a common role?
    • Can't create a common role
    • Can grant a common role to common and local users
  58. What can a common user do with a common role?
    • Can create a common role
    • Can grant a common role to common and local users
  59. What is the scope of a common role granted to a local user?
    Only applicable to the local user's PDB
  60. If a common role contains locally granted privileges, what is the scope of the role?
    Locally granted privileges will only apply the the PDB in which they were granted
  61. How is a local role created?
    create role local_pdb1 container=current;
  62. How is a common role created?
    create role c##Role1 container = all;
  63. How must common roles be prefixed??
    With C## or c##
  64. What is the difference between to roles CDB_DBA and PDB_DBA?
    • CDB_DBA has privileges to administer a CDB
    • PDB_DBA has privileges to administer a PDB
  65. When granting a privilege to a role, what is the default container
    CONTAINER=CURRENT. CONTAINER=ALL always has to explicitly defined
  66. What's the difference between STARTUP PLUGGABLE DATABASE PDB01 OPEN AND ALTER PLUGGABLE DATABASE OPEN?
    Nothing
  67. What does SHUTDOWN PLUGGABLE DATABASE PDB01 issued in Root do?
    Generates an error
  68. What does SHUTDOWN issued in a PDB do? What do the SHUTDOWN clauses (immediate etc) do?
    • Puts the database in a mounted state
    • Clauses to the same as for a non-CDB database

What would you like to do?

Home > Flashcards > Print Preview