DB2 Viper II and the IBM Data Studio Developer Workbench - Page 2
October 19, 2007
Adding database connections to the Database Explorer
The Database Explorer view allows you to explore and work with schema objects within your databases, as well as a myriad of other functions. The capabilities of the IBM Viper II DS DWB far exceed those of its predecessor. If youre familiar with the DB2 DWB in DB2 9, these differences will become obvious to you as you work through this series With that said, simply looking at a database connection object in the IBM DS DWB Database Explorer view and comparing it with its predecessor in the DB2 DWB should convince you that the IBM DS DWB is far from a simple upgrade:
Although this article focuses on DB2 9 and DB2 Viper II for Linux, UNIX, and Windows data server connections, you can use the same steps to connect to the following data servers: Apache Derby version 10+ and later, IBM Cloudscape version 5.1 and later, all supported versions of DB2 for Linux, UNIX, and Windows, all supported versions of DB2 for i5/OS, all supported versions of DB2 for z/OS, and Informix IDS versions 9.2, 9.3, 9.4, 10.0 and later, and 11.0 and later.
To add a database connection to the Database Explorer window, perform the following steps:
1. Right-click anywhere in the Database Explorer window and select New Connection:
The New Connection wizard opens:
Note: If the IBM DS DWB doesnt have enough information to connect to a target data server, a status icon () will appear at the top of your window. This is a common error indication method within Eclipse so you should always look at the top of a window before clicking Finish or OK, and so on.
2. Expand DB2 for Linux, UNIX, and Windows in the Select a database manager list and select All Versions. The Connection URL details box will automatically change and update the required fields with the last database entry added to the System Database Directory.
Since my system only has the TOOLSDB (created during the installation) and the SAMPLE (created after installing DB2 Viper II) databases on it, the IBM DS DWB automatically updated the required connection information fields with the SAMPLE databases parameters:
You can use the JDBC Driver field from Step 1 to change the driver and the security method (if it is external to DB2) that is used to make the database connection. By default, the IBM DS DWB will use the native security facility with SERVER authentication to make this connection:
Selecting Other allows you to customize the information for this connection as would be required if, for example, you were building a connection to a DB2 data server but using third-party drivers. You can fully customize this process, as shown below. (Note that as soon as you select this option, the error indicator appears since the page requires more information.)
Note: If you select the default driver again, all of the previously displayed information is restored.
You can also change where the native DB2 authentication challenge takes place using this window. For example, to have authentication take place on the client (something I generally dont recommend for reasons beyond the scope of this article), select the Use client authentication check box:
As you can see in the previous figure, any changes you make to the Connection URL details box dynamically updates the generated connection string in the Connection URL field.
3. Test the data server connection by entering the appropriate credentials in the User information box and clicking Test Connection. If the connection is successful, click Next.
You may notice that you can also just click Finish to add the connection; however, the IBM DS DWB offers you some further data server customizations that can come in handy (especially in large environments), so for illustration purposes, dont add the connection just yet.
If the connection isnt successful, you will see a message indicating so. For example:
Alternatively, when you click Next on the Connection Parameters page, the IBM DS DWB will automatically test the connection for you and display a message if the connection is unsuccessful. If the connection is successful, the Filter window opens.