免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1649 | 回复: 0
打印 上一主题 下一主题

easy TCP network configuration [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2005-02-27 09:31 |只看该作者 |倒序浏览
It's so easy that no configuration is needed, at least from server side

1) make sure the database and the listener are all down. create an empty
   admin directory

$ env | grep TNS
$ cd $ORACLE_HOME/network
$ mv admin admin.save
$ mkdir admin

2) startup the default listener with no configuration file

$ lsnrctl start

.....
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=suse8.home.net)(PORT=1521)))
.....

3) the listener knows no database services at this time

$ lsnrctl services

.....
Connecting to (ADDRESS=(PROTOCOL=tcp)(PORT=1521))
The listener supports no services
.....

4) startup the database instance

$ sqlplus '/ as sysdba'
SQL>; startup
SQL>; show parameter db_name
SQL>; show parameter db_domain
SQL>; exit

5) the database instance should have registered itself to the listener
   note: the service name is "db_name + db_domain"

$ lsnrctl services
.....
Service "db920.home.net" has 1 instance(s).
  Instance "db920", status READY, has 1 handler(s) for this service...
.....

6) add an entry in $ORACLE_HOME/network/admin/tnsnames.ora
   on all of the clients that want to connect to the database. Note
    you will only to modify HOST and SERVICE_NAME returned before

mis = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = suse8.home.net)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = db920.home.net)))

7) test database connection

$ tnsping mis

you can not startup the database remotely through the listener
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP