日期:2014-05-16  浏览次数:20532 次

小布笔记一

Oracle Server? 包括 oracle instance 和oracle database

?

oracle instance 是指访问oracle database的一个中介,一种手段。对应而且只对应一个database。

oracle instanse 由 内存(memory)和 后台进程(brackground process? stuctures)组成。

?

connection and session

?

一个connection 是oracle 客户端和后台的进程建立的连接。user process 和后台的server process 建立连接。

客户端和服务器建立连接后,通过认证,就和客户端建立了会话 session。

?

oracle database

是一堆文件的集合。包含三种类型:data files ,control files,Redo log files。

除此之外还有parameter file、archived log files、 password files。

?

?

memory structure

system global area(SGA):在oracle instatnce启动的时候分配,是他的基本组成部分

program global area(PGA):当server process启动时分配,可以有多个PGA。

?

?

windows下命令启动oracle监听和服务

1.检查监听器状态

C:\Users\Administrator>lsnrctl status

LSNRCTL for 32-bit Windows: Version 10.2.0.1.0 - Production on 16-3月 -2012 09:
0:59

Copyright (c) 1991, 2005, Oracle.? All rights reserved.

正在连接到 (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
TNS-12541: TNS: 无监听程序
?TNS-12560: TNS: 协议适配器错误
? TNS-00511: 无监听程序
?? 32-bit Windows Error: 2: No such file or directory
正在连接到 (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=asus-PC)(PORT=1521)))
TNS-12541: TNS: 无监听程序
?TNS-12560: TNS: 协议适配器错误

?TNS-00511: 无监听程序
? 32-bit Windows Error: 61: Unknown error

--上面提示信息表明oracle监听程序没有打开

2.启动监听程序

?

C:\Users\Administrator>lsnrctl start

LSNRCTL for 32-bit Windows: Version 10.2.0.1.0 - Production on 16-3月 -2012 09:4
5:22

Copyright (c) 1991, 2005, Oracle.? All rights reserved.

启动tnslsnr: 请稍候...

TNSLSNR for 32-bit Windows: Version 10.2.0.1.0 - Production
系统参数文件为D:\product\10.2.0\db_1\network\admin\listener.ora
写入D:\product\10.2.0\db_1\network\log\listener.log的日志信息
监听: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1ipc)))
监听: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=asus-PC)(PORT=1521)))

正在连接到 (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
LISTENER 的 STATUS
------------------------
别名????????????????????? LISTENER
版本????????????????????? TNSLSNR for 32-bit Windows: Version 10.2.0.1.0 - Produ
ction
启动日期????????????????? 16-3月 -2012 09:45:28
正常运行时间????????????? 0 天 0 小时 0 分 6 秒
跟踪级别????????????????? off
安全性??????????????????? ON: Local OS Authentication

?SNMP????????????????????? OFF
监听程序参数文件????????? D:\product\10.2.0\db_1\network\admin\listener.ora
监听程序日志文件????????? D:\product\10.2.0\db_1\network\log\listener.log
监听端点概要...
? (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1ipc)))
? (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=asus-PC)(PORT=1521)))
服务摘要..
服务 "PLSExtProc" 包含 1 个例程。
? 例程 "PLSExtProc", 状态 UNKNOWN, 包含此服务的 1 个处理程序...
命令执行成功

--监听程序启动成功

3.启动oracle服务实例

C:\Users\Administrator>net start oracleServiceOrcl
OracleServiceORCL 服务正在启动 .........
OracleServiceORCL 服务已经启动成功。

4.关闭oracle服务实例

?C:\Users\Administrator>net stop oracleServiceOrcl
OracleServiceORCL 服务正在停止......
OracleServiceORCL 服务已成功停止。

5.关闭监听

?

C:\Users\Administrator>lsnrctl stop

LSNRCTL for 32-bit Windows: Version 10.2.0.1.0 - Production on 16-3月 -2012 09:5
2:12

Copyright (c) 1991, 2005, Oracle.? All rights reserved.

正在连接到 (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
命令执行成功

?

?