Installing the CodeLogic SQL Agent (Windows)

The agents send metadata to the CodeLogic Server, they are installed on the servers upon which the applications or databases are running. The applications and databases to be scanned are specified in the agent configuration files.

  1. Download the Windows SQL Agent

    1. From a web browser on your system, log in to the CodeLogic Server.

    2. Click Admin and then select the Installers tab.

    3. Click Download on Windows SQL Agent to download the Windows installer package.

      Graphical user interface, text, application  Description automatically generated

  2. Run the Installer

    1. Double-click the downloaded codelogic-sql.msi icon to begin installation.

    2. Read and Accept the License Agreement and click Next.

    3. Enter the IP address of the CodeLogic Server and click Next.

    4. Optionally, enter a descriptive name for the agent.

    5. Complete the installation.

  3. Execute or Start the Agent

    The CodeLogicSQL Agent (Windows) can be executed through a Command-Line Interface (CLI) or started through the Graphical User Interface (GUI).

    Follow step a for CLI or step b for GUI.

    1. The Windows CLI is in C:\Program Files (x86)\CodeLogic\sql\run_agent.bat.


      The agent must not be running for an interactive session to start.

      A list of commands executed while in the shell is saved in a text file of the current working directory.

      You may be required to start a cmd terminal as an Administrator.


      cd "C:\Program Files (x86)\CodeLogic\sql" 
      SET JAVA_HOME="%CD%\AdoptOpenJDK" 
      %JAVA_HOME%\bin\java -jar "%CD%\cc-java-agent-main.jar"

      Alternatively, the run_agent.bat script is used to run the agent interactively.


      "C:\Program Files (x86)\CodeLogic\sql\run_agent.bat" 
    2. Double-click the SQL Agent CLI shortcut on the desktop or from the Start menu below CodeLogic.

      The agent will start and await registration confirmation from the CodeLogic Server. When the agent is approved by the CodeLogic Server, the agent is run interactively. Executing Agents Interactively via the CLI

      Interactive Agent Session


      If the application.yml file is not configured, the agent will not start:

      Configure application.yml file

  4. Authorize the Agent

    For security, agents must be authorized before they will send metadata to the CodeLogic Server.

    1. From a web browser on your system, log in to the CodeLogic Server.

    2. Click Admin and then select the Agents tab.

    3. Locate the agent in the list.


      The Request Status will be listed as OPEN.

    4. Click the more menu icon in the Actions column and select Approve/Reject.

      The Approve window opens.

    5. Optionally, enter a name for the agent in the Agent Name field.

    6. Click Approve to complete the authorization process.

Next Steps   To run a scan immediately, see Binary Scanning via Command Line (SQL). To configure scanning, and set up a scanning schedule, see Configuring the CodeLogic SQL Agent.