Unanswered: Using JDBC net driver w/o database alias
I am trying to use the net drivers instead of the app drivers in a jdbc project. I have not been able to figure out a way to connect to the database if the database does not have an alias registered on the server.
Does the net driver require a server alias, or is there a URL construct I can use which is able to reference a database through its instance.
Thanks for the response. The URL you are demonstrating assumes that the alias "DB" is registered on the server. Or maybe it does work when there is only on DB2 instance. The situation I'm in is that we have multiple instances running on one server. When I pass in the database name it does not connect. Somehow the instance needs to be referenced as well (If its even possible). The code I am using works fine on my development server, where I created the alias to the database.
The obvious answer is "Just register the alias then". However, I am working at a huge company, and the DBAs are telling me that creating aliases are not something that they "normally" do. Now I am faced with the daunting task of getting the DBAs to change their "normal" process and do something special. Not easy in a company of this size.