同一個主機的同一個數(shù)據(jù)庫,只能有一個監(jiān)聽器,我們所配置多個監(jiān)聽器時,它會監(jiān)聽另外一臺主機上的數(shù)據(jù)庫,但這樣性能不好。
listener.ora配置文件講解:
監(jiān)聽器部分:
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS=(PROTOCOL = IPC) (KEY=EXTPRO1))
(ADDRESS=(PROTOCOL = TCP)(HOST = 192.168.2.29)(PORT = 1521))
)
)
數(shù)據(jù)庫配置部分:
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = orcl.localdomain)
(ORACLE_HOME = /opt/oracle/product/11.2.0/dbhome_1)
(SID_NAME = orcl )
)
)
tnsname.ora配置文件
test =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.2.29)(PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = orcl.localdomain)
)
service_name 默認就是global_name.
查詢global_name
select * from global_name;
修改global_name
alter database rename global_name to orcl;
update global_name set global_name = 'orcl';
commit;
但是修改了、global_name并不會默認改掉server_name,也不會默認修改db_domain;
因此修改db_domain
alter system set db_domain='' scope=spfile;
成都創(chuàng)新互聯(lián)公司是專業(yè)的玉田網(wǎng)站建設(shè)公司,玉田接單;提供成都網(wǎng)站設(shè)計、做網(wǎng)站,網(wǎng)頁設(shè)計,網(wǎng)站設(shè)計,建網(wǎng)站,PHP網(wǎng)站建設(shè)等專業(yè)做網(wǎng)站服務(wù);采用PHP框架,可快速的進行玉田網(wǎng)站開發(fā)網(wǎng)頁制作和功能擴展;專業(yè)做搜索引擎喜愛的網(wǎng)站,專業(yè)的做網(wǎng)站團隊,希望更多企業(yè)前來合作!