当前位置: 首页 > news >正文

PDBADMIN 的作用,命名,重建 以及能否DROP

Creating a pluggable database using below SQL:

create pluggable database psample1 admin user psample_admin identified by "XXXXXXXXXXXXXXX' roles=(connect) create_file_dest='+DGEHDB';

What if user psample_admin gets dropped accidentally? Is it important? How to recreate it?
 

CHANGES

 psample_admin gets dropped accidentally.

CAUSE

Admin User created at the time of creating PDB, it gets dropped, how to overcome the situation.
 

SOLUTION

As per documentation:

For admin_user_name, specify name of the user to be created. Use the IDENTIFIED BY clause to specify the password for admin_user_name. Oracle Database creates a local user in the PDB and grants the PDB_DBA local role to that user. Use this clause to create an administrative user who can be granted the privileges required to perform administrative tasks on the PDB.

This account is important. If the user gets dropped you can recreate a new local PDB user and grant the PDB_DBA local role to it.

GOAL

How to create desired PDB admin's username during PDB creation with DBCA ?

When create new PDB with DBCA, the username of PDB admin is always PDBADMIN no matter what is choose.
Example:
dbca -silent -createPluggableDatabase -sourceDB cdXXX -pdbName devXXX -createPDBFrom DEFAULT -pdbAdminUserName XXXX_ADMIN -pdbAdminPassword '******' -createUserTableSpace true


then "PDBADMIN" User gets created instead of "XXXX_ADMIN":


select username, created, con_id from cdb_users where (username like 'PDB%' or username like 'TEST%') and con_id in (select pdb_id from DBA_PDBS where PDB_NAME='TEST');


USERNAME  CREATED CON_ID
-------------------------------------------------------------------------------
PDBADMIN   24-FEB-20 3

SOLUTION

 There is an option for this in DBCA itself as below:


dbca -sourceDB <sourceDB> -pdbName <pdbName> -createPluggableDatabase
-createNewPDBAdminUser  -pdbAdminUserName <pdbAdminUserName>
-createUserTableSpace false -responseFile <rspFilePath>

a. Example with Response Rile:

dbca -silent -createPluggableDatabase -sourceDB cdXXXX -pdbName devXXX -createNewPDBAdminUser -pdbAdminUserName XXX_ADMIN -createUserTableSpace false -responseFile /home/oracle/dbca-create-cdb-example-seeded-AFD.erb.rsp

b. Example without Responsible File:

dbca -silent -createPluggableDatabase -sourceDB cdXXXX -pdbName devXXX -createNewPDBAdminUser -pdbAdminUserName XXX_ADMIN -pdbAdminPassword '******' -createUserTableSpace true

GOAL

Can the local administrator user account (usually named as PDBADMIN, but not necessarily) of a pluggable database (PDB) be safely locked without causing issues to the database functionality?

SOLUTION

As described in this and this documents, when creating a pluggable database, a local account is created and granted with the PDB_DBA predefined role. This role allows the granted user account to perform administrative tasks in the pluggable database, hence, the purpose of this local administrator: administer the PDB. However, the administrative tasks that this local administrator is capable of can be also taken care of by the common user accounts SYS and SYSTEM. Due to this, if necessary (and if not in use), this local administrator account can be locked (and expired); the required administrative tasks in the pluggable database can still be performed by SYS as SYSTEM, should it be required.

REFERENCES

Creating a PDB from Scratch
Configuring Privilege and Role Authorization

http://www.lryc.cn/news/227671.html

相关文章:

  • 华为L410上制作内网镜像模板02
  • 美国材料与试验协会ASTM发布新版玩具安全标准 ASTM F963-23
  • Postman模拟上传文件
  • 【系统架构设计】架构核心知识: 1 系统工程与信息系统基础
  • 加班把数据库重构完毕
  • Centos(Linux)安装mysql数据库
  • 【数据结构】深度剖析ArrayList
  • 离线环境通过脚本实现服务器时钟同步(假同步)
  • 2023年9月青少年软件编程(C语言)等级考试试卷(一级)
  • 基于若依的ruoyi-nbcio流程管理系统仿钉钉流程json转bpmn的flowable的xml格式(支持并行网关)
  • 软件测试面试-银行篇
  • 基于Amazon EC2和Amazon Systems Manager Session Manager的堡垒机设计和自动化实现
  • 虚幻5.3打包Windows失败
  • 总结:利用JDK原生命令,制作可执行jar包与依赖jar包
  • 【C++】this指针讲解超详细!!!
  • 系统讲解java中list.stream()的用法
  • 字节面试:请说一下DDD的流程,用电商系统为场景
  • 第26章_事务概述与隔离级别
  • 合肥工业大学网络安全实验IP-Table
  • Docker本地镜像发布到阿里云或私有库
  • 使用openvc进行人脸检测:Haar级联分类器
  • Netty心跳检测
  • 【leaflet】1. 初见
  • 数据结构与算法(Java版) | 详解十大经典排序算法之一:冒泡排序
  • 轻量封装WebGPU渲染系统示例<24>- Rendering Pass Graph基本用法(源码)
  • 开设自己的网站系类01购买服务器
  • FTP、NFS、SAMBA系统服务一
  • transfomer模型——简介,代码实现,重要模块解读,源码,官方
  • 队列(Queue):先进先出(FIFO)的数据结构
  • 吃透 Spring 系列—AOP部分