BSA: blasadmin error when setting database ConnectionString in a PowerShell session

Version 1
    Share:|

    This document contains official content from the BMC Software Knowledge Base. It is automatically updated when the knowledge article is modified.


    PRODUCT:

    BladeLogic Server Automation - Configuration Module


    COMPONENT:

    BladeLogic Server Automation


    APPLIES TO:

    BladeLogic 8.x appserver



    PROBLEM:

    When using blasadmin to change database ConnectionString from a PowerShell command prompt, you receive one or more errors in the form of

    'DatabaseName=bladelogic' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
    'SelectMethod=cursor' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

    User-added image

     


    CAUSE:

    This is caused by PowerShell interpreting the semi-colon characters in the ConnectionString as PowerShell delimiters.


    SOLUTION:

    There are two solutions to this issue.

    1.) Use an elevated command prompt (CMD.exe run as administrator) when invoking blasadmin.

    or

    2.) In PowerShell, use the back-tick character (`) to escape any instances of semicolons.

      eg. blasadmin -a set database ConnectionString jdbc:sqlserver://mydatabase-server:1433`;DatabaseName=bladelogic`;SelectMethod=cursor

     


    Article Number:

    000161862


    Article Type:

    Solutions to a Product Problem



      Looking for additional information?    Search BMC Support  or  Browse Knowledge Articles