ORA-12533: TNS:illegal ADDRESS parameters

I'm trying to open an OracleConnection on Visual Studio (c#) to join a Database with this command:

OracleConnection conn = new OracleConnection("Data Source=((DESCRIPTION=(ADDRESS_LIST =(ADDRESS=(PROTOCOL=tcp)(HOST=XX.XXX.X.XXX)(PORT=XXXX)))(CONNECT_DATA=(SERVICE_NAME=DEPL_D)(SERVER=xxxxx0xx)));User Id=X_XXX_XXX; Password=XXXXXXXXXX"); conn.Open(); 

my tnsnames.Ora contains the connection string like this:

DEPL_D.WORLD= (DESCRIPTION= (ADDRESS_LIST = (ADDRESS= (PROTOCOL = tcp) (HOST = XX.XXX.X.XXX) (PORT = XXXX) ) ) (CONNECT_DATA = (SERVICE_NAME = DEPL_D) (SERVER = XXXXXXXXXX) ) ) 

On the conn.Open(); I have the message ORA-12533: TNS: illegual ADDRESS parameter

After having searched on the net, It seems it's a problem on my tnsnames.oRA

I have done a test SQL+ with the administrator of the database (on audio) and it works. But It doesn't with visual studio.

If anybody has any idea, everything can helps.

Thanks in advance,

Greetings,

Flo

EDIT1:

I have tried to edit the (CONNECT_DATA = (SERVICE_NAME = DEPL_D) (SERVER = XXXXXXXXXX) ) with (CONNECT_DATA = (SID=DEPL_D) but it doesn't works too.

1

1 Answer

Guessing from what you've provided: The SERVICE_NAME in the connect string is not the same SERVICE_NAME from your tnsnames.ora file.

Also, why did you censor the SERVER parameter ? Only possible values are SHARED, DEDICATED or POOLED. No ip address or hostname here.

1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

You Might Also Like