Topic
3 replies Latest Post - ‏2012-05-04T14:10:34Z by arturr
LachlanMcC
LachlanMcC
1 Post
ACCEPTED ANSWER

Pinned topic How can I recursivly list all datasources in Cognos 10 and test them

‏2012-04-05T02:03:46Z |
I am wanting to be able to list all datasources in Cognos 10 and also test their connectivity. I am assuming this can be done via the SDK. Just unsure how to construct the query to get the initial list.

Thanks in advnace.
Updated on 2012-05-04T14:10:34Z at 2012-05-04T14:10:34Z by arturr
  • BirajSaha
    BirajSaha
    11 Posts
    ACCEPTED ANSWER

    Re: How can I recursivly list all datasources in Cognos 10 and test them

    ‏2012-04-17T14:42:07Z  in response to LachlanMcC
    I'd query for all data sources via Content Manager Service, then iterate thru them and then for each invoke the "testDataSourceConnection" method via Metadata Service. Consult the SDK Developer's Guide for further details.
  • arturr
    arturr
    11 Posts
    ACCEPTED ANSWER

    Re: How can I recursivly list all datasources in Cognos 10 and test them

    ‏2012-05-04T14:09:02Z  in response to LachlanMcC
    the query can look like that:
    BaseClass{}, new QueryOptions());
    You can specify dataSourceProps as an array of:
    PropEnum [] dataSourceProps = {
    PropEnum.defaultName, PropEnum.searchPath,
    PropEnum.disabled, PropEnum.permissions,
    PropEnum.policies, PropEnum.connections,
    PropEnum.name, PropEnum.location,
    PropEnum.parent, PropEnum.description,
    PropEnum.connectionString, PropEnum.screenTip,
    PropEnum.isolationLevel, PropEnum.openConnectionCommands
    };

    You can specify only properties you need.
    • arturr
      arturr
      11 Posts
      ACCEPTED ANSWER

      Re: How can I recursivly list all datasources in Cognos 10 and test them

      ‏2012-05-04T14:10:34Z  in response to arturr
      this is the query:
      BaseClass[] dataSources = cm.query(new SearchPathMultipleObject("CAMID(\":\")//dataSource//*"),
      dataSourceProps, new Sort[]{}, new QueryOptions());