æ¹æ³/æ¥éª¤
1
é¦å
æå¼çµèï¼å°pl/sqlå®è£
çæå®ç®å½ãD:\app\DZL\product\11.2.0\dbhome_1\NETWORK\ADMINãæ¾å°ãtnsnames.oraã
2
æå¼ãtnsnames.oraãæ件ï¼å¢å ä½ éè¦è¿ç¨è¿æ¥çå符串ã
3
ç¹å«å¯¹é¨åéè¦å段说æï¼
myDB为è¿æ¥æ°æ®åºå«åHOST = 192.168.7.23ä¸ºä½ è¿æ¥çæ°æ®åºipPORT = 1521 ä¸ºä½ æ°æ®ç端å£SERVICE_NAME = testdb ä¸ºä½ æ°æ®åºå®ä¾å
4
设置好åï¼æå¼ãPL/SQL Developerãè¾å
¥ç¨æ·åå¯ç ï¼éæ©ååä½ æ·»å çæ°æ®åºï¼ç¹å»ç¡®å®å°±å¯ä»¥æåè¿æ¥è¿ç¨æ°æ®åºäºã
5
å·²æåè¿æ¥è¿ç¨æ°æ®åºã
6
è¿
个æ¯C#å¨å¡«åè¿æ¥æ°æ®åºçå符串ã<add name="statistics"
connectionString="Provider=OraOLEDB.Oracle.1;Data
Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)
(HOST=172.22.210.55)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=ORCL)));Persist Security Info=True;User ID=dzl;
Unicode=True;Password=123456" />ã
温馨提示:内容为网友见解,仅供参考