Results 1 to 12 of 12
  1. #1
    Join Date
    Jul 2012
    Posts
    6

    Unanswered: Enumerate all Databases with ADO.NET

    DB2DataSourceEnumerator dsenum = DB2DataSourceEnumerator.Instance;
    DataTable dt;

    dt = dsenum.GetDataSources();

    does not work

    thanks

  2. #2
    Join Date
    Apr 2006
    Location
    Belgium
    Posts
    2,514
    Provided Answers: 11
    so, what do you want us todo about this ? (no info = no answer)
    come over and explain ?
    Best Regards, Guy Przytula
    Database Software Consultant
    Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
    Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
    DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
    Information Server Datastage Certified
    http://www.infocura.be

  3. #3
    Join Date
    Jul 2012
    Posts
    6
    sorry my english is very bad.
    I like to monitor all Databases from one Instance.
    So i need a list of these in C# Service.
    Sample Code above provides only standard instance.
    I don't know why.
    Server config is discovery search for DAS on DB2 Version 10.1.

    thanks for help

  4. #4
    Join Date
    Apr 2006
    Location
    Belgium
    Posts
    2,514
    Provided Answers: 11
    what is : only standard instance.
    there are only client and server instance
    server instance can have db's - client not
    does not work : do you get errors .. please publish if any..
    list db directory - and output from application ???
    Best Regards, Guy Przytula
    Database Software Consultant
    Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
    Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
    DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
    Information Server Datastage Certified
    http://www.infocura.be

  5. #5
    Join Date
    Jul 2012
    Posts
    6
    Standard Instace: First Instance after installation. Second run installation routine to install second instance. I have two instances for testing.
    C# Funktion GetDataSources() from Ado.Net Provider should provides all available local and remote Instances and Databases. But it provides only first Instance with Databases.
    No errors during execution.

  6. #6
    Join Date
    Apr 2012
    Posts
    1,034
    Provided Answers: 18
    GetDataSources is working as designed.

    See this text:

    all databases cataloged on the local instance. In the case where there are multiple local DB2 instances, GetDataSources behavior is undefined.

    at this page:

    DB2DataSourceEnumerator.GetDataSources () Method


    But maybe you can use a workaround by having a separate (non ole/ado) method to catalog dynamically all visible connectable instances/databases...

  7. #7
    Join Date
    Jul 2012
    Posts
    6
    call with GetDataSources("ip", "port", "db2admin", "password");

    ends with this error:

    IBM.Data.DB2.DB2Exception (0x80004005): ERROR [2E000] [IBM] SQL1001N "SYSMASTER" is not a valid database name. SQLSTATE=2E000

    Firewall is open.

  8. #8
    Join Date
    Apr 2006
    Location
    Belgium
    Posts
    2,514
    Provided Answers: 11
    is sysmaster a dbname ?
    dbname is max 8 chars
    sounds like sql/server .... and master db
    Let me google that for you
    Best Regards, Guy Przytula
    Database Software Consultant
    Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
    Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
    DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
    Information Server Datastage Certified
    http://www.infocura.be

  9. #9
    Join Date
    Jul 2012
    Posts
    6
    i don´t use sysmaster for GetDataSources.
    only this parameters required: "ip", "port", "db2admin", "password"

  10. #10
    Join Date
    Apr 2012
    Posts
    1,034
    Provided Answers: 18
    Other people reported that symptom ( SQL1001N "SYSMASTER" is not a valid database name. SQLSTATE=2E000) in the past.

    Please post your *db2-client* version and fixpack.
    Please also post your *db2-server* version and fixpack and operating-system.

    You should *always* post your DB2 client and server version+fixpack details when you ask for help.

  11. #11
    Join Date
    Jul 2012
    Posts
    6
    DB2 Server: Express-C Version 10.1
    Client: ADO.Net Dll from Express-C
    OS: Windows Server 2008 R2

  12. #12
    Join Date
    Apr 2012
    Posts
    1,034
    Provided Answers: 18
    SysMaster is something I associate with Informix.
    I suspect buggy code or configuration screw ups.

    Take a CLI trace at your client, refer to the Infocenter for how to do that.

    Sometimes the CLI trace exposes the problem, and can lead to workarounds or solutions.

    If you have a DB2-support contract with IBM then open a PMR and supply the CLI trace.
    Otherwise attach it here.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •