Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mjfii/TSQL-Deployment-Framework
A simple methodology to deploy a massive number of complex TSQL scripts.
https://github.com/mjfii/TSQL-Deployment-Framework
framework powershell tsql
Last synced: about 2 months ago
JSON representation
A simple methodology to deploy a massive number of complex TSQL scripts.
- Host: GitHub
- URL: https://github.com/mjfii/TSQL-Deployment-Framework
- Owner: mjfii
- License: agpl-3.0
- Created: 2017-05-02T18:40:26.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-05-02T22:03:13.000Z (over 7 years ago)
- Last Synced: 2024-05-23T00:34:40.901Z (8 months ago)
- Topics: framework, powershell, tsql
- Language: PowerShell
- Homepage:
- Size: 20.5 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - mjfii/TSQL-Deployment-Framework - A simple methodology to deploy a massive number of complex TSQL scripts. (PowerShell)
README
# TSQL Script Deployment Framework
These PowerShell (`.ps1`) scripts move through a [nested] directory structure to isolate, separate, and execute complex TSQL scripts (`.sql`).
## Motivation
Deploying scripts numbering in the 5's, 10's, or 100's can be difficult across multiple environments and is always pretty tedious. Also, it can introduce a bit of room for error if something is missed or executed out of order. I needed a framework to forward along to a DBA for them to execute for DDL deployment, maintenance, and/or metadata management.
## Prerequisites
The default security level may not allow the execution of the scripts. In order to bypass this and allow 'local' executions, run the below:
```PowerShell
set-executionpolicy remotesigned
```Additionally, you will need appropriate privileges on the machine where the script is being executed.
## Installation
No installation is required. Use the scripts as necessary to deploy any number of TSQL scripts.
## Example
If the scripts are placed in the following folder structure with TSQL in subsequent folders, then the following will be occur:
```
|-- execute tsql scripts.ps1
|-- dimensions
|-- customer.sql
|-- product.sql
|-- outrigger
|-- pricing.sql
|-- customer_product.sql
|-- facts
|-- sales.sql
|-- inventory.sql
|-- purchasing.sql
```1. Each folder in same directory as the `.ps1` file will be iterated through in alphanumeric order.
2. Each TSQL file/script will be executed in alphanumeric order.
3. Each TSQL file/script will be broken down into batches, i.e. a `go` separator, and exectued from the top to bottom.
4. Each sub-folder is executed in a similar fashion.## Contributors
Michael Flanigan
email: [[email protected]]([email protected])
twitter: [@mjfii](https://twitter.com/mjfii)# Versioning
0.0.0.9000 - Initial deployment (2017-05-02)