You can use the "DatabaseMaintenance.exe" file in the 'Tools' folder of your lansweeper installation to run some basic sql commands on your lansweeper DB.. (click on script execution tab in the program)
However, I would write a powershell script that does all of that. You can insert data into an SQL database using powershell and you can also import data to sql from an excel/csv file using powershell.... Writing the script would take a little time but if you research how to insert to sql from csv with powershell you should be able to accomplish what you want.
Here is a powershell function I wrote to connect with sql, it may provide you some guidance.
function RunMSSQLQuery {
param(
[Parameter(Mandatory = $true)][String] $mssql_server_instance,
[Parameter(Mandatory = $true)][String] $mssql_databasename,
[Parameter(Mandatory = $true)][String] $mssql_query
)
$dbquery = $mssql_query
#Delcare Connection Variables
$connectionTemplate = "Data Source={0};Integrated Security=SSPI;Initial Catalog={1};"
#$connectionTemplate = "Data Source={0};Integrated Security=false;Initial Catalog={1};User ID=$ms_uid;Password =$ms_pwd;"
$connectionString = [string]::Format($connectionTemplate, $mssql_server_instance, $mssql_databasename)
#Establish connection to SQL server
$connection = New-Object System.Data.SqlClient.SqlConnection
$connection.ConnectionString = $connectionString
#Execute database query command
$command = New-Object System.Data.SqlClient.SqlCommand
$command.CommandText = $dbquery
$command.Connection = $connection
$command.CommandTimeout = 0
#Load up the Tables in a dataset
$SqlAdapter = New-Object System.Data.SqlClient.SqlDataAdapter
$SqlAdapter.SelectCommand = $command
$DataSet = New-Object System.Data.DataSet
$EXECUTE_QUERY = $SqlAdapter.Fill($DataSet)
$connection.Close()
if ($EXECUTE_QUERY)
{
Write-Host `n"Query executed: "$dbquery
}
return $dbquery
}