该文章来自Oracle 透明网关安装方便的帮助文档,在这里需要注意,连接sql server2000时,请确认你的sql server2000已经打好SP3,SP4补丁,我因为没打这两个补丁折腾了一个晚上,总是提示sa用户不能登录。
After installing the gateway, perform the following tasks to configure Oracle Database Gateway for SQL Server:
Configure the Gateway Initialization Parameter File
Perform the following tasks to configure the gateway initialization parameter file:
Choose a System Identifier for the Gateway
The gateway system identifier (SID) is an alphanumeric character string that identifies a gateway instance. You need one gateway instance, and therefore one gateway SID, for each SQL Server database you are accessing. The SID is used as part of the file name for the initialization parameter file. The default SID is dg4msql
.
You can define a gateway SID, but using the default of dg4msql
is easier because you do not need to change the initialization parameter file name. However, if you want to access two SQL Server databases, you need two gateway SIDs, one for each instance of the gateway. If you have only one SQL Server database and want to access it sometimes with one set of gateway parameter settings, and other times with different gateway parameter settings, then you will need multiple gateway SIDs for the single SQL Server database.
Customize the Initialization Parameter File
The initialization parameter file must be available when the gateway is started. During installation, the following default initialization parameter file is created:
ORACLE_HOME\dg4msql\admin\initdg4msql.ora
Where ORACLE_HOME
is the directory under which the gateway is installed.
This initialization file is for the default gateway SID. If you are not using dg4msql
as the gateway SID, you must rename the initialization parameter file using the SID you chose in the preceding step "Choose a System Identifier for the Gateway". This default initialization parameter file is sufficient for starting the gateway, verifying a successful installation, and running the demonstration scripts.
A number of initialization parameters can be used to modify the gateway behavior. Refer to Appendix C, "Initialization Parameters" for the complete list of initialization parameters that can be set. Changes made to the initialization parameters only take effect in the next gateway session. The most important parameter is the HS_FDS_CONNECT_INFO
which describes the connection to the non-Oracle system.
The default initialization parameter file already has an entry for this parameter. The syntax for HS_FDS_CONNECT_INFO
is as follows:
HS_FDS_CONNECT_INFO= host_name/[instance_name][/database_name]
Where:
Variable | Description |
---|---|
host_name |
is the host name or IP address of the machine hosting the SQL Server database. |
instance_name |
is the instance of SQL Server running on the machine. |
database_name |
is the SQL Server Database database name. |
Both instance_name
and database_name
are optional. If instance_name
is omitted and database_name
is provided, the slash (/
) is required. This can be shown as follows:
HS_FDS_CONNECT_INFO= host_name//database_name
See Also:
Appendix C, "Initialization Parameters" and Oracle Database Heterogeneous Connectivity Administrator's Guide for more information about customizing the initialization parameter file.