如果global_name為flase的情況下,如下步驟:
1.配置 listener
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME =sid1)
(ORACLE_HOME = D:oracleora10g)
(SID_NAME = sid1)
)
(SID_DESC =
(PROGRAM = hsodbc)
(SID_NAME = SQL Server_SID)
(ORACLE_HOME = d:oracleora10g)
)
)
LISTENER =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
)
注意紅色的與藍色的地方;
2.配置tnsnames.ora:
增加如下的一個tnsname:
test01 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = SQL Server_SID)
)
(HS = OK)
)
注意紅色的地方;
3.增加初始化文件:
在 %oracle_home%hsadmin下,創建一個以 init.ora 文件,內容如下:
HS_FDS_CONNECT_INFO=SQL Server_SID
HS_FDS_TRACE_LEVEL=OFF
4.重新啟動 listener
5.create public database link link_name connect to user identified by ****** using 'test01';
6.這樣就可以了。
說明:
(1). SQL Server_SID 為創建的訪問 SQL Server 的 odbc 的名稱;
(2). listener 中的program 為什麼要用 hsodbc,還沒有分析出來;
(3). 其他的與 9i 的基本上沒有什麼區別
[@more@]
1.配置 listener
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME =sid1)
(ORACLE_HOME = D:oracleora10g)
(SID_NAME = sid1)
)
(SID_DESC =
(PROGRAM = hsodbc)
(SID_NAME = SQL Server_SID)
(ORACLE_HOME = d:oracleora10g)
)
)
LISTENER =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
)
注意紅色的與藍色的地方;
2.配置tnsnames.ora:
增加如下的一個tnsname:
test01 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = SQL Server_SID)
)
(HS = OK)
)
注意紅色的地方;
3.增加初始化文件:
在 %oracle_home%hsadmin下,創建一個以 init.ora 文件,內容如下:
HS_FDS_CONNECT_INFO=SQL Server_SID
HS_FDS_TRACE_LEVEL=OFF
4.重新啟動 listener
5.create public database link link_name connect to user identified by ****** using 'test01';
6.這樣就可以了。
說明:
(1). SQL Server_SID 為創建的訪問 SQL Server 的 odbc 的名稱;
(2). listener 中的program 為什麼要用 hsodbc,還沒有分析出來;
(3). 其他的與 9i 的基本上沒有什麼區別
[@more@]
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/11990/viewspace-779456/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/11990/viewspace-779456/