Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

Commit e28f619

Browse files
authored
Merge pull request #3267 from douglaslMS/ssis-deploy-run
12 new quickstarts plus TOC updates
2 parents 1c35d2b + 46eb804 commit e28f619

13 files changed

Lines changed: 1000 additions & 0 deletions

docs/integration-services/TOC.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,23 @@
66
## [New and recently updated articles](new-updated-integration-services.md)
77
## [Integration Services Features Supported by the Editions of SQL Server](integration-services-features-supported-by-the-editions-of-sql-server.md)
88
## [Integration Services Backward Compatibility](integration-services-backward-compatibility.md)
9+
10+
# Quickstarts
11+
## Deploy
12+
### [Deploy with SSMS](./ssis-quickstart-deploy-ssms.md)
13+
### [Deploy with Transact-SQL (SSMS)](./ssis-quickstart-deploy-tsql-ssms.md)
14+
### [Deploy with Transact-SQL (VS Code)](ssis-quickstart-deploy-tsql-vscode.md)
15+
### [Deploy from the command prompt](./ssis-quickstart-deploy-cmdline.md)
16+
### [Deploy with PowerShell](ssis-quickstart-deploy-powershell.md)
17+
### [Deploy with C#](./ssis-quickstart-deploy-dotnet.md)
18+
## Run
19+
### [Run with SSMS](./ssis-quickstart-run-ssms.md)
20+
### [Run with Transact-SQL (SSMS)](./ssis-quickstart-run-tsql-ssms.md)
21+
### [Run with Transact-SQL (VS Code)](ssis-quickstart-run-tsql-vscode.md)
22+
### [Run from the command prompt](./ssis-quickstart-run-cmdline.md)
23+
### [Run with PowerShell](ssis-quickstart-run-powershell.md)
24+
### [Run with C#](./ssis-quickstart-run-dotnet.md)
25+
926
# [Install or upgrade](../integration-services/install-windows/install-integration-services.md)
1027

