旧サーバー(172.29.2.61)の各種設定、動作 ① hs/admin/initIKS_ODBC.ora # This is a sample agent init file that contains the HS parameters that are # needed for the Database Gateway for ODBC # # HS init parameters # HS_FDS_CONNECT_INFO = IKS_ODBC HS_FDS_TRACE_LEVEL = 1 # # Environment variables required for the non-Oracle system # #set = ② network/admin/LISTENER.ORA # listener.ora Network Configuration File: D:\app\Administrator\product\11.2.0\dbhome_1\network\admin\listener.ora # Generated by Oracle configuration tools. # copyright (c) 1997 by the Oracle Corporation # # NAME # listener.ora # FUNCTION # Network Listener startup parameter file example # NOTES # This file contains all the parameters for listener.ora, # and could be used to configure the listener by uncommenting # and changing values. Multiple listeners can be configured # in one listener.ora, so listener.ora parameters take the form # of SID_LIST_, where is the name of the listener # this parameter refers to. All parameters and values are # case-insensitive. # # This parameter specifies both the name of the listener, and # it listening address(es). Other parameters for this listener # us this name in place of . When not specified, # the name for defaults to "LISTENER", with the default # address value as shown below. # # LISTENER = # (ADDRESS_LIST= # (ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521)) # (ADDRESS=(PROTOCOL=ipc)(KEY=PNPKEY))) # SID_LIST_ # List of services the listener knows about and can connect # clients to. There is no default. See the Net8 Administrator's # Guide for more information. # # SID_LIST_LISTENER= # (SID_LIST= # (SID_DESC= # #BEQUEATH CONFIG # (GLOBAL_DBNAME=salesdb.mycompany) # (SID_NAME=sid1) # (ORACLE_HOME=/private/app/oracle/product/8.0.3) # #PRESPAWN CONFIG # (PRESPAWN_MAX=20) # (PRESPAWN_LIST= # (PRESPAWN_DESC=(PROTOCOL=tcp)(POOL_SIZE=2)(TIMEOUT=1)) # ) # ) # ) # PASSWORDS_ # Specifies a password to authenticate stopping the listener. # Both encrypted and plain-text values can be set. Encrypted passwords # can be set and stored using lsnrctl. # LSNRCTL> change_password # Will prompt for old and new passwords, and use encryption both # to match the old password and to set the new one. # LSNRCTL> set password # Will prompt for the new password, for authentication with # the listener. The password must be set before running the next # command. # LSNRCTL> save_config # Will save the changed password to listener.ora. These last two # steps are not necessary if SAVE_CONFIG_ON_STOP_ is ON. # See below. # # Default: NONE # # PASSWORDS_LISTENER = 20A22647832FB454 # "foobar" # SAVE_CONFIG_ON_STOP_ # Tells the listener to save configuration changes to listener.ora when # it shuts down. Changed parameter values will be written to the file, # while preserving formatting and comments. # Default: OFF # Values: ON/OFF # # SAVE_CONFIG_ON_STOP_LISTENER = ON # USE_PLUG_AND_PLAY_ # Tells the listener to contact an Onames server and register itself # and its services with Onames. # Values: ON/OFF # Default: OFF # # USE_PLUG_AND_PLAY_LISTENER = ON # LOG_FILE_ # Sets the name of the listener's log file. The .log extension # is added automatically. # Default= # # LOG_FILE_LISTENER = lsnr # LOG_DIRECTORY_ # Sets the directory for the listener's log file. # Default: /network/log # # LOG_DIRECTORY_LISTENER = /private/app/oracle/product/8.0.3/network/log # TRACE_LEVEL_ # Specifies desired tracing level. # Default: OFF # Values: OFF/USER/ADMIN/SUPPORT/0-16 # # TRACE_LEVEL_LISTENER = SUPPORT # TRACE_FILE_ # Sets the name of the listener's trace file. The .trc extension # is added automatically. # Default: # # TRACE_FILE_LISTENER = lsnr # TRACE_DIRECTORY_ # Sets the directory for the listener's trace file. # Default: /network/trace # # TRACE_DIRECTORY_LISTENER=/private/app/oracle/product/8.0.3/network/trace # CONNECT_TIMEOUT_ # Sets the number of seconds that the listener waits to get a # valid database query after it has been started. # Default: 10 # # CONNECT_TIMEOUT_LISTENER=10 SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (SID_NAME = IKS_ODBC) (ORACLE_HOME = D:\app\Administrator\product\11.2.0\dbhome_1) (PROGRAM = dg4odbc) ) ) LISTENER = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = VM-VORACLE)(PORT = 1521)) ) ) ③ network/admin/sqlnet.ora # This file is actually generated by netca. But if customers choose to # install "Software Only", this file wont exist and without the native # authentication, they will not be able to connect to the database on NT. SQLNET.AUTHENTICATION_SERVICES = (NTS) ④ network/admin/tnsnames.ora # tnsnames.ora Network Configuration File: D:\app\Administrator\product\11.2.0\dbhome_1\network\admin\tnsnames.ora # Generated by Oracle configuration tools. IKS = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = VM-VORACLE)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = iks) ) ) IKS_MYSQL = (DESCRIPTION = (ADDRESS = (PROTOCOL = tcp)(HOST = 172.29.2.61)(PORT = 1521)) (CONNECT_DATA = (SID = IKS_ODBC) ) (HS = OK) ) # This file contains the syntax information for # the entries to be put in any tnsnames.ora file # The entries in this file are need based. # There are no defaults for entries in this file # that Sqlnet/Net3 use that need to be overridden # # Typically you could have two tnsnames.ora files # in the system, one that is set for the entire system # and is called the system tnsnames.ora file, and a # second file that is used by each user locally so that # he can override the definitions dictated by the system # tnsnames.ora file. # The entries in tnsnames.ora are an alternative to using # the names server with the onames adapter. # They are a collection of aliases for the addresses that # the listener(s) is(are) listening for a database or # several databases. # The following is the general syntax for any entry in # a tnsnames.ora file. There could be several such entries # tailored to the user's needs. ⑤ Create Database Link create public database link IKS_MYSQL connect to "IKSADMIN" identified by "IKSADMIN" using 'IKS_MYSQL'; ⑥ lsnrctl status C:\Users\Administrator>lsnrctl status LSNRCTL for 64-bit Windows: Version 11.2.0.4.0 - Production on 28-5月 -2024 14:04:26 Copyright (c) 1991, 2013, Oracle. All rights reserved. (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=VM-VORACLE)(PORT=1521)))に接続中 リスナーのステータス ------------------------ 別名 LISTENER バージョン TNSLSNR for 64-bit Windows: Version 11.2.0.4.0 - Produ ction 開始日 27-4月 -2024 13:53:17 稼働時間 31 日 0 時間 11 分 12 秒 トレース・レベル off セキュリティ ON: Local OS Authentication SNMP OFF パラメータ・ファイル D:\app\Administrator\product\11.2.0\dbhome_1\network\admin\listener.ora ログ・ファイル D:\app\Administrator\diag\tnslsnr\VM-VORACLE\listener\alert\log.xml リスニング・エンドポイントのサマリー... (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=VM-VORACLE)(PORT=1521))) サービスのサマリー... サービス"IKS_ODBC"には、1件のインスタンスがあります。 インスタンス"IKS_ODBC"、状態UNKNOWNには、このサービスに対する1件のハンドラがあります... サービス"iks"には、1件のインスタンスがあります。 インスタンス"iks"、状態READYには、このサービスに対する1件のハンドラがあります... サービス"iksXDB"には、1件のインスタンスがあります。 インスタンス"iks"、状態READYには、このサービスに対する1件のハンドラがあります... コマンドは正常に終了しました。 C:\Users\Administrator> ⑦ tnsping IKS_MYSQL C:\Users\Administrator>tnsping IKS_MYSQL TNS Ping Utility for 64-bit Windows: Version 11.2.0.4.0 - Production on 28-5月 - 2024 14:07:33 Copyright (c) 1997, 2013, Oracle. All rights reserved. パラメータ・ファイルを使用しました: D:\app\Administrator\product\11.2.0\dbhome_1\network\admin\sqlnet.ora エイリアスを解決するためにTNSNAMESアダプタを使用しました。 (DESCRIPTION = (ADDRESS = (PROTOCOL = tcp)(HOST = 172.29.2.61)(PORT = 1521)) (CONNECT_DATA = (SID = IKS_ODBC)) (HS = OK))に接続の試行中 OK (10ミリ秒) C:\Users\Administrator> ⑧ sqlplus C:\Users\Administrator>sqlplus IKSADMIN/IKSADMIN@IKS SQL*Plus: Release 11.2.0.4.0 Production on 火 5月 28 14:10:23 2024 Copyright (c) 1982, 2013, Oracle. All rights reserved. Oracle Database 11g Release 11.2.0.4.0 - 64bit Production に接続されました。 SQL> select sysdate from dual@IKS_MYSQL; SYSDATE -------- 24-05-28 SQL>