user1046415
user1046415

Reputation: 789

DB2 Datasource in SSRS

I have to connect to Db2 data source from SSRS and create reports.I installed latest Db2 client on my system.

While adding datasources in SSRS I selected "OLEDB" Datasource and then "IBM OLEDB Provider", after entering the servername,Username,pwd...it throws an error saying..

The database alias couldn't be found in db2dsdriver.cfg configuration file.

Can some one point me in right direction

Upvotes: 3

Views: 4812

Answers (1)

David
David

Reputation: 73574

The IBM documentation on that particular file can be found here. It explains what it is, and explains how to edit it.

Essentially, you'll need to edit the file on your Report Server and add the server name.

Exerpt:

The db2dsdriver.cfg configuration file can be edited. However, the file must be edited manually. In addition, after editing the file, you must restart the application for the changes to take effect. The configuration file is created in one of the following paths: for a data server client, the configuration file is created in a folder named cfg under the instance path:

  • On AIX®, HP-UX, Linux, or Solaris operating systems, instance_path/cfg
  • On Windows operating systems, instance_path\cfg

for a data server driver, the configuration file is created in a folder named cfg under the installation path:

  • On AIX, HP-UX, Linux, or Solaris operating systems, installation_path/cfg
  • On Windows operating systems, installation_path\cfg

A sample configuration file is shipped to help you get started. It is located in the sqllib/cfg directory. The configuration file contains the following sections:

  • the data source name section contained within the DSN_Collection tags,
  • the database information section contained within the databases tags,
  • the global attributes section contained within the parameters tags.
<configuration>
    <DSN_Collection>
        <dsn alias="alias1" name="name1" host="server1.net1.com" port="50001"/>
        <!-- Long aliases are supported -->
        <dsn alias="longaliasname2" name="name2" host="server2.net1.com" port="55551">
            <parameter name="Authentication" value="Client"/>
        </dsn>
    </DSN_Collection>
    <databases>
        <database name="name1" host="server1.net1.com" port="50001">
            <parameter name="CurrentSchema" value="OWNER1"/>
            <WLB>
                <parameter name="enableWLB" value="true"/>
                <parameter name="maxTransports" value="50"/>
            </WLB>
            <ACR>
                <parameter name="enableACR" value="true"/>
            </ACR>
        </database>
        <!-- Local IPC connection -->
        <database name="name3" host="localhost" port="0">
            <parameter name="IPCInstance" value="DB2"/>
            <parameter name="CommProtocol" value="IPC"/>
        </database>
    </databases>
    <parameters>
        <parameter name="GlobalParam" value="Value"/>
    </parameters>
</configuration>

Upvotes: 1

Related Questions