您好,登錄后才能下訂單哦!
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上看數據是否被改
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。