Skip to content

Instantly share code, notes, and snippets.

Avatar
🕵️‍♂️
Figuring it out

Eitan Blumin EitanBlumin

🕵️‍♂️
Figuring it out
View GitHub Profile
@EitanBlumin
EitanBlumin / SQLDatabaseYAMLBuildConfiguration.yml
Last active May 8, 2022 — forked from jpvelasco/SQLDatabaseYAMLBuildConfiguration.yml
SQL YAML Build Configuration for Azure Pipelines
View SQLDatabaseYAMLBuildConfiguration.yml
# SQL Database Project Build Configuration
trigger:
- master
pool:
vmImage: 'VS2017-Win2016'
variables:
solution: '**/*.sln'
View sp_DBPermissions.sql
IF OBJECT_ID('tempdb..#sp_DBPermissions') IS NOT NULL DROP PROCEDURE #sp_DBPermissions
GO
/*********************************************************************************************
sp_DBPermissions V6.1
Kenneth Fisher
http://www.sqlstudies.com
https://github.com/sqlstudent144/SQL-Server-Scripts/blob/master/sp_DBPermissions.sql
This stored procedure returns 3 data sets. The first dataset is the list of database
View sp_SrvPermissions.sql
IF OBJECT_ID('#sp_SrvPermissions') IS NOT NULL DROP PROCEDURE #sp_SrvPermissions
GO
/*********************************************************************************************
sp_SrvPermissions V6.1
Kenneth Fisher
http://www.sqlstudies.com
https://github.com/sqlstudent144/SQL-Server-Scripts/blob/master/sp_SrvPermissions.sql
This stored procedure returns 3 data sets. The first dataset is the list of server
View Relocate AG Database Files.ps1
############## Setup ##############
$AGName = ''
$AGPrimary = ''
$AGSecondary = ''
# This allows you to process just a subset of databases using the name (wildcards are possible)
$DBNamePattern = 'AdventureW*'
$TargetFolder = 'K:\Data\'