Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ssis/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Sql server 获取运行SSIS包的用户_Sql Server_Ssis_Etl_Sql Server Data Tools - Fatal编程技术网

Sql server 获取运行SSIS包的用户

Sql server 获取运行SSIS包的用户,sql-server,ssis,etl,sql-server-data-tools,Sql Server,Ssis,Etl,Sql Server Data Tools,在我的SSIS包中,我需要知道执行包的用户的windows用户ID是什么 我编写了一个从WPF应用程序中手动执行的SSIS包,我需要知道windows用户ID。如果需要使用执行包的人员的用户名,可以使用此内置系统变量: @[System::UserName] 如果登录用户需要在脚本任务中使用,则可以通过以下方式执行: Dts.Variables("System::UserName").Value 注意返回完整路径(域+用户ID)。您可能需要使用字符串函数从域中提取用户ID

在我的SSIS包中,我需要知道执行包的用户的windows用户ID是什么


我编写了一个从WPF应用程序中手动执行的SSIS包,我需要知道windows用户ID。

如果需要使用执行包的人员的用户名,可以使用此内置系统变量:

@[System::UserName]
如果登录用户需要在
脚本任务中使用
,则可以通过以下方式执行:

Dts.Variables("System::UserName").Value
注意返回完整路径(域+用户ID)。您可能需要使用字符串函数从域中提取用户ID