oracle configuration type,oracle初体验二 Oracle Net Configuration Assistant的使用

上期中创建完数据库实例,但是最后使用em访问数据库实例的时候出现了一个问题?

Enterprise Manager 无法连接到数据库实例。下面列出了组件的状态。

回答上面的问题请看以下oracle的结构:

677aa783e5dc0ea68b8116af8ea51aaa.png

客户使用浏览器通过EM的1158端口访问EM,EM通过监听访问oracle数据库实例,上节中我们通过数据库配置助手(Database Configuraion Assistant)创建了数据库实例,但我们还没有创建监听.所以就出现了上节最后提出的问题.这节中我们将通过oracle网络配置助手(Oracle Net Configuration Assistant) 完成Listener创建[oracle@Orcl db_1]$ netca

fb3a24141b996f0a69a826e2f3a0a469.png

Oracle Net Configuration Assistant(oracle网络配置助手的第一个页面)监听程序配置  下一步

ef7138d655fd79673ac9a60785c23e5c.png

添加 下一步

1b481c9ab1aa52ab1139080b1127d851.png

下一步

5b53ff63c22ef78defb1fa984c7a7cf0.png

下一步

4403be7adc80597f954e69c585b4e0da.png

使用标准端口号1521下一步

7238a71e4e67644f9dc52478ec57dd02.png

否下一步

dca079c2678843a15db0d61d3e4f8b92.png

下一步

f3a890c34880b352c597ccac5be95abe.png

配置完监听以后还需要配置  本地Net服务名配置  下一步

0e5cea91a143e808c84561bee2e5815d.png

下一步

f515a16f308679d79cf1f4b93849a697.png

服务名 和数据库的实例名一样  下一步

0da398b19565d654e53bd2555c5053e8.png

选择TCP下一步

66dacbab73b1282601e175d653efa927.png

主机名  本机ip 下一步

de18b4890ac998cca7af85cf0322a9f7.png

不,不进行测试  下一步

903f010a26f58b086515abc0c4624eb8.png

网络服务名 数据库实例名  下一步

f971f934691c953019afa648aaa4e215.png

下一步

a81e4cd04a367caa8c1207c995ebc518.png

下一步

bc167d56a2ed0ebc7be604bf745d1d90.png

完成

验证配置成功以否:

[oracle@Orcl db_1]$ lsnrctl status

LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 19-DEC-2014 23:31:06

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=Orcl)(PORT=1521)))

STATUS of the LISTENER

------------------------

Alias                     LISTENER

Version                   TNSLSNR for Linux: Version 10.2.0.1.0 - Production

Start Date                19-DEC-2014 23:09:11

Uptime                    0 days 0 hr. 21 min. 55 sec

Trace Level               off

Security                  ON: Local OS Authentication

SNMP                      OFF

Listener Parameter File   /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora

Listener Log File         /u01/app/oracle/product/10.2.0/db_1/network/log/listener.log

Listening Endpoints Summary...

(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=Orcl)(PORT=1521)))

(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC0)))

Services Summary...

Service "Orcl" has 1 instance(s).

Instance "Orcl", status READY, has 1handler(s) for this service...

Service "OrclXDB" has 1 instance(s).

Instance "Orcl", status READY, has 1 handler(s) for this service...

Service "Orcl_XPT" has 1 instance(s).

Instance "Orcl", status READY, has 1 handler(s) for this service...

Service "PLSExtProc" has 1 instance(s).

Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...

The command completed successfully

命令结果中如果有以下行出现说明 配置成功:Instance "Orcl", status READY, has 1 handler(s) for this service...

监听管理命令[oracle@Orcl db_1]$ lsnrctl

LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 19-DEC-2014 23:36:57

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

Welcome to LSNRCTL, type "help" for information.

LSNRCTL> help

The following operations are available

An asterisk (*) denotes a modifier or extended command:

start               stop                status

