The basis of this blog post operation is that a separate dblink has been created through the gateway to access the sqlserver database.
Specific operations can be viewed by opening the following link:
https://blog.csdn.net/qq_37823979/article/details/106207903
Configure the dblink that creates multiple sqlserver data sources based on the above.
The next demonstration is to configure two more data sources.
First enter the ORACLE_HOME\dg4msql\admin folder,
Copy the dg4msql file in two copies and name them initdg4msql2.ora and initdg4msql3.ora
Then go in to modify the ip address and database name port number,
initdg4msql.ora: HS_FDS_CONNECT_INFO=IP address: 143//MSSQLSERVER/dataportal
initdg4msql2.ora: HS_FDS_CONNECT_INFO=IP address:1433//MSSQLSERVER/QZGX_QX_2018
initdg4msql3.ora: HS_FDS_CONNECT_INFO=IP address: 143//MSSQLSERVER/QZGX_QX
Then go to configure oracle monitoring
Go to the ORACLE_HOME\network\admin directory
Modify the listener.ora file
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = E:\app\Administrator\product\12.2.0\dbhome_1)
(PROGRAM = extproc)
(ENVS = "EXTPROC_DLLS=ONLY:E:\app\Administrator\product\12.2.0\dbhome_1\bin\oraclr12.dll")
)
(SID_DESC=
(SID_NAME=dg4msql)
(ORACLE_HOME=E:\app\Administrator\product\12.2.0\dbhome_1)
(PROGRAM=dg4msql)
)
(SID_DESC=
(SID_NAME=dg4msql2)
(ORACLE_HOME=E:\app\Administrator\product\12.2.0\dbhome_1)
(PROGRAM=dg4msql)
)
(SID_DESC=
(SID_NAME=dg4msql3)
(ORACLE_HOME=E:\app\Administrator\product\12.2.0\dbhome_1)
(PROGRAM=dg4msql)
)
)
Two new monitoring instances are added on the original basis.
Then open the tnsnames.ora file and add the following content to the tnsnames.ora file.
dg4msql2 =
(DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521))
(CONNECT_DATA=(SID=dg4msql2))
(HS=OK)
)
dg4msql3 =
(DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521))
(CONNECT_DATA=(SID=dg4msql3))
(HS=OK)
)
At this point, the configuration is complete, and then restart the monitor. There are several ways to restart the monitor.
The simplest is win+r-->cmd-->lsnrctl stop -->lsnrctl start -->lsnrctl status
After execution, there will be two newly configured instances of dg4msql2 and dg4msql3.
Then create dblink by command
create PUBLIC database link TOQZGX_QX_2018 connect to "sa" identified by "111111" using 'dg4msql' ;
SELECT * FROM gs_etps_info@TOQZGX_QX_2018;
So far, the multi-data source dblink has been created.