How to Test All Connection using BusinessObjects SDK

Problem

“I was doing some research in the past but could not find any solution out on the WEB, but think it would be helpful for BO admins. Tool, that can test all the universe connection from environment without using Designer tool, since in it you can test one connection at the time, but if you have 50 of them that is a lot of clicks. In our company , we often change database passwords and need to update connections setting, and sometimes we can miss 1-2 and few days later some reports will start failing or people will complain that they can run certain report (because database password was not been updated). So I was thinking about some utility that can use designer SDK that can go and loop through all the universe connections in the system and return pass or fail.”

Code

static void Main(string[] args)
{
   Application application = new Application();
   try
   {
      if (args.Length != 4)
      {
         application.LogonDialog();
      }

      Connections connections = application.Connections;
      foreach (Connection connection in connections)
      {
         Console.Write(connection.Name.PadRight(40));
         try
         {
            connection.Test();
            Console.WriteLine("OK");
         }
         catch (Exception ex)
         {
            Console.WriteLine(ex.Message.Replace("\n","").Replace("\r",""));
         }
      }
   }
   catch (Exception ex)
   {
      Console.WriteLine(ex.ToString());
   }
   finally
   {
      application.Quit();
   }
}

Downloads

download source Source
download executable Executable for BOE XI 3.1 SP3 FP3.2

The executable should be run from command line as the result is printed to standard output. The arguments are: username password server auth. E.g.

TestConnections.exe Administrator "" localhost secEnterprise > c:/connectionstest.txt

If you do not specify the arguments, the designer logon dialog will appear.

6 thoughts on “How to Test All Connection using BusinessObjects SDK

  1. Balaji

    Hi Dmytro,

    This really awesome and I was looking for one of same kind.
    I do not see the Output written on any log or text File ??

    Thanks
    Balaji K

    Like

    Reply
    1. dmytro Post author

      It writes the output on the screen. So you should either run it from command line or create a batch file that redirects to a file:

      TestConnections.exe Administrator "" localhost secEnterprise > c:/connectionstest.txt
      

      The arguments are: username password server auth

      Thx – I will update the description.

      Like

      Reply
  2. Mani

    Hi Dmytro,

    Nice Idea. Seems the code is based on .net as I could see some assembly files. Do we have anything related to Java SDK for the same?

    Thanks
    Mani

    Like

    Reply
  3. Darren

    Hi Dmytro

    Does this use the connectivity that is local to the machine where the exe runs or does it use the connectivity of the server specified in the credentials.

    Thanks

    Like

    Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s