mirror of
https://github.com/Microsoft/sql-server-samples.git
synced 2025-12-08 14:58:54 +00:00
updating readme for SSIS appdeploy sample.
This commit is contained in:
@@ -14,8 +14,6 @@
|
||||
|
||||
This is a sample [SQL Server Integration Services (SSIS)](https://docs.microsoft.com/en-us/sql/integration-services/sql-server-integration-services?view=sql-server-2017) app, which shows how to run a SSIS package as a scheduled service. This sample creates an app that is called each minute that executes an SSIS package. The SSIS package creates a backup of the `DWConfiguration` database on the master SQL instance to disk. Also, the package cleans any backup files for the `DWConfiguration` database that are older than one hour, making sure that maximum 60 backup files will be on disk at any moment.
|
||||
|
||||
Refer to [installing mssqlctl](https://docs.microsoft.com/en-us/sql/big-data-cluster/deploy-install-mssqlctl?view=sqlallproducts-allversions) document on setting up the mssqlctl and connecting to a Aris cluster.
|
||||
|
||||
<a name=before-you-begin></a>
|
||||
|
||||
## Before you begin
|
||||
@@ -24,9 +22,10 @@ To run this sample, you need the following prerequisites.
|
||||
|
||||
**Software prerequisites:**
|
||||
|
||||
1.SQL Server big data cluster CTP 2.3 or later.
|
||||
2. Optional: to see the SSIS package itself, install Visual Studio 2017 if you don't have it already. After that download and install [SSDT](https://docs.microsoft.com/en-us/sql/ssdt/download-sql-server-data-tools-ssdt?view=sql-server-2017#ssdt-for-vs-2017-standalone-installer).
|
||||
3. Optional: install [SSMS](https://docs.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms?view=sql-server-2017) if it is not already installed.
|
||||
1. SQL Server big data cluster CTP 2.3 or later.
|
||||
2. `mssqlctl`. Refer to [installing mssqlctl](https://docs.microsoft.com/en-us/sql/big-data-cluster/deploy-install-mssqlctl?view=sqlallproducts-allversions) document on setting up the `mssqlctl` and connecting to a SQL Server big data cluster.
|
||||
3. Optional: to see the SSIS package itself, install Visual Studio 2017 if you don't have it already. After that download and install [SSDT](https://docs.microsoft.com/en-us/sql/ssdt/download-sql-server-data-tools-ssdt?view=sql-server-2017#ssdt-for-vs-2017-standalone-installer).
|
||||
4. Optional: install [SSMS](https://docs.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms?view=sql-server-2017) if it is not already installed.
|
||||
|
||||
<a name=run-this-sample></a>
|
||||
|
||||
@@ -43,9 +42,9 @@ To run this sample, you need the following prerequisites.
|
||||
```bash
|
||||
mssqlctl app create --spec ./SSIS
|
||||
```
|
||||
5. Test the deployment by running the following command:
|
||||
5. Check the deployment by running the following command:
|
||||
```bash
|
||||
mssqlctl app list
|
||||
mssqlctl app list --name back-up-db --version [version]
|
||||
```
|
||||
Once the app is listed as `Ready` the job should run within a minute.
|
||||
You can check if the backup is created by running:
|
||||
@@ -57,7 +56,7 @@ To run this sample, you need the following prerequisites.
|
||||
6. You can clean up the sample by running the following commands:
|
||||
```bash
|
||||
# delete app
|
||||
mssqlctl app delete --name back-up-db --version v1
|
||||
mssqlctl app delete --name back-up-db --version [version]
|
||||
# delete backup files
|
||||
kubectl -n [your namespace] exec -it mssql-master-pool-0 -c mssql-server -- /bin/bash -c "rm /var/opt/mssql/data/*.DWConfigbak"
|
||||
```
|
||||
@@ -66,15 +65,25 @@ To run this sample, you need the following prerequisites.
|
||||
|
||||
## Sample details
|
||||
|
||||
### What is in the `spec.yaml` file
|
||||
Please open to [Visual Studio solution](back-up-db.sln) to see the SSIS package.
|
||||
|
||||
Apart from regular settings, the `spec.yaml` file in this example specifies `options` and `schedule`:
|
||||
### Spec file
|
||||
Here is the spec file for this application. This sample uses the `SSIS` runtime and does not specify any `inputs` or `outputs`. Next to that, the spec file in this example specifies `options` and `schedule`:
|
||||
|
||||
|Setting|Description|
|
||||
|-|-|
|
||||
|options|Specifies any command line parameters passed to the execution of the SSIS package|
|
||||
|schedule|Specifies when the job should run. This follows cron expressions. A value of '*/1 * * * *' means the job runs *every minute*.|
|
||||
|
||||
```yaml
|
||||
name: back-up-db
|
||||
version: v1
|
||||
runtime: SSIS
|
||||
entrypoint: ./back-up-db.dtsx
|
||||
options: /REP V /CONN "MasterSQL"\;"\"Data Source=service-master-pool;User ID=sa;Initial Catalog=master;Password=[SA_PASSWORD]\""
|
||||
schedule: "*/1 * * * *"
|
||||
```
|
||||
|
||||
<a name=related-links></a>
|
||||
|
||||
## Related Links
|
||||
|
||||
Reference in New Issue
Block a user