---
title: "dos下启动监听及服务"
author: "melet"
date: "2007-10-08T21:11:12Z"
tags: []
categories: ["数据库"]
slug: "dos"
draft: false
lastmod: "2007-10-08T21:11:12Z"
id: 129896
url: "https://melet.iteye.com/blog/129896"
---

用惯了pl/sql.突然在公司里让我在dos下来启动oracle的监听器及服务。这让我感觉很不熟练。今晚来练练手。

sql 代码

01. C:\\Documents and Settings\\Administrator&gt;lsnrctl start
02. LSNRCTL for 32-bit Windows: Version 10.1.0.2.0 - Production on 08-10月-2007 20:34:44
03. Copyright (c) 1991, 2004, Oracle.  All rights reserved.
04. 启动tnslsnr: 请稍候...
05. TNSLSNR for 32-bit Windows: Version 10.1.0.2.0 - Production
06. 系统参数文件为D:\\oracle\\product\\10.1.0\\db\_1\\network\\admin\\listener.ora
07. 写入D:\\oracle\\product\\10.1.0\\db\_1\\network\\log\\listener.log的日志信息
08. 监听: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\\\.\\pipe\\EXTPROCipc)))
09. 监听: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=lenovo-9664c495)(PORT=1521)))
10. 正在连接到 (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC)))
11. LISTENER 的 STATUS
12. \------------------------
13. 别名                      LISTENER
14. 版本                      TNSLSNR for 32-bit Windows: Version 10.1.0.2.0 - Production
15. 启动日期                  08-10月-2007 20:34:48
16. 正常运行时间              0 天 0 小时 0 分 4 秒
17. 跟踪级别                  off
18. 安全性                    ON: Local OS Authentication
19. SNMP                      OFF
20. 监听程序参数文件          D:\\oracle\\product\\10.1.0\\db\_1\\network\\admin\\listener.ora
21. 监听程序日志文件          D:\\oracle\\product\\10.1.0\\db\_1\\network\\log\\listener.log
22. 监听端点概要...
23. (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\\\.\\pipe\\EXTPROCipc)))
24. (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=lenovo-9664c495)(PORT=1521)))
25. 服务摘要..
26. 服务 "PLSExtProc" 包含 1 个例程。
27. 例程 "PLSExtProc", 状态 UNKNOWN, 包含此服务的 1 个处理程序...
28. 命令执行成功
29. C:\\Documents and Settings\\Administrator&gt;net start oracleservicemelet
30. OracleServiceMELET 服务正在启动 ...............
31. OracleServiceMELET 服务已经启动成功。
32. C:\\Documents and Settings\\Administrator&gt;sqlplus melet/melet@melet as sysdba
33. SQL\*Plus: Release 10.1.0.2.0 - Production on 星期一 10月 8 20:38:59 2007
34. Copyright (c) 1982, 2004, Oracle.  All rights reserved.
35. 连接到:
36. Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Production
37. With the Partitioning, OLAP and Data Mining options
38. SQL&gt; select * from employee
39. 2  /
40. ID   FIRST\_NAME LAST\_NAME  START\_DATE     END\_DATE           SALARY CITY
41. ---- ---------- ---------- -------------- -------------- ---------- ----------
42. DESCRIPTION
43. \---------------
44. 01   Jason      Martin     25-7月 -96     25-7月 -06        1234.56 Toronto
45. Programmer
46. 02   Alison     Mathews    21-3月 -76     21-2月 -86        6661.78 Vancouver
47. Tester
48. SQL&gt; --数据库名
49. SQL&gt; select name from v$database
50. 2  /
51. NAME
52. \---------
53. MELET
54. SQL&gt; --实例名
55. SQL&gt; select instance\_name from v$instance;
56. INSTANCE\_NAME
57. \----------------
58. melet
59. SQL&gt; --退出服务
60. SQL&gt; net stop oracleservicemelet
61. SP2-0734: 未知的命令开头 "net stop o..." - 忽略了剩余的行。
62. SQL&gt; exit
63. 从 Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Production
64. With the Partitioning, OLAP and Data Mining options 断开
65. C:\\Documents and Settings\\Administrator&gt;net stop oracleservicemelet
66. OracleServiceMELET 服务正在停止......
67. OracleServiceMELET 服务已成功停止。
68. C:\\Documents and Settings\\Administrator&gt;lsnrctl status
69. LSNRCTL for 32-bit Windows: Version 10.1.0.2.0 - Production on 08-10月-2007 20:54:35
70. Copyright (c) 1991, 2004, Oracle.  All rights reserved.
71. 正在连接到 (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC)))
72. LISTENER 的 STATUS
73. \------------------------
74. 别名                      LISTENER
75. 版本                      TNSLSNR for 32-bit Windows: Version 10.1.0.2.0 - Production
76. 启动日期                  08-10月-2007 20:34:48
77. 正常运行时间              0 天 0 小时 19 分 50 秒
78. 跟踪级别                  off
79. 安全性                    ON: Local OS Authentication
80. SNMP                      OFF
81. 监听程序参数文件          D:\\oracle\\product\\10.1.0\\db\_1\\network\\admin\\listener.ora
82. 监听程序日志文件          D:\\oracle\\product\\10.1.0\\db\_1\\network\\log\\listener.log
83. 监听端点概要...
84. (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\\\.\\pipe\\EXTPROCipc)))
85. (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=lenovo-9664c495)(PORT=1521)))
86. 服务摘要..
87. 服务 "PLSExtProc" 包含 1 个例程。
88. 例程 "PLSExtProc", 状态 UNKNOWN, 包含此服务的 1 个处理程序...
89. 命令执行成功
90. C:\\Documents and Settings\\Administrator&gt;lsnrctl stop
91. LSNRCTL for 32-bit Windows: Version 10.1.0.2.0 - Production on 08-10月-2007 20:54:55
92. Copyright (c) 1991, 2004, Oracle.  All rights reserved.
93. 正在连接到 (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC)))
94. 命令执行成功
95. C:\\Documents and Settings\\Administrator&gt;