SQL Server
  • 2 minutes to read
  • Print
  • Share
  • Dark
    Light

SQL Server

  • Print
  • Share
  • Dark
    Light

The SQL Server adapter imports device information from arbitrary SQL servers: Microsoft SQL Server, MySQL and PostgreSQL.

The following parameters are required:

  1. SQL Server Domain - The hostname / domain of the SQL server.

  2. SQL Server port - The port of the SQL server.

  3. User Name - A user name with read-only permissions .
    Important Notes:

    • The best practice is to create a dedicate SQL local user for Axonius usage. For details on creating a Axonius user for Microsoft SQL Server, see Creating a Local Read-Only User for Microsoft SQL Server.
    • If you are using a domain user:
      • Specify the domain and the user name in the following format: domain\username.
      • The user must not be a service account.
      • Interactive logon must be enabled.
  4. Password - The user's password. The password must not include ";".

  5. SQL Server Database Name - The database to connect to.

  6. SQL Server Table Name - The name of the table to fetch information from.

  7. Server Tag (optional) - Specify a custom tag for SQL Server adapter connection you have configured. This new field will tell the adapter to set a Server Tag field with the defined value.

  8. Database Type - MSSQL, MySQL or PostgreSQL.

  9. Choose Instance - If you are using multi-nodes, choose the Axonius node that is integrated with the adapter. By default, the 'Master' Axonius node (instance) is used. For details, see Connecting Additional Axonius Nodes

image.png

Creating a Local Read-Only User for Microsoft SQL Server

To connect to the Microsoft SQL Server to create such a user, you can use Microsoft SQL Server Management Studio. If you don't have it on your local machine, you can probably find it on the machine the Microsoft SQL Server is installed on.

After connecting to the server, you should do the following:

  1. If you don't have the name of your database, expand the Databases folder which shows all the databases in this server. Your database should appear here, starting with "CM_".

  2. Navigate to the Security folder and expand it. Right-click the Logins folder and click New Login.

    image.png

  3. Create a user using the "SQL Server Authentication" option. Fill in the details and select your database from the Default Database List.

    image.png

  4. Navigate to the User Mapping page, and check the check box for the database that your login can access. In the Database role membership list, leave the default option public selected, and select the db_datareader check box.

    image.png

  5. Click OK and create the user.

  6. Reconnect with the new user to validate that it was indeed created (File -> Connect Object Explorer)

    image.png

Troubleshooting

  • "Login failed" - If you are using a domain user, in the User Name field, specify the domain and the user name in the following format: domain\username.
  • "Login failed. The login is from an untrusted domain and cannot be used with Windows authentication." - Enable interactive logon.
Was this article helpful?