My code have not a problem. I know that because to console application don't execute only in my machine. Basically I load the package and after execute.
I tried:
Services status
Below the code, but have not error.
using Microsoft.SqlServer.Dts.Runtime;
public void Execute()
{
Database database = DatabaseFactory.CreateDatabase("MyConnection");
try
{
parametrosConfig = new ParametrosConfigBatch();
string strPathPacote = parametrosConfig.PathDTSX;
DataTable _dt = new DataTable();
_dt = GetMyDataTable();
package = app.LoadPackage(strPathPacote, null);
Variables myVars = package.Variables;
package.Variables["User::varArquivo"].Value = _dt;
dtsResultado = package.Execute(null, myVars, null, null, null);
if (dtsResultado == DTSExecResult.Success)
{
...
}
else
{
...
}
}
catch (Exception ex)
{
...
}
finally
{
insert.Close();
}
}
As result I receive Failure with message: To run an SSIS package outside SQL Server Data Tools, install Integration Services Standard Edition (64-bit) or later.
Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Failure
Error code: -1073679321
Description: To run an SSIS package outside SQL Server Data Tools, install Integration Services Standard Edition (64-bit) or later.
I think that need install something, but a don't know what.
Tanks Hadi, with your help I can resolve the problem. I would like complement your anwser.
To resolve the problem, I made folow:
Don't forget reboot the operational system after uninstall process.
The SQL Server 2017 Setup result error whether you have the Microsoft Visual C++ 2017 installed in your Operational System.
The SQL 2017 needs of the MV C++ 2015. Because this you need remove the latest versions.
To check Integration Service status your need:
To download from SQL Server use microsoft site [https://www.microsoft.com/pt-br/sql-server/sql-server-downloads]
Don't use SQL Server Express use Developer Edition. Also reade Hadi's Answer for more learning more.