SSIS -Set database password without clear text - SENSITIVE PARAMETERS - GetSensitiveValue()
public void Main()
{
try
{
string strPassword = Dts.Variables["$Project::up_DBPassword"].GetSensitiveValue().ToString();
if (!string.IsNullOrEmpty(strPassword))
{
Dts.Variables["User::uv_DBPasswordSensitiveValue"].Value = strPassword;
}
Dts.TaskResult = (int)ScriptResults.Success;
}
catch (Exception e)
{
Dts.Log(e.Message, 0, null);
Dts.TaskResult = (int)ScriptResults.Failure;
throw (e);
}
Dts.TaskResult = (int)ScriptResults.Success;
}