Oracle SQL Server

DBA Geral (instalação, configuração do banco, scripts do Sql*Plus, shell scripts, batch scripts, etc...)
Post Reply
mazinhospinter
Rank: Estagiário Sênior
Rank: Estagiário Sênior
Posts: 10
Joined: Wed, 25 Jul 2007 7:27 am
Location: SP

Environment Information:
* version of Oracle:
* Operating system:
Good afternoon,

I am in trouble to make Linked Server Of the following base:

Oracle 10 g for SQL Server ..

Regarding the Linked Server of SQL Server for Oracle is perfect, but the reverse does not I can locate the error below:

Select all

SQL>  
  1* connect to gilcimar identified by 2006 using @MYSQLSERVERDSN; 
  2  / 
connect to gilcimar identified by 2006 using @MYSQLSERVERDSN; 
* 
ERROR at line 1: 
ORA-00900: invalid SQL statement 
 
SQL> edit 
Wrote file afiedt.buf 
  1* connect to gilcimar identified by 2006 using 'MYSQLSERVERDSN'; 
SQL> / 
connect to gilcimar identified by 2006 using 'MYSQLSERVERDSN'; 
* 
ERROR at line 1: 
ORA-00900: invalid SQL statement 
 
SQL> 
I am following this material;
http://www.databasejournal.com/features ... _3442661_1
I await help ...
ruevers
Rank: DBA Sênior
Rank: DBA Sênior
Posts: 324
Joined: Fri, 02 Jun 2006 1:48 pm
Location: sp
Contact:

This part went well ???

Select all

SQL> create database link mysqlserverdsn  
     connect to sa identified by  using 'MYSQLSERVERDSN'; 
 
Database link created. 
You have to always access the Database Link, you can not connect directly as you are trying.

Att.
mazinhospinter
Rank: Estagiário Sênior
Rank: Estagiário Sênior
Posts: 10
Joined: Wed, 25 Jul 2007 7:27 am
Location: SP

Ruevers ...

So, until the creation worked.

Select all

SQL> create database link mysqlserverdsn  
  2       connect to elipse identified by  automacao10 using 'MYSQLSERVERDSN'; 
 
Database link created.
99] But the problem now is in the TNX .. but apparently I did as the manual ..

Select all

SQL> create database link mysqlserverdsn  
  2       connect to elipse identified by  automacao10 using 'MYSQLSERVERDSN'; 
 
Database link created. 
 
SQL> desc employees@mysqlserverdsn 
ERROR: 
ORA-12154: TNS:could not resolve the connect identifier specified
In:
2]]

Select all

MYSQLSERVERDSN  = 
  (DESCRIPTION= 
    (ADDRESS=(PROTOCOL=tcp)(HOST=proteu)(PORT=1521)) 
    (CONNECT_DATA=(SID=MYSQLSERVERDSN)) 
    (HS=OK) 
  )

within:

Select all

E:\OracleHomes\db10g\NETWORK\ADMIN\tnsnames.ora

Select all

MYSQLSERVERDSN  = 
  (DESCRIPTION= 
    (ADDRESS=(PROTOCOL=tcp)(HOST=proteu)(PORT=1521)) 
    (CONNECT_DATA=(SID=MYSQLSERVERDSN)) 
    (HS=OK) 
  )
mazinhospinter
Rank: Estagiário Sênior
Rank: Estagiário Sênior
Posts: 10
Joined: Wed, 25 Jul 2007 7:27 am
Location: SP

Select all

SQL> create database link mysqlserverdsn  
  2       connect to elipse identified by  automacao10 using 'MYSQLSERVERDSN'; 
 
Database link created. 
 
SQL> desc employees@mysqlserverdsn 
ERROR: 
ORA-12154: TNS:could not resolve the connect identifier specified
ruevers
Rank: DBA Sênior
Rank: DBA Sênior
Posts: 324
Joined: Fri, 02 Jun 2006 1:48 pm
Location: sp
Contact:

So

I think it's doing something wrong between the creation of the listener and the name of the tnsnames, mainly and because it is using the port 1521 there it creates a new with 1522, review all steps, But I think you're eating ball at some point.

Att.
mazinhospinter
Rank: Estagiário Sênior
Rank: Estagiário Sênior
Posts: 10
Joined: Wed, 25 Jul 2007 7:27 am
Location: SP

The problem in parts was solved.

Now the error is:

Select all

SQL>  conn gilcimar/2006@MYSQLSERVERDSN 
ERROR: 
ORA-28547: connection to server failed, probable Net8 admin error
Hugs
ruevers
Rank: DBA Sênior
Rank: DBA Sênior
Posts: 324
Joined: Fri, 02 Jun 2006 1:48 pm
Location: sp
Contact:

Do you give a tnsping in mysqlserverdsn in the DOS it works?
mazinhospinter
Rank: Estagiário Sênior
Rank: Estagiário Sênior
Posts: 10
Joined: Wed, 25 Jul 2007 7:27 am
Location: SP

Anderson,

works yes ..

Select all

 
E:\OracleHomes\db10g\BIN>tnspingm MYSQLSERVERDSN 
'tnspingm' is not recognized as an internal or external command, 
operable program or batch file. 
 
E:\OracleHomes\db10g\BIN>tnsping MYSQLSERVERDSN 
 
TNS Ping Utility for 32-bit Windows: Version 10.1.0.4.0 - Production on 08-SEP-2 
008 10:41:16 
 
Copyright (c) 1997, 2003, Oracle.  All rights reserved. 
 
Used parameter files: 
e:\OracleHomes\db10g\network\admin\sqlnet.ora 
 
 
Used TNSNAMES adapter to resolve the alias 
Attempting to contact (DESCRIPTION= (ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT 
=1522)) (CONNECT_DATA=(SID=MYSQLSERVERDSN)) (HS=OK)) 
OK (20 msec) 
ruevers
Rank: DBA Sênior
Rank: DBA Sênior
Posts: 324
Joined: Fri, 02 Jun 2006 1:48 pm
Location: sp
Contact:

Questions ...

Has Firewall ?? If you have, you do a test with it disabled ...

has more than one version of Oracle installed ... if yes the problem may be there ..... hence I do not even know where Start, perhaps choosing one of them and removing the one left.

Att.
Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest