1.找到oracle的安裝目錄D:\Soft\oracle\product\10.1.0\Db_1\NETWORK\ADMIN這個文件夾下的tnsnames.ora
2.修改ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 20110315-1621)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)
zlm =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 123.123.123.123)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
注:其中123.123.123.123是你要連接的服務器的地址
3.然後使用vs的GridView綁定數據源
注:這裡的zlm要和上面的新建的oracle的名字一樣