透明网关配置总结
透明 网关 配置 总结 最近因为工作中用到 透明 网关,在网上查到了一堆相关 配置 的文档,但是跟我的实际情况都有些差异, 总结 如下: 一.参数 oracle server : 138.20.1.1 (oracle9i AIX) tansparent gateway: 138.20.1.2(windows 2003) sqlserver:138.20.
透明网关配置总结
最近因为工作中用到透明网关,在网上查到了一堆相关配置的文档,但是跟我的实际情况都有些差异,总结如下:
一.参数
oracle server : 138.20.1.1 (oracle9i AIX)
tansparent gateway: 138.20.1.2(windows 2003)
sqlserver:138.20.1.4
sqlserver db name: ufdata_260_2009(sqlserver2k)
二.tansparent gateway机器配置
1.安装transparent gateway for sqlserver,只有windows版本
2.在$ORACLE_HOME/tg4msql/admin/下增加透明网关指向文件
inittg4msql260.ora,内容如下:
#
# HS init parameters
#
HS_FDS_CONNECT_INFO="SERVER=138.20.1.4;DATABASE=UFDATA_260_2009"
HS_FDS_TRACE_LEVEL=OFF
HS_FDS_RECOVERY_ACCOUNT=RECOVER
HS_FDS_RECOVERY_PWD=RECOVER
注意inittg4msql260.ora命名规则,init+侦听名
本例侦听是tg4mssql260,必须与后面的侦听文件配置的一致。
3.在$ORACLE_HOME/network/admin/下修改侦听:
listener.ora,内容如下:
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = E:\oracle\ora92)
(PROGRAM = extproc)
)
(SID_DESC =
(SID_NAME = tg4msql260 )
(ORACLE_HOME = e:\oracle\ora92)
(PROGRAM = tg4msql )
)
)
4.重新启动透明网关所在机器的侦听
lsnrctl stop
lsnrctl start
三、oracle server配置
1.修改$ORACLE_HOME/network/admin/tnsnames.ora文件;
指向的透明网关所在机器
内容如下:
INFODB =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 138.20.1.1)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = infodb)
)
)
sqlserver260 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 138.20.1.2)(PORT = 1521))
)
(CONNECT_DATA =
(SID = tg4msql260 )
)
(HS = ok )
)
2.建立链接数据库
drop database link mssql260;
create database link mssql260 connect to oracle identified by lion1 using 'sqlserver260';
3.测试
select * from dbo.table@mssql260;
四、sqlserver 配置
新增recover用户,建立recover相关表
具体见脚本create_user_sqlserver.sql
sp_addlogin 'RECOVER','RECOVER','master'
go
use master
go
exec sp_grantdbaccess N'RECOVER', N'RECOVER'
go
exec sp_addrolemember N'db_owner', N'RECOVER'
go
use ufdata_260_2009
go
exec sp_grantdbaccess N'RECOVER', N'RECOVER'
go
exec sp_addrolemember N'db_owner', N'RECOVER'
go
use ufdata_260_2009
go
DROP TABLE HS_TRANSACTION_LOG
go
CREATE TABLE HS_TRANSACTION_LOG(
GLOBAL_TRAN_ID char (64) NOT NULL,
TRAN_COMMENT char (255) NULL
)
go
五、总结
1.透明网关目前只有Windows版本,所以本案例特意增加了一台Windows机器,运行透明网关服务,这个机器上必须保证侦听开启;
2.sqlserver里建立recover用户及相关表,主要是为了解决sqlserver锁表的问题;实际应用时,我查了主要跟2阶段提交有关;
=============end===============

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Title: How to correctly configure Git in PyCharm In modern software development, the version control system is a very important tool, and Git, as one of the popular version control systems, provides developers with powerful functions and flexible operations. As a powerful Python integrated development environment, PyCharm comes with support for Git, allowing developers to manage code versions more conveniently. This article will introduce how to correctly configure Git in PyCharm to facilitate better development during the development process.

Title: The working principle and configuration method of GDM in Linux systems In Linux operating systems, GDM (GNOMEDisplayManager) is a common display manager used to control graphical user interface (GUI) login and user session management. This article will introduce the working principle and configuration method of GDM, as well as provide specific code examples. 1. Working principle of GDM GDM is the display manager in the GNOME desktop environment. It is responsible for starting the X server and providing the login interface. The user enters

PyCharm is a powerful integrated development environment (IDE), and PyTorch is a popular open source framework in the field of deep learning. In the field of machine learning and deep learning, using PyCharm and PyTorch for development can greatly improve development efficiency and code quality. This article will introduce in detail how to install and configure PyTorch in PyCharm, and attach specific code examples to help readers better utilize the powerful functions of these two. Step 1: Install PyCharm and Python

Understanding Linux Bashrc: Function, Configuration and Usage In Linux systems, Bashrc (BourneAgainShellruncommands) is a very important configuration file, which contains various commands and settings that are automatically run when the system starts. The Bashrc file is usually located in the user's home directory and is a hidden file. Its function is to customize the Bashshell environment for the user. 1. Bashrc function setting environment

The network cannot ping, what's going on? In fact, this is a very common problem. It is mainly divided into two situations: pinging fails on the same network segment and pinging fails on different network segments. Let’s take a look at the details below. There are usually two reasons why the ping command cannot connect to the same network segment: one is an IP address that cannot be pinged in the same network segment, and the other is an IP address that cannot be pinged in a different network segment. These two situations have different solutions. First, let’s discuss the situation where ping fails within the same network segment. 1. Ping fails on the same network segment, and the result is "Unable to access the target host." The destination IP and source IP are on the same network segment, and the ping result is &l

MyBatisGenerator is a code generation tool officially provided by MyBatis, which can help developers quickly generate JavaBeans, Mapper interfaces and XML mapping files that conform to the database table structure. In the process of using MyBatisGenerator for code generation, the setting of configuration parameters is crucial. This article will start from the perspective of configuration parameters and deeply explore the functions of MyBatisGenerator.

How to configure a workgroup in Win11 A workgroup is a way to connect multiple computers in a local area network, which allows files, printers, and other resources to be shared between computers. In Win11 system, configuring a workgroup is very simple, just follow the steps below. Step 1: Open the "Settings" application. First, click the "Start" button of the Win11 system, and then select the "Settings" application in the pop-up menu. You can also use the shortcut "Win+I" to open "Settings". Step 2: Select "System" In the Settings app, you will see multiple options. Please click the "System" option to enter the system settings page. Step 3: Select "About" In the "System" settings page, you will see multiple sub-options. Please click

Summary of the system() function under Linux In the Linux system, the system() function is a very commonly used function, which can be used to execute command line commands. This article will introduce the system() function in detail and provide some specific code examples. 1. Basic usage of the system() function. The declaration of the system() function is as follows: intsystem(constchar*command); where the command parameter is a character.
