ITeye博客

dos下启动监听及服务

melet · 2007-10-08 21:11 · DB · 数据库 · Markdown

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

sql 代码

  1. C:\Documents and Settings\Administrator>lsnrctl start
  2. LSNRCTL for 32-bit Windows: Version 10.1.0.2.0 - Production on 08-10月-2007 20:34:44
  3. Copyright (c) 1991, 2004, Oracle.  All rights reserved.
  4. 启动tnslsnr: 请稍候...
  5. TNSLSNR for 32-bit Windows: Version 10.1.0.2.0 - Production
  6. 系统参数文件为D:\oracle\product\10.1.0\db_1\network\admin\listener.ora
  7. 写入D:\oracle\product\10.1.0\db_1\network\log\listener.log的日志信息
  8. 监听: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROCipc)))
  9. 监听: (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>net start oracleservicemelet
  30. OracleServiceMELET 服务正在启动 ...............
  31. OracleServiceMELET 服务已经启动成功。
  32. C:\Documents and Settings\Administrator>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> 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> --数据库名
  49. SQL> select name from v$database
  50. 2  /
  51. NAME
  52. ---------
  53. MELET
  54. SQL> --实例名
  55. SQL> select instance_name from v$instance;
  56. INSTANCE_NAME
  57. ----------------
  58. melet
  59. SQL> --退出服务
  60. SQL> net stop oracleservicemelet
  61. SP2-0734: 未知的命令开头 "net stop o..." - 忽略了剩余的行。
  62. SQL> 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>net stop oracleservicemelet
  66. OracleServiceMELET 服务正在停止......
  67. OracleServiceMELET 服务已成功停止。
  68. C:\Documents and Settings\Administrator>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>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>

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。