Re: JDBC - URL string settings?
Posted in 1998
James Lavery wrote: > > I am trying to connect to my database using JDBC, and am getting the > exception: > "Attempt to connect to database server (%s) failed" > > My environment: > 1. Informix Online version 5.x on server > 2. Server machine name is indy, and this is in hosts file > 3. Informix instance on indy is called onli, on port 22224 (i.e. the > client SERVICES file entry is "onli 22224/tcp") > 4. Windows NT 4.0 client > 5. A working installation of I-Net on the client(though I'm not clear > whether JDBC uses this). > 6. Database is lrs_james > > I am using the following URL for the connection: > jdbc:informix-sqli://indy:22224/lrs_james:INFORMIXSERVER=onli; >user=1101;password=1101tst;USERV5SERVER=1 > > Can someone tell me what the correct URL should be? I am used to > setting up I-Net and connections under 16-bit, but am having problems > mapping this knowledge to the URL settings! The INFORMIXSERVER should be the value in the first column of the sqlhosts file for the 5.X engine, or if you're not using an sqlhosts file, the value for DBSERVERNAME in that engine's tbconfig file. Also, that last key value should read USEV5SERVER=yes, there is a typo in the manual for the name, and the value is supposed to be "yes" not "1". Rob Z.