看图说话,DB2是一个INSTANCE,里面包着多个DATABASES,而ORACLE却是INSTANCE跟DATABASE分开的。另外,ORACLE中SERVER PROCESS是不算在INSTANCE中的,而DB2的CO-ORDINATING AGENT是算在INSTANCE中的。直接的后果就是,如果把一个DB2 AGENT杀掉,整个DB2 INSTANCE会PANIC,然后会INSTANCE DOWN;而在ORACLE,可以很安全地把SERVER PROCESS杀掉,而ORACLE会若无其事。
DB2 for Oracle DBA:
An instance in DB2 UDB has similar meaning as an instance in Oracle. Each instance in DB2 UDB refers to one set of processes that link back to the installed binary files in the DB2 UDB directory. An instance includes:
1) Memory usage
2) Processor usage
3) Disk usage
Oracle restricts the definition of an instance to the processes and memory components. Thus, with Oracle 9i, an instance consists of a number of background processes, and a system global area (SGA) that provides an allocation of shared memory that is available to all database users.
DB2官方定义:
Instances: An instance (sometimes called a database manager) is DB2® code that manages data. It controls what can be done to the data, and manages system resources assigned to it. Each instance is a complete environment. It contains all the database partitions defined for a given parallel database system. An instance has its own databases (which other instances cannot access), and all its database partitions share the same system directories. It also has separate security from other instances on the same machine (system).
Oracle 官方定义:
An Oracle server consists of an Oracle database and an Oracle server instance. Every time a database is started, a system global area (SGA) is allocated and Oracle background processes are started. The combination of the background processes and memory buffers is called an Oracle instance.
在DB2中,DB NAME是很重要:
/home/db2inst > db2 "? connect to"
CONNECT TO database-alias
[IN {SHARE MODE | EXCLUSIVE MODE [ON SINGLE DBPARTITIONNUM]}]
[USER username [{USING password
[NEW new-password CONFIRM confirm-password] |
CHANGE PASSWORD}]]
NOTE: From the operating system prompt, prefix commands with 'db2'.
Special characters MAY require an escape sequence (\), for example:
db2 \? change database
db2 ? change database xxx comment with \"text\"
连接是到DB ALIAS中的。在CATALOG DB的时候都没用到INSTANCE NAME。
而ORACLE则是DB NAME几乎是可以忽略不计,CONNECTION是直接到INSTANCE,至于底下的DB是哪个,就看那个INSTANCE START的时候是MOUNT到哪个DB了。在TNS定义里SID是很重要的。
请问,DB2 INSTANCE中的DISK USAGE都包含了哪些东西呢?