今天由于公司调整位置,一个开发人员搬电脑时不小心碰到了数据库服务器,致使服务器down机,所以必须重新启动数据库服务器在linux下,以前自己很少在Linux下操作数据库,现把步骤记录下做个笔记:
首先进入Linux,然后切换用户到ORACLE用户下:
1):  su - oracle
2):设置oracle数据库的环境变量:export oracle_sid=sid
3):连接sqlplus: sqlplus /nolog
4):切换为sys用户 conn / as sysdba
5):启动数据库 startup
这其实很简单,但自己还是第一次在Linux下操作
以下是这几天的Concepts Guide笔记

1222-1. Close a Database

When you close a database, Oracle writes all database data and recovery data in the

SGA to the datafiles and redo log files, respectively. Next, Oracle closes all online

datafiles and online redo log files. (Any offline datafiles of any offline tablespaces

have been closed already. If you subsequently reopen the database, any tablespace

that was offline and its datafiles remain offline and closed, respectively.) At this

point, the database is closed and inaccessible for normal operations. The control

files remain open after a database is closed but still mounted.

(当你关闭一个数据库时,Oracle将在SGA里写所有的数据库数据和恢复数据到数据文件和重做日志文件。随后,Oracle将关闭所有的在线数据文件和在线重做日志文件。)此时数据库是关闭的和不可用的对正常的操作来说。控制文件保持打开但是仍处于mount状态。

Undo Space Acquisition and Management

_ If you use the undotablespace method, you are using automatic undo

management mode. This is recommended.

_ If you use the rollbacksegment method of managing undo space, then you are

using manual undo management mode.

(如果你使用撤销表空间的方法,你将使用自动撤销表空间管理的模式。这是被推荐使用的。)

(如果你使用回滚段的方法管理撤销空间的话,那么你最好使用手动管理撤销的模式)

1224-1.The Listener

service names enable instances toregister automatically with other

listeners on the same machine. A service name canidentify multiple instances, and

an instance can belong to multiple services. Clientsconnecting to a service do not

have to specify which instance they require.

service names能够通过本机上的监听使一个例程自动注册。一个sn能够识别多了例程,一个例程能够属于多了services.客户端在连接服务时它们不需要明确指定哪个例程。)

The initialization parameter SERVICE_NAMES identifies which database services an

instance belongs to. On startup, each instance registerswith the listeners of other

instances belonging to the same services. During databaseoperations, the instances

of each service pass information about CPU use andcurrent connection counts to all

of the listeners in the same services. This enablesdynamic load balancing and

connection failover.

(初始化参数SERVICE_NAMES确定哪个例程属于哪个数据库服务。在启动时,每个例程监听注册其他的历程同属于这个服务。在数据库操作时,每个服务的历程会传输关于CPU使用和当前的连接总数的这些信息。这样能保持动态装载平衡和连接失败(觉得翻译的不恰当。))


1225-1.System Global Area (SGA) Overview

The SGAcontains the following data structures:

_ Database buffer cache (数据库缓存)

_ Redo log buffer (重做缓冲)

_ Shared pool (共享池)

_ Java pool Java池)

_ Large pool (optional) (大型池)

_ Data dictionary cache (数据字典缓存)

_ Other miscellaneous information

Dynamic SGA allows Oracle to set, at run time, limits on how much virtual memory

Oracle uses for the SGA. Oracle can start instances underconfigured and allow the

instance to use more memory by growing the SGA components, up to amaximum

of SGA_MAX_SIZE. If SGA_MAX_SIZE specified in the initialization parameter file is

less than the sum of all components specified or defaulted at initialization time,

then the setting in the initialization parameter file is ignored.

(动态SGAORACLE来设置,可以在运行时限制用于SGA的虚拟内存。ORACLE能够在小于SGA的情况下开始例程也允许通过增加SGA成员的内存来使用更多的内存,达到一个最大的SGA_MAX_SIZE。如果初始文件里设置的SGA_MAX_SIZE小于SGA的所有成员的和的话,那么初始的设置将会忽略。)

01-06 10:43