当打算创建多个数据库时,将单个实例与多个实例进行比较有什么优缺点?
解决方法
您可能想浏览
Oracle concept guide,特别是如果您更熟悉其他DBMS.
- A database is a set of files,located on disk,that store data.
These files can exist independently of
a database instance.- An instance is a set of memory structures that manage database files.
The instance consists of a shared
memory area,called the system global
area (SGA),and a set of background
processes. An instance can exist
independently of database files.
单个实例(进程集)最多可以挂载一个数据库(文件集).如果需要访问多个数据库,则需要多个实例.更多关于the difference between instances and databases on askTom.
理想情况下,每个服务器只需要一个实例(服务器可能是逻辑服务器 – 即虚拟服务器).这将使Oracle能够确切地知道发生了什么.这意味着每个服务器一个数据库
如果您的数据库真的是独立的,那么使用多个实例/数据库是有意义的,因为您可以更好地控制数据库版本,管理等.
但是,如果您的数据库并非真正独立(您经常在它们之间共享数据,您需要一些可供所有数据访问的公共数据),那么使用单个统一数据库可能会更高效(也更简单).每个原始数据库都有自己的一组模式.在这种情况下,跨模式引用完整性很容易,您不需要复制需要共享的数据.