Oracle学习笔记之第七节共享专用服务器配置及案例

前端之家收集整理的这篇文章主要介绍了Oracle学习笔记之第七节共享专用服务器配置及案例前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

select * from v_$circuit;查看逻辑回路,共享服务器连接,使用easy connect就会有显示

select * from v_$dispatcher; 一般配置三个

sqlplus 中操作

show parameter dispa

alter system set dispatchers='(PROTOCOL=TCP) (dispatchers=3)'; 这个负责端盘子

alter system set shared_servers=3; 这个负责做菜

show parameter max_dis max_shared这两个也需要配置下

lsnrctl services 就可以认识到

vim tnsnames.ora

SORCL55 =

(DESCRIPTION =

(ADDRESS_LIST =

(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.55)(PORT = 1522))

)

(CONNECT_DATA =

(SERVER = shared) #共享服务器连接,但是这个很慢

(SERVICE_NAME = orcl.example.com)

)

)

s物理视图连接会话


不让1521不能进行共享服务器连接,其他的可以

vim tnsnames.ora

ONLY1521 =

(DESCRIPTION =

(ADDRESS = (PROTOCOL = TCP)(HOST = station55.example.com)(PORT = 1521))


)

alter system set dispatchers='(PROTOCOL=TCP) (dispatchers=3)(listener=ONLY1521)';

lsnrctl services l2 就没有共享服务器连接了,只有1521端口可以连接

然后进行连接测试,做好tns后会提示12520 TNS error之类4

在win上的实验

cmd

set ORACLE_SID=orcl

conn /as sysdba

show parameter db_name

show parameter service

conn hr/hr

alter user hr identified by hr account unlock;解锁HR用户

select salary from employees where employee_id=100;

接下来做数据库链,先去做tns

vim tnsnames.ora

ORCL244 =

(DESCRIPTION =

(ADDRESS_LIST =

(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.244)(PORT = 1521))

)

(CONNECT_DATA =

(SERVER = DEDICATED)

(SERVICE_NAME = orcl.example.com)

)

)

sqlplus /nolog

conn hr/oracle_4U 对等

conn system/oracle_4U 不对等

create database link dblink1 connect to hr identified by hr using 'ORCL244';创建数据库

select salary from hr.employees@dblink1 where employee_id=100;

update hr.employees@dblink1 set salary=8888 where employee_id=100;

commit;

然后在去windown上看数据是否被改

猜你在找的Oracle相关文章