services            version             reload

save_config         trace               spawn

change_password     quit                exit

set*                show*

实验  如果监听没有识别到数据库实例,的解决办法

先使用lsnrctl stop 停止监听:[oracle@Orcl ~]$ lsnrctl stop

LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 22-DEC-2014 09:36:11

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=Orcl)(PORT=1521)))

The command completed successfully

接着使用lsnrctl start 启动监听:[oracle@Orcl ~]$ lsnrctl start

LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 22-DEC-2014 09:42:38

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

Starting /u01/app/oracle/product/10.2.0/db_1/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 10.2.0.1.0 - Production

System parameter file is /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora

Log messages written to /u01/app/oracle/product/10.2.0/db_1/network/log/listener.log

Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=Orcl)(PORT=1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=Orcl)(PORT=1521)))

STATUS of the LISTENER

------------------------

Alias                     LISTENER

Version                   TNSLSNR for Linux: Version 10.2.0.1.0 - Production

Start Date                22-DEC-2014 09:42:38

Uptime                    0 days 0 hr. 0 min. 0 sec

Trace Level               off

Security                  ON: Local OS Authentication

SNMP                      OFF

Listener Parameter File   /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora

Listener Log File         /u01/app/oracle/product/10.2.0/db_1/network/log/listener.log

Listening Endpoints Summary...

(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=Orcl)(PORT=1521)))

Services Summary...

Service "PLSExtProc" has 1 instance(s).

Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...

The command completed successfully

使用lsnrctl status 查看监听状态:可以看到监听程序并没有识别的oracle数据库实例(但时间一长就可以自动识别得到)[oracle@Orcl ~]$ lsnrctl status

LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 22-DEC-2014 09:43:01

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=Orcl)(PORT=1521)))

STATUS of the LISTENER

------------------------

Alias                     LISTENER

Version                   TNSLSNR for Linux: Version 10.2.0.1.0 - Production

Start Date                22-DEC-2014 09:42:38

Uptime                    0 days 0 hr. 0 min. 23 sec

Trace Level               off

Security                  ON: Local OS Authentication

SNMP                      OFF

Listener Parameter File   /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora

Listener Log File         /u01/app/oracle/product/10.2.0/db_1/network/log/listener.log

Listening Endpoints Summary...

(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=Orcl)(PORT=1521)))

Services Summary...

Service "PLSExtProc" has 1 instance(s).

Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...

The command completed successfully

可以看到监听并没有ready

进入以下命令以后:

[oracle@Orcl ~]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Mon Dec 22 09:38:49 2014

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

Connected to:

Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production

With the Partitioning, OLAP and Data Mining options

SQL> alter system register;

System altered.

SQL> exit

再次查看监听状态,可以看到监听已经ready了:[oracle@Orcl ~]$ lsnrctl status

LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 22-DEC-2014 09:43:37

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=Orcl)(PORT=1521)))

STATUS of the LISTENER

------------------------

Alias                     LISTENER

Version                   TNSLSNR for Linux: Version 10.2.0.1.0 - Production

Start Date                22-DEC-2014 09:42:38

Uptime                    0 days 0 hr. 0 min. 59 sec

Trace Level               off

Security                  ON: Local OS Authentication

SNMP                      OFF

Listener Parameter File   /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora

Listener Log File         /u01/app/oracle/product/10.2.0/db_1/network/log/listener.log

Listening Endpoints Summary...

(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=Orcl)(PORT=1521)))

Services Summary...

Service "Orcl" has 1 instance(s).

Instance "scott", status READY, has 1 handler(s) for this service...

Service "OrclXDB" has 1 instance(s).

Instance "scott", status READY, has 1 handler(s) for this service...

Service "Orcl_XPT" has 1 instance(s).

Instance "scott", status READY, has 1 handler(s) for this service...

Service "PLSExtProc" has 1 instance(s).

Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...

The command completed successfully

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值