如何修改 service_name
原有環境:
sid: mynewdb
global_name:mynewdb
service_names: mynewdb
db_domain :
db_name:mynewdb
需要修改後如下:
global_name:mynewdb
service_names: test
db_domain :
db_name:mynewdb
伺服器端:
alter system set service_names='test';
這裡採用靜態註冊,同時還要修改下 listener.ora
sid_list_listener =
(sid_list =
(sid_desc =
(sid_name = pl***tproc)
(oracle_home =/u01/app/oracle/product/11.2.0/dbhome_1)
(program = extproc)
)(sid_desc=
(global_dbname = mynewdb)
(oralce_home = /u01/app/oracle/product/11.2.0/dbhome_1)
(sid_name = mynewdb)
)(sid_desc=
(global_dbname = test) -------這個是需要新增
(oralce_home = /u01/app/oracle/product/11.2.0/dbhome_1)
(sid_name = mynewdb) ------這個還是原來的例項名
))lsnrctl reload
檢視監聽狀態:
lsnrctl> status
connecting to (description=(address=(protocol=tcp)(host=10.80.11.202)(port=1521)))
status of the listener
------------------------
alias listener
version tnslsnr for linux: version 11.2.0.1.0 - production
start date 21-nov-2013 00:09:35
uptime 0 days 20 hr. 30 min. 55 sec
trace level off
security on: local os authentication
snmp off
listener parameter file /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
listener log file /u01/app/oracle/diag/tnslsnr/oracle11g/listener/alert/log.xml
listening endpoints summary...
(description=(address=(protocol=tcp)(host=10.80.11.202)(port=1521)))
services summary...
service "pl***tproc" has 1 instance(s).
instance "pl***tproc", status unknown, has 1 handler(s) for this service...
service "mynewdb" has 1 instance(s).
instance "mynewdb", status unknown, has 1 handler(s) for this service...
service "test" has 1 instance(s).
instance "mynewdb", status unknown, has 1 handler(s) for this service...
the command completed successfully
可以看到新的 service "test" 已經可以使用了
客戶端配置:
net manager 配置 服務名為 test ,ip為資料庫伺服器主機ip,相應埠。
測試連線:
sql> conn sys/oracle@test as sysdba
已連線。
sql>
當然不使用靜態註冊,動態註冊也可以,
ok,測試完成。
修改 新增 service name
1.db name 資料庫名稱,資料庫建立好後不可以修改,除非使用nid 9i之後的版本 更改.2.oracle sid 資料庫例項名稱,同乙個db name可以對應多個oracle sid,資料庫建立好後會自動在 oracle home dbs建立init oracle sid,orapw ora...
SID與SERVICE NAME的區別
oracle中sid標記整個資料庫管理系統例項,service name標記某一資料庫 aioss72 description address list address protocol tcp host 132.149.7.2 port 1521 connect data service name...
如何修改hosts
上網找了一些簡單的方法 修改host命令,總結如下。方法一 直接修改 1.開啟終端,修改hosts檔案許可權 sudo chmod 777 etc hosts 常用修改許可權的命令 首先要進入所在資料夾 sudo chmod 600 只有所有者有讀和寫的許可權 sudo chmod 644 所有者有...