Archive for September, 2008

SQL Connection Strings

In the last couple of weeks I have been working a lot with different databases which I had to connect to from Java. It is sometime stressful to look up the right format of the connection string to the database. Even though, these strings should, or are meant to be standardized, they are not.

I found this very helpful website ConnectionStrings.com which lists the connection strings for open-source as well as professional commercial databases. This list includes among others, the connection strings for Microsoft SQL Server 2008, MySQL, Oracle, IBM DB2, Informix, Postgre SQL, Caché, SQLite, …

As an example, if you want to connect to a server in a replicated server configuration without concern on which server to use, use the following connection string:

Server=serverAddress1, serverAddress2, serverAddress3;Database=myDataBase;
Uid=myUsername;Pwd=myPassword;

I want to share this information with you, because it can save you a lot of time, looking up those strings in tutorials or in the documentation of the different databases. Continue reading ‘SQL Connection Strings’