首页 | 论坛 | Linux | 博客 | 下载 | 人才 | 培训 | WIKI | 手册 | 图书 | 搜索  
ChinaUnix.net » Oracle » oracle9.2.0.4 通过透明网关访问DB2问题?

2004-11-10 20:34 wzhq_0704
oracle9.2.0.4 通过透明网关访问DB2问题?

在本机台装有ora92(Sid=ora92),ibm DB2 UDB(数据库名Sample),通过oracle透明网关连接DB2,以下是我通过透明网关连接DB2 数据库的设置 。不知道为什么数据链接可以建立,但是不能访问其中的表

listener.ora
======================================
# LISTENER.ORA Network Configuration File: D:\oracle\ora92\NETWORK\ADMIN\listener.ora
# Generated by Oracle configuration tools.

LISTENER =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = yagoo-wzhq)(PORT = 1521))
  )

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
              (GLOBAL_DBNAME = ora92)
              (ORACLE_HOME = d:\oracle\ora92)
              (SID_NAME = ora92)
    )
    (SID_DESC = (SID_NAME=Sample)
                (ORACLE_HOME=D:\oracle\ora92)
                (PROGRAM=tg4drda)
      )
  )


tnsnames.ora
==========================================
# TNSNAMES.ORA Network Configuration File: D:\oracle\ora92\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.

TPSSC =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 10.0.0.22)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = nivos)
    )
  )

ORA92 =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = yagoo-wzhq)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = ora92)
    )
  )

JTXM =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 10.0.0.136)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = ORA92)
    )
  )

Sample =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 10.0.0.136)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = Sample)
    )
    (HS = OK)
   
  )




initsample.ora
==============================================
############################################################################
#                                                                          #
#                    SAMPLE init.ora file for DB2/UDB                      #
#                                                                          #
############################################################################
# Trace Parameters
# Setting up the gateway in trace mode will have adverse effects on performance.
# TRACE_LEVEL: Default: 0
# 0 for no tracing, 255 for full tracing.
#TRACE_LEVEL=255

# LOG_DESTINATION: Default: $ORACLE_HOME/tg4drda/log/gatewaysid_pid.log
# $ORACLE_HOME/tg4drda/log. If this
# destination is correct, enter the trace file desired. If this destination is
# not correct, enter the entire path name and file name.
#LOG_DESTINATION=DB2UDB.log

# ORACLE_DRDA_TCTL: Default: none
# Default destination is $ORACLE_HOME/tg4drda/admin. If this
# destination is correct, enter the debug file name desired. If this
# destination is not correct, enter the entire path name and debug file name.
# Sample is located in $ORACLE_HOME/tg4drda/admin/debug.tctl
#ORACLE_DRDA_TCTL=debug.tctl

# ORACLE_DRDA_TRACE: Default: value specified by LOG_DESTINATION
# Parameter is used to specify a different log patch for DRDA internal tracing.
#ORACLE_DRDA_TRACE=/oracle/tg4drda/mylog/mydrda.log

# Hetergeneous Services Parameters
# Refer to Oracle9i Hetergeneous Connectivity Administrator's Guide for more
# detailed information

# HS_COMMIT_POINT_STRENGTH: Default: 0
# Parameter is important only if the non-Oracle system can participate in two-
# phase commit.
HS_COMMIT_POINT_STRENGTH=255

# HS_NLS_DATE_FORMAT=YYYY-MM-DD: Default: Determined by HS_LANGUAGE
HS_NLS_DATE_FORMAT=YYYY-MM-DD

# HS_LANGUAGE: Default: System Specific
HS_LANGUAGE=AMERICAN_AMERICA.WE8ISO8859P1

# HS_RPC_FETCH_REBLOCKING: Default: ON
# Controls whether HS attempts to optimize performance of data transfer.
HS_RPC_FETCH_REBLOCKING=off

# HS_RPC_FETCH_SIZE: Default: 4000
HS_RPC_FETCH_SIZE=32767

# HS_FDS_FETCH_ROWS: Default: 20
HS_FDS_FETCH_ROWS=20

# HS_DB_DOMAIN: Default: WORLD
# HS_DB_NAME: Default: HO
# HS_DB_DOMAIN is required if you use the Oracle Names Server. HS_DB_NAME and
# HS_DB_DOMAIN define the global name of the non-ORACLE system and combined
# they must form a unique address.
#HS_DB_DOMAIN=WORLD
HS_DB_NAME=SAMPLE

# The following parameters are specifically for the
# Transparent Gateway for IBM DRDA.
# DRDA gateway parameters to access DB2 (instance D51A)
# Note: Valid DB2/UDB userid/pw required in database link.

# DRDA_CONNECT_PARM: Default: DRDACON1:446 for TCP. Default: DRDACON1 for SNA
#                    System dependent must be customized
# TCP format: hostname.network:TCP Port Number
# TCP example: DB2UDB.us.oracle.com:2019
# SNA format: sideinfo_name from Local SNA configuration
# SNA example: DB2LU
DRDA_CONNECT_PARM=yagoo-wzhq:50000

# DRDA_REMOTE_DB_NAME: Default: DB2V2R3, system must be customized
# Name of DB2 instance on UNIX.
DRDA_REMOTE_DB_NAME=SAMPLE

# DRDA_PACKAGE_COLLID: Default: ORACLE, system must be customized
# Specifies the collection id defined on non-Oracle database system.
# On DB2: GRANT CREATE IN COLLECTION ORACLE TO id
DRDA_PACKAGE_COLLID=ORACLE

