Oracle 11.2 Windows无法用两行启动 [英] Oracle 11.2 Windows cannot startup with two lines

查看:73
本文介绍了Oracle 11.2 Windows无法用两行启动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

过去,我曾经使用以下小脚本来启动Oracle 11.2 Windows:

in the past I used to startup my Oracle 11.2 Windows with this little script:

NET START OracleServiceORCL
LSNRCTL START

一切正常.但是现在我发现这失败了:

Everything works fine. But now I found this failed:

C:\bin>LSNRCTL START

LSNRCTL for 64-bit Windows: Version 11.2.0.1.0 - Production on 08-NOV-2017 11:02:52

Copyright (c) 1991, 2010, Oracle.  All rights reserved.

Starting tnslsnr: please wait...

TNSLSNR for 64-bit Windows: Version 11.2.0.1.0 - Production
System parameter file is C:\admin\listener.ora
Log messages written to c:\alert\log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1521ipc)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for 64-bit Windows: Version 11.2.0.1.0 - Production
Start Date                08-NOV-2017 11:02:55
Uptime                    0 days 0 hr. 0 min. 3 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   C:\admin\listener.ora
Listener Log File         c:\alert\log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1521ipc)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))
Services Summary...
Service "CLRExtProc" has 1 instance(s).
  Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully

我必须像这样手动启动数据库:

I have to manually startup database like this:

C:\bin>sqlplus system/manager as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Wed Nov 8 11:04:59 2017

Copyright (c) 1982, 2010, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> startup
ORACLE instance started.

Total System Global Area 3407261696 bytes
Fixed Size                  2180504 bytes
Variable Size            2097154664 bytes
Database Buffers         1291845632 bytes
Redo Buffers               16080896 bytes
Database mounted.
Database opened.

有人可以告诉我什么可能导致脚本停止运行吗?

Can anybody tell me what may cause the script stops working please?

推荐答案

我认为您的问题是由于您的DB_NAMEORACLE_SID的长度所致.

I think your problem is due to length of your DB_NAME and ORACLE_SID.

发出启动命令后,查询以下内容:

After you issue startup command, query for these :

select name from v$database;  -- gives you DB_NAME
select instance_name from v$instance;

DB_NAME的长度限制为 8 个字符.

The length of DB_NAME is limited to 8 characters.

INSTANCE_NAME默认为ORACLE_SID. (在DOS提示符下,您可能会看到 ORACLE_SID正在发出echo %ORACLE_SID%命令(如果之前已设置) Oracle文档未指定INSTANCE_NAME长度的限制. 但是,如果您描述V$INSTANCE视图,则可以看到该列 INSTANCE_NAME具有VARCHAR2(16),表示限制为16 字符.

INSTANCE_NAME defaults to ORACLE_SID. (From DOS prompt you may see ORACLE_SID be issuing echo %ORACLE_SID% command, if set before) Oracle document does not specify the limit for INSTANCE_NAME length. However if you describe V$INSTANCE view you can see that column INSTANCE_NAME has VARCHAR2(16), indicating the limit of 16 characters.

由于INSTANCE_NAME默认为ORACLE_SID,因此您需要 创建数据库之前,在决定SID时要格外小心. 单个 实例数据库的长度也应为 8 .所以 保持DB_NAMEINSTANCE_NAMEORACLE_SID的长度 超过 8 个字符,我建议您保留三个名称 它们是相同的,并且不要忘记ORACLE_SID可以包含 只有字符a-z,A-Z和0-9.

Because INSTANCE_NAME defaults to ORACLE_SID you need to be careful when deciding SID before creating a database. For a single instance database ORACLE_SID's length should be 8, also. So keep your DB_NAME, INSTANCE_NAME and ORACLE_SID's lengths not more than 8 characters, and i recommend you keep names three of them are the same, and don't forget that the ORACLE_SID can contain only the characters a-z, A-Z, and 0-9.

似乎INSTANCE_NAME& DB_NAME长度为 10 CLRExtProc .重新安装名称最多为 8 个字符的数据库.

It seems INSTANCE_NAME & DB_NAME are CLRExtProc of length 10, in your case. Re-install db with a name upto 8 characters.

这篇关于Oracle 11.2 Windows无法用两行启动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