- 20 Nov 2024
- 3 Minutes to read
- Print
- DarkLight
- PDF
SQL - Send Assets to Table
- Updated on 20 Nov 2024
- 3 Minutes to read
- Print
- DarkLight
- PDF
SQL - Send Assets to Table inserts the assets returned by the selected query, or assets selected on the relevant asset page, to the MSSQL table supplied.
- Not all asset categories are supported for all Enforcement Actions.
- See Actions supported for Activity Logs, Adapters Fetch History, and Asset Investigation modules.
- See Actions supported for Vulnerabilities.
- See Actions supported for Software.
Required Fields
These fields must be configured to run the Enforcement Set.
- Action name - The name of this Enforcement Action. The system sets a default name. You can change the name.
- Configure Dynamic Values - Toggle on to enter a Dynamic Value statement. See Creating Enforcement Action Dynamic Value Statements to learn more about Dynamic Value statement syntax.
- DB Type - Select the type of database, either Oracle, MSSQL PostgreSQL or MySQL.
- SQL Server host - The hostname / domain of the SQL server.
- SQL Server port - The port of the SQL server.
- User name - The credentials for a user account that has the required permissions to fetch assets.NOTE
- The best practice is to create a dedicated SQL local user for Axonius usage. For details on creating an 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.
- Password - The user's password. The password must not include ";".
- SQL Server database name - The database to connect to.
- SQL Server table name - The name of the table to write query information to. Axonius runs a 'INSERT INTO [[specified value]] VALUES ([[query values]])' statement.
- Chunk size (default: 50) - When working with servers that are limited to certain data size in a request, break the message into chunks of the set size.
Compute Node - The Axonius node to use when connecting to the specified host. For more details, see Connecting Additional Axonius Nodes.
Additional Fields
- MySQL Character Set - Specify a custom character set (encoding) for connections to MySQL databases. Example values: 'utf8', 'latin1'. When no character set is specified, 'utf8' is used by default.
Note: This option is only valid when MySQL is selected from the Database Type dropdown. - Truncate table data before update - Select whether to truncate the table data before update.
- If enabled, the table data will be truncated and the table will contain only the newly added records.
- If disabled, the table data will not be truncated and new records will be added to the existing table.
- Create table if not exist - Select whether to create a new SQL table if the supplied table name does not exist.
- If enabled, a new SQL table will be created if the supplied table name is not found.
- If disabled, the action will fail, as the supplied table name is not found.
- Re-create table each time - Select to delete the table on the server side and create a new one every time the action is run
Map Axonius fields to adapter fields - Use the Field Mapping Wizard to map Axonius fields to fields in external systems. In this way you can transfer data found in Axonius into the external system as part of the configuration of relevant enforcement actions. The wizard shows you which fields exist on the Axonius system, allowing you to map them easily.
Note:For details, see Axonius to External Field Mapping.
- Split by field values - Use this option to create a new row for each item in the field. Enter a key (string) with data as stored in the database in the format of a list of dictionaries (str: str) or strings. If it's a list of strings only one column will be added for each In case of dictionary it will add a column for each key.
- Gateway Name - Select the Gateway through which to connect to perform the action.
For more details about other Enforcement Actions available, see Action Library.