# DRDA_PACKAGE_NAME: Default: G2DRSQL
# Parameter can be any 1-18 character distinctive string.
DRDA_PACKAGE_NAME=G2DRSQL

#DRDA_PACKAGE_CONSTOKEN: Default: none. Do not change value.
DRDA_PACKAGE_CONSTOKEN=A929B170D366FB00

# DRDA_RECOVERY_USERID: Default: ORARECOV, must be a valid UNIX userid.
# The recovery user connects to the IBM database if a distributed transaction
# is in doubt.
DRDA_RECOVERY_USERID=ORADRDA

# DRDA_RECOVERY_PASSWORD: Default: none, must be a valid UNIX password.
# The recovery user connects to the IBM database if a distributed transaction
# is in doubt.
DRDA_RECOVERY_PASSWORD=ORADRDA

# DRDA_ISOLATION_LEVEL: Default: CS
# Possible Values:  CHG  Change (Default for DB2/400)
#                   CS   Cursor Stability (default for DB2/UDB, DB2/OS390 and
#                                          DB2/VM
#                   RR   Repeatable Read
# Be careful changing the DRDA_ISOLATION_LEVEL.  It will effect ALL DB2 users !
DRDA_ISOLATION_LEVEL=CS

# DRDA_PACKAGE_OWNER: Default: none, must be a valid UNIX userid
# This parameter allows you to assign the package owner to be someone other
# than the userid connected when the BIND package program (gtw$_bind_pkg)  
# is run.  THIS USER MUST ALSO OWN THE ORACLE2PC table.  See the Installation
# Guide for more information.  It is currently commented out.
#
#DRDA_PACKAGE_OWNER=ORADRDA

# DRDA_DISABLE_CALL: Default: True
# This parameter is used to disable Stored Procedure support in the gateway
# for those DRDA Servers which the gateway does not currently support calling
# Stored Procedures.
DRDA_DISABLE_CALL=TRUE  

# DRDA_CAPABILITY: Default: none
# Parameter determines which Oracle mapped functions will be treated natively
# with no pre/post processing.
#DRDA_CAPABILITY={FUNCTION/{ON|OFF}},...

# DRDA_CODEPAGE_MAP: Default: $ORACLE_HOME/tg4drda/admin/codepage.map
# Parameter specifies the location of the codepage map file. The default search
# location is $ORACLE_HOME/tg4drda/admin.
#DRDA_CODEPAGE_MAP=codepage.map

# DRDA_CMSRC_CM_IMMEDIATE: Default: FALSE
# Parameter sets the SNA session allocation mode. A setting of FALSE will cause
# the gatewa to wait for a free session if no free sessions exist. A setting of
# TRUE will cause the gateway to fail the allocation immediately if no free
# sessions exist.
#DRDA_CMSRC_CM_IMMEDIATE=FALSE

# DRDA_DEFAULT_CCSID: Default: None
# Parameter specifies the default character set codepage for character set
# conversions when the DRDA server database indicates that a character string
# has a CCSID of 65535.
#DRDA_DEFAULT_CCSID=

# DRDA_FLUSH_CACHE: Default: SESSION
# Parameter specifies when the cursor cache is to be flushed. When parameter is
# set to COMMIT, the cursor cache is flushed whenever a transactio is committed.
# When parameter is set to SESSION, the cursor cache is not flushed until the
# session is terminated.
#DRDA_FLUSH_CACHE=SESSION

# DRDA_COMM_BUFLEN: Default: 32767, use for SNA communications only
# Parameter specifies the communications buffer length for SNA sends/receives.
#DRDA_COMM_BUFLEN=32767

# DRDA_DESCRIBE_TABLE: Default: TRUE
# Parameters directs the gateway to use the DRDA operation "Table Describe" to
# return the description of tables.
#DRDA_DESCRIBE_TABLE=TRUE

# DRDA_LOCAL_NODE_NAME: Default: AIX_RS6K
# Parameter should not be changed. This name is used internally by the DRDA
# server to identify the local node.
#DRDA_LOCAL_NODE_NAME=AIX_RS6K

# DRDA_OPTIMIZE_QUERY: Default: TRUE
# Parameters turns on or off the distributed query optimizer (DQO) capability.
# Parameter only valid on DB2/MVS and DB2/VM. All other servers must set the
# value to FALSE.
#DRDA_OPTIMIZE_QUERY=TRUE

# DRDA_SECURITY_TYPE: Default: PROGRAM, use for SNA communications only
# Parameter specifies the type of SECURITY used for SNA communications.
#DRDA_SECURITY_TYPE=PROGRAM

# DRDA_PACKAGE_SECTIONS: Default: 100
# Parameter specifies the number of cursors declared at the remote database
# when the package is bound. This is the max number of open cursors allowed
# at any one time.
#DRDA_PACKAGE_SECTIONS=100

# DRDA_READ_ONLY: Default: FALSE
# Parameter specifies whether the gateway runs in a read-only transaction mode.
# In this mode, SQL statements that modify data are not allowed.
#DRDA_READ_ONLY=FALSE

# ORA_MAX_DATE: Default: 4712-12-31
# Parameter specifies the gateway maximun date value. Range of values is any
# valid date less than 4712-12-31
#ORA_MAX_DATE=4712-12-31

2004-11-11 17:29 kinghood
oracle9.2.0.4 通过透明网关访问DB2问题?

initsample.ora
只要三四话就可以啦,sql server 我配过,db2的不知道

页: [1]