Concepts of the Multitenant Architecture

本文探讨了非CDB架构面临的挑战,如资源浪费和管理复杂性,并重点介绍了Oracle Multitenant架构的优势,包括数据库整合、成本节省、灵活迁移等。此外,详细解析了CDB的组成部分,如根、CDB种子和PDB,以及应用容器的概念。

Challenges for a Non-CDB Architecture

Large enterprises may use hundreds or thousands of databases. Often these databases run on different platforms on multiple physical servers.

Because of improvements in hardware technology, especially the increase in the number of CPUs, servers are able to handle heavier workloads than before. A database may use only a fraction of the server hardware capacity. This approach wastes both hardware and human resources.

For example, 100 servers may have one database each, with each database using 10% of hardware resources and 10% of an administrator's time. A team of DBAs must manage the SGA, database files, accounts, security, and so on of each database separately, while system administrators must maintain 100 different computers.

To show the problem in reduced scale, Figure 18-4 depicts 11 databases, each with its own application and server. A head DBA oversees a team of four DBAs, each of whom is responsible for two or three databases.

Typical responses include:

  1. Use virtual machines (VMs).

In this model, you replicate the operating infrastructure of the physical server—operating system and database—in a virtual machine. VMs are agile, but use technical resources inefficiently, and require individual management. Virtual sprawl, which is just as expensive to manage, replaces the existing physical sprawl.

  1. Place multiple databases on each server.

Separate databases eliminate operating system replication, but do not share background processes, system and process memory, or Oracle metadata. The databases require individual management.

  1. Separate the data logically into schemas or virtual private databases (VPDs).

This technique uses technical resources efficiently. You can manage multiple schemas or VPDs as one. However, this model is less agile than its alternatives, requiring more effort to manage, secure, and transport. Also, the logical model typically requires extensive application changes, which discourages adoption.

Benefits of the Multitenant Architecture

1. Database Consolidation

Database consolidation合并 is the process of consolidating data from multiple databases into one database on one computer. The Oracle Multitenant option enables you to consolidate data and code without altering existing schemas or applications.

The following graphic depicts the databases in Figure 18-4 after consolidation onto one computer. The DBA team is reduced from five to three, with one CDB administrator managing the CDB while two PDB administrators split management of the PDBs.

Using the multitenant architecture for database consolidation has the following benefits:

  1. Cost reduction

By consolidating hardware and database infrastructure to a single set of background processes, and efficiently sharing computational and memory resources, you reduce costs for hardware and maintenance. For example, 100 PDBs on a single server share one database instance.

  1. Easier and more rapid movement of data and code

By design, you can quickly plug a PDB into a CDB, unplug the PDB from the CDB, and then plug this PDB into a different CDB. You can also clone PDBs while they remain available. You can plug in a PDB with any character set and access it without character set conversion.

  1. Easier management and monitoring of the physical database

The CDB administrator can manage the environment as an aggregate by executing a single operation, such as patching or performing an RMAN backup, for all hosted tenants and the CDB root. Backup strategies and disaster recovery are simplified.

  1. Separation of data and code

Although consolidated into a single physical database, PDBs mimic the behavior of non-CDBs. For example, if user error loses critical data, then a PDB administrator can use Oracle Flashback or point-in-time recovery to retrieve the lost data without affecting other PDBs.

  1. Secure separation of administrative duties

common user can connect to any container on which it has sufficient privileges, whereas a local user is restricted to a specific PDB.

  1. Ease of performance tuning

It is easier to collect performance metrics for a single database than for multiple databases. It is easier to size one SGA than 100 SGAs.

  1. Fewer database patches and upgrades

It is easier to apply a patch to one database than to 100 databases, and to upgrade one database than to upgrade 100 databases.

  1. Manageability

In a CDB, the data dictionary metadata is split between the root and the PDBs. Benefits of data dictionary separation include the following:

  1. Easier upgrade of data and code

For example, instead of upgrading a CDB from one database release to another, you can rapidly unplug a PDB from the existing CDB, and then plug it into a newly created CDB from a higher release.

  1. Easier migration between servers

