Wednesday, September 27, 2006

Sybase SQL Anywhere joys

To connect to the f**king stupid Sybase SQL Anywhere (vers 5.5 and down) from a Java app on Windows NT/XP, you'll need, aside from the stupid SQL Anywhere server, another stupid piece of garbage named Open Server Gateway which enables remote client connections to a SQL Anywhere instance.

So what you have to do is:

1.) When installing SQL Anywhere Server make sure you find and check the checkbox that says
'Install the Open Gateway Components' or such shit

2.) Start a SQL Anywhere db engine like this:

dbsrv50.exe c:/sqlany50/sademo.db -n demo

This basically says start the DB from that file, and name it demo

3.) Go to C:\sybase\bin folder or wherever the installation put that stupid folder and start sqledit.exe

In there you'll need to define an Open Gateway instance as follows:

3.1) Into 'Input Server Name' put the name of the OGS instance like 'remote'
3.2) Choose Service Type = 'master'
3.3) Choose Platform = NT
3.4) Choose Net Library driver NLWNSCK
3.5) Connection information/network address - put here the IP the Open gateway will run on and the port, comma separated, like this:,5555 - intuitive huh ? Stupid schmucks !
3.6) Click on add service
3.7) Go to File - > Save and exit the DAMN ANTIC tool !

4.) Start the dbos50.exe with a command line like this:

dbos50.exe -e demo remote

Which means: start a damn Open Server Gateway instance named 'remote', use as the SQL Server Engine (-e demo) the one you find with the name 'demo'

Basically what you need to get right is to pass in the OGS name you've configured with sqlqedit (in this case 'remote')

After this, you'll be able to use JConnect from java to access this database as with any DB using JDBC follows:

private static final String USR = "dba";

private static final String PASS = "sql";

private static final String HOST = "";

private static final String URL = "jdbc:sybase:Tds:" + HOST + ":5555";


5.) If you agree with me that this is all completely BULLSHIT, pursue everybody to DUMP this shit and use PostgreSQL or the free version from Oracle or whatever else instead of this abysmal piece of shit and garbage named SQL Anywhere Server or Open Gateway Server or whatever else.

I've spent 2 days of my developer life to search the net for this information, including those useless Sybase resources, when for any other DB all you need to do is hit the fucking install.exe, grab a JDBC driver and connect to the freacking default DB that is there no doubt.

Some people never learn.

Thursday, September 21, 2006

E destul de rau sa nu ai despre ce scrie

Mi-am facut Blog si deocamdata nu imi vine sa injur pe nimeni. Cam asta este intentia mea de fapt. Exista MULTE lucruri care ma deranjeaza in viata publica romaneasca, lucruri care ma fac sa injur. Acum am si unde.

Stay tuned.

PS. As vrea sa aiba si topics sa nu amestec Java cu politica romaneasca...