使用 Azure 中部署的 SSIS 包在本地和 Azure 中打开并保存文件Open and save files on premises and in Azure with SSIS packages deployed in Azure

适用于:是 Azure 数据工厂否 Azure Synapse Analytics(预览版)APPLIES TO: yesAzure Data Factory noAzure Synapse Analytics (Preview)

本文介绍将使用本地文件系统的 SSIS 包提升和移动到 Azure 中的 SSIS 时,如何在本地和 Azure 中打开并保存文件。This article describes how to open and save files on premises and in Azure when you lift and shift SSIS packages that use local file systems into SSIS in Azure.

保存临时文件Save temporary files

如果在单个包执行期间需存储和处理临时文件,包可以使用 Azure-SSIS Integration Runtime 节点的当前工作目录 (.) 或临时文件夹 (%TEMP%)。If you need to store and process temporary files during a single package execution, packages can use the current working directory (.) or temporary folder (%TEMP%) of your Azure-SSIS Integration Runtime nodes.

使用本地文件共享Use on-premises file shares

要在将使用本地文件系统的包提升和迁移到 Azure 中的 SSIS 时继续使用本地文件共享****,请执行以下操作:To continue to use on-premises file shares when you lift and shift packages that use local file systems into SSIS in Azure, do the following things:

  1. 将文件从本地文件系统传输到本地文件共享。Transfer files from local file systems to on-premises file shares.

  2. 将本地文件共享联接到 Azure 虚拟网络。Join the on-premises file shares to an Azure virtual network.

  3. 将 Azure-SSIS IR 联接到同一个虚拟网络。Join your Azure-SSIS IR to the same virtual network. 有关详细信息,请参阅将 Azure-SSIS 集成运行时加入虚拟网络For more info, see Join an Azure-SSIS integration runtime to a virtual network.

  4. 通过设置使用 Windows 身份验证的访问凭据,将 Azure-SSIS IR 连接到同一个虚拟网络内的本地文件共享。Connect your Azure-SSIS IR to the on-premises file shares inside the same virtual network by setting up access credentials that use Windows authentication. 有关详细信息,请参阅使用 Windows 身份验证连接到数据和文件共享For more info, see Connect to data and file shares with Windows Authentication.

  5. 将包中的本地文件路径更新为指向本地文件共享的 UNC 路径。Update local file paths in your packages to UNC paths pointing to on-premises file shares. 例如,将 C:\abc.txt 更新为 \\<on-prem-server-name>\<share-name>\abc.txtFor example, update C:\abc.txt to \\<on-prem-server-name>\<share-name>\abc.txt.

使用 Azure 文件共享Use Azure file shares

若直接迁移将本地文件系统使用到 Azure 中 SSIS 时要使用 Azure 文件****,请执行以下操作:To use Azure Files when you lift and shift packages that use local file systems into SSIS in Azure, do the following things:

  1. 将本地文件系统的文件传输到 Azure 文件。Transfer files from local file systems to Azure Files. 有关详细信息,请参阅 Azure 文件For more info, see Azure Files.

  2. 通过设置使用 Windows 身份验证的访问凭据,将 Azure-SSIS IR 连接到 Azure 文件。Connect your Azure-SSIS IR to Azure Files by setting up access credentials that use Windows authentication. 有关详细信息,请参阅使用 Windows 身份验证连接到数据和文件共享For more info, see Connect to data and file shares with Windows Authentication.

  3. 更新包中的本地文件路径到指向 Azure 文件的 UNC 路径。Update local file paths in your packages to UNC paths pointing to Azure Files. 例如,将 C:\abc.txt 更新为 \\<storage-account-name>.file.core.chinacloudapi.cn\<share-name>\abc.txtFor example, update C:\abc.txt to \\<storage-account-name>.file.core.chinacloudapi.cn\<share-name>\abc.txt.

后续步骤Next steps