To perform load balancing or to meet SLAs, you can migrate an application database from an on-premise data center to the cloud, or between two servers in the same environment.

  1. Protection against data corruption within a PDB

You can flash back a PDB to an SCN or PDB-specific restore point, without affecting other PDBs. This feature is analogous to the Flashback Database feature for a non-CDB.

  1. Ability to install, administer, and upgrade application-specific data and metadata in a single place

You can define a set of application-specific PDBs as a single component, called an application container. You can then define one or more applications within this container. Each application is a named, versioned set of common metadata and data shared within this application container.

  1. Integration with Oracle Database Resource Manager

In a multitenant environment, one concern is contention for system resources among the PDBs running on the same server. Another concern is limiting resource usage for more consistent, predictable performance.

Components of a CDB

A CDB includes the following components:

  1. Root:一个CDB只有一个root,名字叫CDB$ROOT, 用于存储metadata及common users.

The root, named CDB$ROOT, stores Oracle-supplied metadata and common users. An example of metadata is the source code for Oracle-supplied PL/SQL packages. A common user is a database user known in every container. A CDB has exactly one root.

  1. CDB seed:

一个CDB只有一个CDB seed,名字叫PDB$SEED,它是创建PDB的模板,可更改

The CDB seed, named PDB$SEED, is a template that you can use to create new PDBs. You cannot add objects to or modify objects in the CDB seed. A CDB has exactly one CDB seed.

  1. PDBs:实际使用的数据库,用于存储实际数据,PDB向后兼容12c之前版本数据库

A PDB appears to users and applications as if it were a non-CDB. For example, a PDB can contain the data and code required to support a specific application. A PDB is fully backward compatible with Oracle Database releases before Oracle Database 12c.

ROOT, CDB SEED, PDB均认为是一个容器,在CDB中有自己的container ID及name.

Each of these components is called a container. Therefore, the root is a container, the CDB seed is a container, and each PDB is a container. Each container has a unique container ID and name within a CDB. Figure 36-1 shows a CDB with several PDBs.


PDB有一个全局的ID(GUID), 用于为PDB的数据文件目录生成名字

Each PDB has a globally unique identifier (GUID). The PDB GUID is primarily used to generate names for directories that store the PDB's files, including both Oracle Managed Files directories and non-Oracle Managed Files directories.

12.2中出了新概念application containers,它由application root及多个application PDBs组成,application root存储了metadata及common data. 手册中注意以下名词理解:

application contianer=application root+application pdbs

Application containers内不能再分层

An application root cannot belong to another application root, and a PDB can belong to either no application roots or to only one application root.

The application seed is optional.

Applications cannot be installed in a CDB root or in a PDB plugged into a CDB root.

In this document, “the root” is a reference to the CDB root (CDB$ROOT). Any reference to an application root uses the term “application root.”

和优势。 云计算是一种基于互联网的计算模式。它提供了一种共享资源的方式,包括计算能力、存储空间和应用程序。云计算将这些资源分配给用户,使他们能够根据需要进行扩展和调整。云计算的主要概念是通过网络提供计算服务并以租用的方式供用户使用。用户无需购买独立的硬件和软件,只需根据需求进行选择。 云计算的核心技术主要有以下几个方面。首先是虚拟化技术,将物理资源抽象为虚拟资源,使其能够被多个用户共享。其次是弹性计算技术,能够根据用户的需求进行自动扩展和缩小。再次是分布式计算技术,将任务分发到多个计算节点上进行并行处理。此外,云计算还涉及数据中心、网络和安全等方面的技术。 云计算的优势主要体现在以下几个方面。首先是灵活和可扩展,用户可以根据实际需求动态调整使用的资源。其次是经济和高效,用户无需购买昂贵的硬件设备,能够将成本降到最低。再次是高可用性和可靠性,云计算提供了冗余和容错机制,确保用户的应用能够24/7稳定运行。此外,云计算还提供了方便的数据备份和恢复功能,确保数据的安全性。 总的来说,云计算是一种革新性的计算模式,通过提供灵活、经济、高效和可靠的计算资源,为用户带来了许多便利和优势。随着云计算技术的不断发展和创新,它将在各个领域中得到更广泛的应用和推广。
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值