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:
00862312
Vues:
18
Thanks a bunch Mark! I was able to get this to work with the TNS entry. Actually before this I just moved the project to the server to make it work, which was a little less than ideal... This seems like a big hassle, but I suppose it makes it a lot harder to just hack away at a port on the server by connecting...

Another ignorant question in that same area: Is there any way to pre-select the active database/schema? I can access content now, but I have to prefix everything with a Database prefix.

The terminology of Oracle is really getting me here. Schema is what would be the equivalent of a SQL Server database?

I've been poking around with this stuff for the better part of the day today and I feel like a total beginner. Maybe I better pick up Oracle for Dummies later on <g>...

Thanks, appreciate the help!

+++ Rick ---




>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 ---
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform