Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Oracle help with connection string
Message
Information générale
Forum:
ASP.NET
Catégorie:
ADO.NET
Divers
Thread ID:
00862294
Message ID:
00862307
Vues:
16
For starters, look at:

http://www.levelextreme.com/VisualFoxPro/Articles/223.asp

In particular, the entry in the TNSNAMES.ORA file section. You need this info in your TNSNAMES.ORA file which can be found in your OracleHome\Network\Admin folder.
MyDBName = 
 (DESCRIPTION =
   (ADDRESS_LIST =
     (ADDRESS =
       (PROTOCOL = TCP)
       (HOST = 123.45.678.90)
       (PORT = 1521)
     )
   )
   (CONNECT_DATA = 
     (SID = ORCL)
   )
 )
The SID is the name the Oracle DBA gave to the Oracle instance that is running. I know this is ADO.NET, but in VFP, from the example above, the connection string, looks something like:

Provider=MSDAORA.1;User ID=ORA_UID;Password=ORA_PWD;Data Source=MyDBName;Persist Security Info=False

Please note that MyDBName is the alias you used in the TNSNAMES.ORA entry above. From this, hopefully, you can get your connection working.

>I guess I'm showing my ignorance here - haven't worked with Oracle before and I can't seem to figure out how to connect to the database on another machine.
>
>I'm using the Oracle .Net provider. I installed Oracle client tools on the local machine and need to connect to an Oracle install on another machine.
>
>In this case I ended up letting the default create an OraOffice default... uh, store (sorry the terminology of Oracle doesn't make one bit of sense to me)...
>
>Looking at what I can put into the connection string it seems there's no place to specify a server name, only Service Name...
>
>On the server I have:
>Host: officeserver
>ServiceName OraOffice
>
>On the client I'm using:
>
>this.ConnectionString = "Data Source=OraOffice;Integrated Security=yes;";
>
>The error I get is:
>
>"ORA-12154: TNS:could not resolve service name"
>
>How do I tell the service to look on the Office Server Box?
>
>According to the docs there's a Server parameter on the Connection String but it's supposed to be the same thing as the Data Source, and if I do puyt both I get the same error...
>
>
>Any help appreciated...
>
>+++ Rick ---
Mark McCasland
Midlothian, TX USA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform