2

I can't make myGeneration tool to work correctly.

This is the connection string that I use:

Provider=OraOLEDB.Oracle.1;Password=pass123;User ID=user1;Data Source=oradb1src;Persist Security Info=True

And when I click on Test connection I get:

[System.Data.OleDb.OleDbException] - ORA-12154: TNS:could not resolve service name

[oradb1src is well defined in tnsnames.ora. That is not the problem.]

But when I change the provider to MSDAORA, then connection works fine, but in the Generate window I'm missing the Tables tab on which I should be able to choose tables from my database. I've red somewhere that this is normal with MSDAORA provider, cause mygeneration uses oledb provider for meta data retrieval.

But, why do I get this insane error message when using OralOLEDB.Oracle provider??? Does anyone know?

Thank you in advance...

PS. I have drivers for oracle 9.2 and oracle 10 installed on my computer.

Goran
  • 1,807
  • 7
  • 27
  • 41

3 Answers3

0

I've only ever seen that error when the source wasn't correctly configured in tnsnames.ora. Since the other provider can see the database from your machine, I would try to create a TNS-less connection string (click here for an example) to make sure that's not the problem.

MusiGenesis
  • 74,184
  • 40
  • 190
  • 334
  • That shouldn't be the problem, cause I connect to this database and through tnsnames with TOAD, already. – Goran Jul 15 '09 at 15:28
  • Now I used this connection string: >Provider=OraOLEDB.Oracle.1;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=myHost)(PORT=myPort)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=mySID)));Password=pass123;User ID=user1;Persist Security Info=True; and I get the following error: > [System.Data.OleDb.OleDbException] - ORA-12638: Credential retrieval failed In sqlnet.ora this is set: > SQLNET.AUTHENTICATION_SERVICES = (NONE) – Goran Jul 15 '09 at 15:31
  • You probably googled the same stuff I just looked at. It looks like setting the authentication services to (NONE) should have fixed the problem. Maybe you need to reboot your machine and possibly reboot the Oracle server too. – MusiGenesis Jul 15 '09 at 16:20
  • $*@$& Oracle, by the way. This sort of thing is always a pain with Oracle. – MusiGenesis Jul 15 '09 at 16:22
0

Connection string for oracle:

Provider=OraOLEDB.Oracle;Data Source=mydbname;User Id=mydata;Password=88888

It works well

andrewsi
  • 10,807
  • 132
  • 35
  • 51
0

I have encountered a similar error on occasion - basically, even though Oracle (and Toad) quite happily support multiple Oracle clients on one machine, Com versions of the Data Provider (i.e. any connection method NOT using Oracle native connection) will silently only use one of your clients. I've never been able to find any documentation to confirm how the client to be used is selected, and so cannot force it. Most likely, you will find that the Oracle client you are trying to use is NOT the one being used by the provider, and that the one being used by the provider does not have a complete TNSNames file.

YogoZuno
  • 405
  • 6
  • 25