Jump to content
Guest

create db_link from an Oracle Database to sql server for migrate data sql server to oracle

Recommended Posts

Guest

# This is a customized agent init file that contains the HS parameters
# that are needed for the Database Gateway for Microsoft SQL Server

#
# HS init parameters
#
HS_FDS_CONNECT_INFO=[192.168.0.58]:49698//sa
# alternate connect format is hostname/serverinstance/databasename
HS_FDS_TRACE_LEVEL=OFF
HS_FDS_RECOVERY_ACCOUNT=RECOVER
HS_FDS_RECOVERY_PWD=RECOVER


tnsnames.ora
locattion :/u01/app/oracle/test/product/12.1.0/tghome_4/network/admin/tnsnames.ora

dg4msql  =
  (DESCRIPTION=
    (ADDRESS=(PROTOCOL=tcp)(HOST=rite-oralinux-68-vm1.localdomain)(PORT=1523))
    (CONNECT_DATA=(SID=dg4msql))
    (HS=OK)
  )

  
# listener.ora Network Configuration File: /u01/app/oracle/test/product/12.1.0/tghome_4/network/admin/listener.ora
# Generated by Oracle configuration tools.

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = rite-oralinux-68-vm1.localdomain)(PORT = 1523))
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1523))
    )
  )

SID_LIST_LISTENER=
  (SID_LIST=
      (SID_DESC=
         (SID_NAME=dg4msql)
         (ORACLE_HOME=/u01/app/oracle/test/product/12.1.0/tghome_4)
         (PROGRAM=dg4msql)
      )
  )

# listener.ora Network Configuration File: /u01/app/oracle/product/12.1.0.2/db_1/network/admin/listener.ora
# Generated by Oracle configuration tools.

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = rite-oralinux-68-vm1.localdomain)(PORT = 1521))
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    )
  )
SID_LIST_LISTENER=
  (SID_LIST=
      (SID_DESC=
         (SID_NAME=dg4msql)
         (ORACLE_HOME=/u01/app/oracle/test/product/12.1.0/tghome_4)
         (PROGRAM=dg4msql)
      )
  )
  
# tnsnames.ora Network Configuration File: /u01/app/oracle/product/12.1.0.2/db_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.

LISTENER_CDB1 =
  (ADDRESS = (PROTOCOL = TCP)(HOST = rite-oralinux-68-vm1.localdomain)(PORT = 1521))


CDB1 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = rite-oralinux-68-vm1.localdomain)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = cdb1)
    )
  )

ORCL =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = rite-oralinux-68-vm1.localdomain)(PORT = 1521))
   (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcl.localdomain)
    )
)

dg4msql =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = rite-oralinux-68-vm1.localdomain)(PORT = 1523))
    (CONNECT_DATA =
      (SID = dg4msql)
    )
    (HS= OK)
)

[oracle@rite-oralinux-68-vm1 admin]$ tnsping dg4msql

TNS Ping Utility for Linux: Version 12.1.0.2.0 - Production on 11-OCT-2018 13:29:22

Copyright (c) 1997, 2014, Oracle.  All rights reserved.

Used parameter files:
/u01/app/oracle/product/12.1.0.2/db_1/network/admin/sqlnet.ora


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = rite-oralinux-68-vm1.localdomain)(PORT = 1523)) (CONNECT_DATA = (SID = dg4msql)) (HS= OK))
OK (0 msec)

...Create db_link
create database link mytest connect to "sa" identified by "Html@3452" using 'dg4msql';

select * from all_users@dg4msql;

ORA-28545: error diagnosed by Net8 when connecting to an agent
Unable to retrieve text of NETWORK/NCR message 65535
ORA-02063: preceding 2 lines from MYTEST

select * from all_users@mytest


  
 

Share this post


Link to post
Share on other sites

You has complete directions!

This forum is for answering questions!

This is not a question, it is a request for free support services.

For that, you need to do a service request on MOSC:

http://support.oracle.com

If you do not have not purchased Oracle support, you can call (800) 766-1884, give your credit card number for $1,000, and we will assign a consultant to help you.

http://www.dba-oracle.com/consulting_prices.htm

In the future, only post specific questions.

Good luck!

Good luck!

 

 

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

×