1128
# [Development and management Tools](integration-services-ssis-development-and-management-tools.md)
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
---
2+
title: "Deploy an SSIS project from the command prompt | Microsoft Docs"
3+
ms.date: "09/25/2017"
4+
ms.topic: "article"
5+
ms.prod: "sql-server-2017"
6+
ms.technology:
7+
- "integration-services"
8+
author: "douglaslMS"
9+
ms.author: "douglasl"
10+
manager: "craigg"
11+
---
12+
# Deploy an SSIS project from the command prompt with ISDeploymentWizard.exe
13+
This quick start tutorial demonstrates how to deploy an SSIS project from the command prompt by running the Integration Services Deployment Wizard, `ISDeploymentWizard.exe`.
14+
15+
For more info about the Integration Services Deployment Wizard, see [Integration Services Deployment Wizard](/sql/integration-services/packages/deploy-integration-services-ssis-projects-and-packages.md#integration-services-deployment-wizard).
16+
17+
## Start the Integration Services Deployment Wizard
18+
1. Open a Command Prompt window.
19+
20+
2. Run `ISDeploymentWizard.exe`. The Integration Services Deployment Wizard opens.
21+
22+
If the folder that contains `ISDeploymentWizard.exe` is not in your `path` environment variable, you may have to use the `cd` command to change to its directory. For SQL Server 2017, this folder is typically `C:\Program Files (x86)\Microsoft SQL Server\140\DTS\Binn`.
23+
24+
## Deploy a project with the wizard
25+
1. On the **Introduction** page of the wizard, review the introduction. Click **Next** to open the **Select Source** page.
26+
27+
2. On the **Select Source** page, select the existing SSIS project to deploy.
28+
- To deploy a project deployment file that you created, select **Project deployment file** and enter the path to the .ispac file.
29+
- To deploy a project that resides in an SSIS catalog, select **Integration Services catalog**, and then enter the server name and the path to the project in the catalog.
30+
Click **Next** to see the **Select Destination** page.
31+
32+
3. On the **Select Destination** page, select the destination for the project.
33+
- Enter the fully qualified server name. If the target server is an Azure SQL Database server, the name is in this format: `<server_name>.database.windows.net`.
34+
- Then click **Browse** to select the target folder in SSISDB.
35+
Click **Next** to open the **Review** page.
36+
37+
4. On the **Review** page, review the settings you selected.
38+
- You can change your selections by clicking **Previous**, or by clicking any of the steps in the left pane.
39+
- Click **Deploy** to start the deployment process.
40+
41+
5. After the deployment process is complete, the **Results** page opens. This page displays the success or failure of each action.
42+
- If the action failed, click **Failed** in the **Result** column to display an explanation of the error.
43+
- Optionally, click **Save Report...** to save the results to an XML file.
44+
- Click **Close** to exit the wizard.
45+
46+
## Next steps
47+
- Consider other ways to deploy a package.
48+
- [Deploy an SSIS package with SSMS](./ssis-quickstart-deploy-ssms.md)
49+
- [Deploy an SSIS package with Transact-SQL (SSMS)](./ssis-quickstart-deploy-tsql-ssms.md)
50+
- [Deploy an SSIS package with Transact-SQL (VS Code)](ssis-quickstart-deploy-tsql-vscode.md)
51+
- [Deploy an SSIS package with PowerShell](ssis-quickstart-deploy-powershell.md)
52+
- [Deploy an SSIS package with C#](./ssis-quickstart-deploy-dotnet.md)
53+
- Run a deployed package. To run a package, you can choose from several tools and languages. For more info, see the following articles:
54+
- [Run an SSIS package with SSMS](./ssis-quickstart-run-ssms.md)
55+
- [Run an SSIS package with Transact-SQL (SSMS)](./ssis-quickstart-run-tsql-ssms.md)
56+
- [Run an SSIS package with Transact-SQL (VS Code)](ssis-quickstart-run-tsql-vscode.md)
57+
- [Run an SSIS package from the command prompt](./ssis-quickstart-run-cmdline.md)
58+
- [Run an SSIS package with PowerShell](ssis-quickstart-run-powershell.md)
59+
- [Run an SSIS package with C#](./ssis-quickstart-run-dotnet.md)
Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
---
2+
title: "Deploy an SSIS project with .NET code (C#) | Microsoft Docs"
3+
ms.date: "09/25/2017"
4+
ms.topic: "article"
5+
ms.prod: "sql-server-2017"
6+
ms.technology:
7+
- "integration-services"
8+
author: "douglaslMS"
9+
ms.author: "douglasl"
10+
manager: "craigg"
11+
---
12+
# Deploy an SSIS project with C# code in a .NET app
13+
This quick start tutorial demonstrates how to write C# code to connect to a database server and deploy an SSIS project.
14+
15+
To create a C# app, you can use Visual Studio, Visual Studio Code, or another tool of your choice.
16+
17+
## Prerequisites
18+
19+
Before you start, make sure you have Visual Studio or Visual Studio Code installed. Download the free Community edition of Visual Studio, or the free Visual Studio Code, from [Visual Studio Downloads](https://www.visualstudio.com/downloads/).
20+
21+
> [!NOTE]
22+
> An Azure SQL Database server listens on port 1433. If you're trying to connect to an Azure SQL Database server from within a corporate firewall, this port must be open in the corporate firewall for you to connect successfully.
23+
24+
## Get the connection info if deployed to SQL Database
25+
26+
If your packages are deployed to an Azure SQL Database, get the connection information you need to connect to the SSIS Catalog database (SSISDB). You need the fully qualified server name and login information in the procedures that follow.
27+
28+
1. Log in to the [Azure portal](https://portal.azure.com/).
29+
2. Select **SQL Databases** from the left-hand menu, and click the SSISDB database on the **SQL databases** page.
30+
3. On the **Overview** page for your database, review the fully qualified server name. To bring up the **Click to copy** option, hover over the server name.
31+
4. If you forget your Azure SQL Database server login information, navigate to the SQL Database server page to view the server admin name. You can reset the password if necessary.
32+
5. Click **Show database connection strings**.
33+
6. Review the complete **ADO.NET** connection string. The sample code uses a `SqlConnectionStringBuilder` to recreate this connection string with the individual parameter values that you provide.
34+
35+
## Create a new Visual Studio project
36+
37+
1. In Visual Studio, choose **File**, **New**, **Project**.
38+
2. In the **New Project** dialog, and expand **Visual C#**.
39+
3. Select **Console App** and enter *deploy_ssis_project* for the project name.
40+
4. Click **OK** to create and open the new project in Visual Studio.
41+
42+
## Add references
43+
1. In Solution Explorer, right-click the **References** folder and select **Add Reference**. The **Reference Manager** dialog box opens.
44+
2. In the **Reference Manager** dialog box, expand **Assemblies** and select **Extensions**.
45+
3. Select the following two references to add:
46+
- Microsoft.SqlServer.Management.Sdk.Sfc
47+
- Microsoft.SqlServer.Smo
48+
4. Click the **Browse** button to add a reference to **Microsoft.SqlServer.Management.IntegrationServices**. (This assembly is installed only in the global assembly cache (GAC).) The **Select the files to reference** dialog box opens.
49+
5. In the **Select the files to reference** dialog box, navigate to the GAC folder that contains the assembly. Typically this folder is `C:\Windows\assembly\GAC_MSIL\Microsoft.SqlServer.Management.IntegrationServices\14.0.0.0__89845dcd8080cc91`.
50+
6. Select the assembly (that is, the .dll file) in the folder and click **Add**.
51+
7. Click **OK** to close the **Reference Manager** dialog box and add the three references. To make sure the references are there, check the **References** list in Solution Explorer.
52+
53+
## Add the C# code
54+
1. Open **Program.cs**.
55+
56+
2. Replace the contents of **Program.cs** with the following code. Add the appropriate values for your server, database, user, and password.
57+
58+
> [!NOTE]
59+
> The following example uses Windows Authentication. To use SQL Server authentication, replace the `Integrated Security=SSPI;` argument with `User ID=<user name>;Password=<password>;`.
60+
61+
```csharp
62+
using Microsoft.SqlServer.Management.IntegrationServices;
63+
using System;
64+
using System.Data.SqlClient;
65+
using System.IO;
66+
67+
namespace deploy_ssis_project
68+
{
69+
class Program
70+
{
71+
static void Main(string[] args)
72+
{
73+
// Variables
74+
string targetServerName = "localhost";
75+
string targetFolderName = "Project1Folder";
76+
string projectName = "Integration Services Project1";
77+
string projectFilePath = @"C:\Projects\Integration Services Project1\Integration Services Project1\bin\Development\Integration Services Project1.ispac";
78+
79+
// Create a connection to the server
80+
string sqlConnectionString = "Data Source=" + targetServerName +
81+
";Initial Catalog=master;Integrated Security=SSPI;";
82+
SqlConnection sqlConnection = new SqlConnection(sqlConnectionString);
83+
84+
// Create the Integration Services object
85+
IntegrationServices integrationServices = new IntegrationServices(sqlConnection);
86+
87+
// Get the Integration Services catalog
88+
Catalog catalog = integrationServices.Catalogs["SSISDB"];
89+
90+
// Create the target folder
91+
CatalogFolder folder = new CatalogFolder(catalog,
92+
targetFolderName, "Folder description");
93+
folder.Create();
94+
95+
Console.WriteLine("Deploying " + projectName + " project.");
96+
97+
byte[] projectFile = File.ReadAllBytes(projectFilePath);
98+
folder.DeployProject(projectName, projectFile);
99+
100+
Console.WriteLine("Done.");
101+
}
102+
}
103+
}
104+
```
105+
106+
## Run the code
107+
108+
1. To run the application, press **F5**.
109+
2. In SSMS, verify that the project has been deployed.
110+
111+
## Next steps
112+
- Consider other ways to deploy a package.
113+
- [Deploy an SSIS package with SSMS](./ssis-quickstart-deploy-ssms.md)
114+
- [Deploy an SSIS package with Transact-SQL (SSMS)](./ssis-quickstart-deploy-tsql-ssms.md)
115+
- [Deploy an SSIS package with Transact-SQL (VS Code)](ssis-quickstart-deploy-tsql-vscode.md)
116+
- [Deploy an SSIS package from the command prompt](./ssis-quickstart-deploy-cmdline.md)
117+
- [Deploy an SSIS package with PowerShell](ssis-quickstart-deploy-powershell.md)
118+
- Run a deployed package. To run a package, you can choose from several tools and languages. For more info, see the following articles:
119+
- [Run an SSIS package with SSMS](./ssis-quickstart-run-ssms.md)
120+
- [Run an SSIS package with Transact-SQL (SSMS)](./ssis-quickstart-run-tsql-ssms.md)
121+
- [Run an SSIS package with Transact-SQL (VS Code)](ssis-quickstart-run-tsql-vscode.md)
122+
- [Run an SSIS package from the command prompt](./ssis-quickstart-run-cmdline.md)
123+
- [Run an SSIS package with PowerShell](ssis-quickstart-run-powershell.md)
124+
- [Run an SSIS package with C#](./ssis-quickstart-run-dotnet.md)
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
---
2+
title: "Deploy an SSIS project with PowerShell | Microsoft Docs"
3+
ms.date: "09/25/2017"
4+
ms.topic: "article"
5+
ms.prod: "sql-server-2017"
6+
ms.technology:
7+
- "integration-services"
8+
author: "douglaslMS"
9+
ms.author: "douglasl"
10+
manager: "craigg"
11+
---
12+
# Deploy an SSIS project with PowerShell
13+
This quick start tutorial demonstrates how to use a PowerShell script to connect to a database server and deploy an SSIS project to the SSIS Catalog.
14+
15+
## PowerShell script
16+
Provide appropriate values for the variables at the top of the following script, and then run the script to deploy the SSIS project.
17+
18+
> [!NOTE]
19+
> The following example uses Windows Authentication. To use SQL Server authentication, replace the `Integrated Security=SSPI;` argument with `User ID=<user name>;Password=<password>;`.
20+
21+
```powershell
22+
# Variables
23+
$SSISNamespace = "Microsoft.SqlServer.Management.IntegrationServices"
24+
$TargetServerName = "localhost"
25+
$TargetFolderName = "Project1Folder"
26+
$ProjectFilePath = "C:\Projects\Integration Services Project1\Integration Services Project1\bin\Development\Integration Services Project1.ispac"
27+
$ProjectName = "Integration Services Project1"
28+
29+
# Load the IntegrationServices assembly
30+
$loadStatus = [System.Reflection.Assembly]::Load("Microsoft.SQLServer.Management.IntegrationServices, "+
31+
"Version=14.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL")
32+
33+
# Create a connection to the server
34+
$sqlConnectionString = `
35+
"Data Source=" + $TargetServerName + ";Initial Catalog=master;Integrated Security=SSPI;"
36+
$sqlConnection = New-Object System.Data.SqlClient.SqlConnection $sqlConnectionString
37+
38+
# Create the Integration Services object
39+
$integrationServices = New-Object $SSISNamespace".IntegrationServices" $sqlConnection
40+
41+
# Get the Integration Services catalog
42+
$catalog = $integrationServices.Catalogs["SSISDB"]
43+
44+
# Create the target folder
45+
$folder = New-Object $SSISNamespace".CatalogFolder" ($catalog, $TargetFolderName,
46+
"Folder description")
47+
$folder.Create()
48+
49+
Write-Host "Deploying " $ProjectName " project ..."
50+
51+
# Read the project file and deploy it
52+
[byte[]] $projectFile = [System.IO.File]::ReadAllBytes($ProjectFilePath)
53+
$folder.DeployProject($ProjectName, $projectFile)
54+
55+
Write-Host "Done."
56+
```
57+
58+
## Next steps
59+
- Consider other ways to deploy a package.
60+
- [Deploy an SSIS package with SSMS](./ssis-quickstart-deploy-ssms.md)
61+
- [Deploy an SSIS package with Transact-SQL (SSMS)](./ssis-quickstart-deploy-tsql-ssms.md)
62+
- [Deploy an SSIS package with Transact-SQL (VS Code)](ssis-quickstart-deploy-tsql-vscode.md)
63+
- [Deploy an SSIS package from the command prompt](./ssis-quickstart-deploy-cmdline.md)
64+
- [Deploy an SSIS package with C#](./ssis-quickstart-deploy-dotnet.md)
65+
- Run a deployed package. To run a package, you can choose from several tools and languages. For more info, see the following articles:
66+
- [Run an SSIS package with SSMS](./ssis-quickstart-run-ssms.md)
67+
- [Run an SSIS package with Transact-SQL (SSMS)](./ssis-quickstart-run-tsql-ssms.md)
68+
- [Run an SSIS package with Transact-SQL (VS Code)](ssis-quickstart-run-tsql-vscode.md)
69+
- [Run an SSIS package from the command prompt](./ssis-quickstart-run-cmdline.md)
70+
- [Run an SSIS package with PowerShell](ssis-quickstart-run-powershell.md)
71+
- [Run an SSIS package with C#](./ssis-quickstart-run-dotnet.md)

0 commit comments

Comments
 (0)