What is the advantage of virtualizing Eclipse-based InfoSphere Optim database tools? With virtualization, for example, IBM Data Studio full client Version 3.1 can be installed once on a Citrix server and can be accessed by multiple client computers through a browser. This means that the client computer with a browser doesn't need to install Data Studio full client V 3.1 locally.
Although there are many benefits to virtualization, there are some items to be aware of when working in a Citrix environment. You may need to consider how to balance the workload, how to handle the behavior of the tools workspace, how to debug stored procedures, and how to deal with data bridge link communication between InfoSphere Optim Performance Manager (OPM) and InfoSphere Optim Query Tuner (OQT) during load balancing.
IBM Data Studio full client v3.1 is used for stored procedure debugging, which you can download at no charge (see Resources).
The following tasks are described in this article.
- How to install and publish InfoSphere Optim database tools in a Citrix environment. This article covers the following products: IBM Data Studio full client V3.1 or later, IBM InfoSphere Optim Query Tuner (OQT) V 3.1 or later, and InfoSphere Data Architect V7.6 or later).
- How to resolve workspace problems caused by Citrix workload balancing.
- How to control which workspace is used by InfoSphere Optim database tools.
- How to debug stored procedures using Data Studio full client 3.1.
- How to resolve bridge communication problem between InfoSphere Optim Performance Manager and InfoSphere Optim Query Workload Tuner while load balancing.
You will need an available connection to a DB2® for Linux®, UNIX®, and Windows® database. The basic concepts will work across DB2 family servers but this article uses DB2 for Linux, UNIX, and Windows for debugging stored procedures.
Installing InfoSphere Optim database tools in a Citrix environment
Installing the database tools in a Citrix environment is the same as an installation on a local client computer using IBM Installation Manager. After you install the product, you must publish it as a Citrix application that can be delivered to a client computer through a browser. To publish an application as a Citrix application, perform the following steps.
- Open the Citrix Access Management Console.
- Expand: Citrix Resources > XenApp > [your-farm-name].
- Right-click Applications, then select
New > Publish Application, as
shown in Figure 1.
Figure 1. Publish Citrix application
- Follow the wizard and accept the defaults unless otherwise stated.
- On the wizard's Location page, browse to the eclipse.exe that launches
the application. Figure 2 shows the eclipse.exe location for Data
Studio full client V3.1.
Figure 2. Browse to eclipse.exe of the InfoSphere Optim database tool installation
- On the Servers page, add some or all of the servers in your farm. In this case, there is only one server called CUSCO.
- On the Users page, add users who are members of the
remote desktop users group. The users you can add depend on how the
farm is set up. In this case, you can choose operating system users as
shown in Figure 3.
Figure 3. Choose operating system users
- After the InfoSphere Optim database tool is installed, it must be
published as a Citrix application, which can be delivered to the
client machine through a browser when a user logs in. The Citrix
environment is shown in Figure 4.
Figure 4. InfoSphere Optim database tools in virtual Citrix environment
Workspace problem with workload balancing and what is the work around?
Problem: A user has problems with their workspace during load balancing in a Citrix environment and wants a solution.
What is Citrix load balancing? A Citrix environment can include a set of servers where the software can be run. When a user logs into Citrix, they are placed on the server with the least amount of load. For load balancing to occur, Eclipse-based InfoSphere Optim database tools must be installed on each server.
As an example, assume a user has a workspace on server1, and they log in to run one of the database tools. If they are put on server2 because of load balancing, their workspace on server1 is not visible and they can't access their existing workspace and projects. One solution would be to have workspace for each user on Citrix server that runs the Eclipse-based InfoSphere Optim database tools. This solution requires a lot of disk space.
You can also have the workspace selected to be on the local user's machine instead of a Citrix server to reduce the footprint of InfoSphere Optim database tools on the Citrix server. If there are a number of users and each has a workspace on the Citrix server, each workspace will take up disk space on the server and when more data is archived per user, the footprint will grow on the servers. As a result, assigning the workspace in a location outside of the Citrix server will avoid this extra addition to the footprint needed on the server.
Some solutions to solve this problem
You can set up a mapping in the Citrix environment of the user's local desktop or laptop directories when the user is logged into Citrix environment. Then you can make the mapping visible to Citrix applications.
This solution allows users to access a workspace that is on their local directory when they log into Citrix. So, no matter which Citrix server was used for load balancing with an InfoSphere Optim database tool (Data Studio, OQT or IDA), the same user workspace would be used by the InfoSphere Optim database tool. No extra work is required to keep the user's workspace synced across Citrix servers.
This solution resolves other issues or concerns when multiple users are on Citrix using InfoSphere Optim database tools. For example, one workspace per user on the Citrix servers might consume a lot of disk space. The solution of using the workspace from the user's local directory avoids that impact and hence disk space limitations will not be a factor.
- Another solution would be to use a dedicated network file system server and store all the user's workspaces there. A system administrator can map the shared directory on the Citrix server so users can launch their InfoSphere Optim database tool and use the mapped directory.
Configuring workspaces in a Citrix environment
- Open the Citrix Connection Center. From the Files
drop-down list, select Full Access as shown in Figure
Figure 5. Citrix Connection Center
- Start the InfoSphere Optim database tool as a Citrix application.
- From the Workspace Launcher screen, click
Browse and select the workspace to be under the
drive mapped to the user's local drive. Figure 6 shows drive Y, but
you can change it to reference a local drive.
Figure 6. Workspace Launcher
- Now anyone can reuse their existing workspace and projects.
The InfoSphere Optim tool picks up the last workspace as the default
Problem: When launching the InfoSphere Optim database tool(Data Studio 3.1, Optim Query Tuner, or InfoSphere Data Architect), by default, the install selects the following folder name: C:\Documents and Settings\<user_name>\IBM\rationalsdp\workspace.
In a Citrix environment, Data Studio keeps track of the workspace used by the last user. This workspace becomes the default for the next user.
You would rather detect that a new user has logged on to the session, and use the new user's name rather than the last used workspace. You would also like to have the installer's name replaced with the individual user's name, using an environment variable, such as %USERNAME%.
Changing the default behavior
Here, you can change the default behavior in a Citrix environment and use a workspace based on your user name rather than the last used workspace.
The following instructions use Data Studio full client 3.1 as an example.
- Log on to Citrix server as an Admin.
- Under Citrix group, click Management Consoles, and
then choose Access Management Console sub group as
shown in Figure 7.
Figure 7. Bring up Management consoles
- From the Citrix Access Management Console, expand Citrix Resources, expand XenApp, and then expand DataStudioFarm and click Applications on the left side.
- Choose your application from the list and then click the option
Modify all properties. Figure 8 shows the
application DS31 and its properties.
Figure 8. Access Management Console
- From the Application Properties Basic screen, click
Location as shown in Figure 9.
Figure 9. Application Properties window
- From the Location properties, add -data
C:\%USERNAME%\workspace to the existing command that is
in Command line, as shown in Figure 10.
Figure 10. Location properties and setting up the user variable
- When you launch the workspace, it will launch the workspace that you added in the Location properties and will not prompt for a new workspace. Your workspace will be under your user name. You can change the workspace in Data Studio by clicking Switch Workspace > Other.
How to debug stored procedures with IBM Data Studio full client V3.1
Problem: Users are confused on how to setup a session manager location to debug stored procedures in a Citrix environment. The following section describes some solutions.
The Unified Debugger is included in the DB2 database product and Data Studio full client V 3.1. This section shows you how to set up debugger session manager location while you use Data Studio full client V3.1 of the Unified Debugger to debug stored procedures on DB2 for Linux, UNIX, and Windows database.
These instructions assume you are familiar with using Data Studio full client V 3.1 to create a database connection and database objects as well as creating, deploying, and debugging stored procedures. Debugging a stored procedure is similar to debugging a Java application in Eclipse IDE.
Deploy a stored procedure with Enable debugging option
Assume there is an existing database connection to a DB2 for Linux, UNIX, and Windows database and an existing data development project associated with this database connection. You have already created your stored procedure in this project and are ready to deploy the stored procedure using IBM Data Studio.
Make sure the Enable debugging check box is selected on the Deploy Routines dialog, as shown in Figure 11.
Figure 11. Deploy stored procedure with Enable debugging option
Set up the stored procedure debug session manager location
The Unified Debugger framework contains three components: The server (DB2 for Linux, UNIX, and Windows database), the client (Data Studio full client V 3.1 on a Citrix server), and the session manager. In this framework, the client talks to the session manager, and the session manager talks to the server to exchange debug information and requests. The session manager coordinates the communication between the client and the server over a TCP/IP connection. The session manager should be set up and started some where in the network either on the client or on the server, before you can use the debugger. Otherwise the Unified Debugger will not work.
Note: When using the session manager, you must also ensure that TCP/IP communication from the server to the client is not blocked by a firewall.
Option 1: The built-in client session manager on the client
A built-in client session manager is integrated with Data Studio. This session manager that is running on the client (Data Studio on a Citrix server) can't be shared with your team member over the network, as shown in Figure 12.
Figure 12. Built-in client session manager on DS 3.1 on Citrix server
The built-in client session manager is set as the default. You can change the Data Studio debugger settings in the debugger preferences page by selecting Window > Preferences > Run/Debug > Routine Debugger > IBM, as shown in Figure 13.
Figure 13. How to set up built-in client session manager location in the debugger preferences page
Option 2: Session manager launched on the Citrix server
You can also launch the session manager on the client and share it with your team over the network. This is an optimum solution for Citrix users. When you launch the session, multiple TCP/IP ports will not be used, and you can control the port.
Steps for running the session manager on the Citrix server
- The session manager program
db2dbgm.batis shipped with Data Studio, and is located at <Data Studio installation directory on Citrix server>\dsmini\bin.
db2dbgm.batin a command prompt window. When you start the session manager, you will see a host IP address and port number, as shown in Figure 14. Write the information down.
Figure 14. Start session manager on the Citrix server and get host IP address and port number
- Configure Data Studio to use the running session manager in the debugger preferences page as shown in Figure 15 by selecting Window > Preferences > Run/Debug > Routine Debugger > IBM.
- Also, as shown in Figure 15, click the Use an already running
session manager radio button, and type the host IP
address and port number for the session manager that you started.
Figure 15. Set up an already running session manger in the debugger preferences page
Option 3: Session manager on a connected data server
As shown in Figure 16, Data Studio looks for a session manager running at the connected data server. If Data Studio does not find a session manager, it requests a session manager to be run at that location. You can share a session manager running on the server with your team over the network.
Figure 16. Session manager on the connected data server
If you have a session manager running on the server, as shown previously in Figure 16, you can configure the Data Studio debugger preferences to use it. As shown in Figure 17, select Window > Preferences > Run/Debug > Routine Debugger > IBM, and then click the Use session manager on each connected server radio button.
Figure 17. Use the session manager on the connected data server
Debug a deployed stored procedure
After you have completed the setup of the stored procedure debug session manager, you can debug the deployed store procedure on a DB2 for Linux, UNIX, and Windows database by right-clicking the deployed stored procedure name in the Data Project Explorer, and selecting Debug from the menu, as shown in Figure 18).
Figure 18. Deploy, Run, and Debug context menu
OPM and OQT communication in Citrix load balancing
Problem with OPM and InfoSphere Optim Query Workload Tuner or InfoSphere Optim Query Tuner (OQWT/OQT) in Citrix load balancing
With Citrix and load balancing, OPM could be running on server1 and OQT could be running on server2. This will be an issue because a data bridge link is required to allow communication between OPM and OQT. OQWT/OQT must be installed on the same server as the OPM browser.
To launch OQT from OPM, OQT must be on the same server where OPM is installed. For example, if OQWT/OQT is on Citrix server1, then the OPM browser must be there as well to make the data bridge link.
This article provides solutions for known problems when virtualizing InfoSphere Optim database tools under a Citrix environment in an optimized manner. By using the instructions in this article, you can easily install InfoSphere Optim database tools, have users launch the tools with their own workspace when Citrix workload balancing is used, deploy and debug stored procedures with the tools, have the tools use the workspace of the logged in user, and resolve the problem of bridge communication between OPM and OQT.
- Read Part 1 of the Debugging stored procedures in DB2 z/OS with Optim Development Studio, Part 1 article for more information on debugging stored procedures.
- Read Part 2 of the Debugging stored procedures in DB2 for z/OS with Optim Development Studio, Part 2 article on developerWorks for more information on debugging stored procedures.
- Review the Data Studio Information Roadmap.
- Stay current with developerWorks technical events and webcasts focused on a variety of IBM products and IT industry topics.
- Attend a free developerWorks Live! briefing to get up-to-speed quickly on IBM products and tools as well as IT industry trends.
- Follow developerWorks on Twitter.
- Watch developerWorks on-demand demos ranging from product installation and setup demos for beginners, to advanced functionality for experienced developers.
Get products and technologies
- Download IBM Data Studio full client 3.1.
- Download DB2 Express-C, at no-charge version of DB2 Express Edition for the community that offers the same core data features as DB2 Express Edition and provides a solid base to build and deploy application.
- Evaluate IBM products in the way that suits you best: Download a product trial, try a product online, use a product in a cloud environment, or spend a few hours in the SOA Sandbox learning how to implement Service Oriented Architecture efficiently.
- Visit the Managing the data lifecycle team blog.
- Get involved in the CDC (Change Data Capture) community. Connect with other CDC users while exploring the developer-driven blogs, forums, groups, and wikis.
- Get involved in the My developerWorks community. Connect with other developerWorks users while exploring the developer-driven blogs, forums, groups, and wikis.
Dig deeper into Information management on developerWorks
Get samples, articles, product docs, and community resources to help build, deploy, and manage your cloud apps.
Experiment with new directions in software development.
Software development in the cloud. Register today to create a project.
Evaluate IBM software and solutions, and transform challenges into opportunities.