Skip to content

Instantly share code, notes, and snippets.

View cporteou's full-sized avatar

Craig Porteous cporteou

View GitHub Profile
@cporteou
cporteou / SSRS_Subscription_Jobs
Created October 22, 2017 11:06
This returns a list of all subscriptions in an instance, their SQL Agent Job IDs and built commands for Starting, enabling & disabling jobs.
USE ReportServer
SELECT
cat.Name,
cat.Path,
sch.ScheduleID AS AgentJobID,
sch.LastRunTime,
'EXEC msdb.dbo.sp_start_job N''' + CAST(sch.ScheduleID as nvarchar(36)) + ''' ;' AS StartJob,
'EXEC msdb.dbo.sp_update_job @job_name = N' + CAST(sch.ScheduleID as nvarchar(36)) + ', @enabled = 1 ;' AS EnableJob,
'EXEC msdb.dbo.sp_update_job @job_name = N' + CAST(sch.ScheduleID as nvarchar(36)) + ', @enabled = 0 ;' AS DisableJob
@cporteou
cporteou / SSRS_ExportPerms.ps1
Last active November 16, 2017 16:23
Exports all perms from root folder ("/" for ALL) of SSRS to csv file
#---------------------------------------------
# Author: Craig Porteous
# @cporteous
# Synopsis: List out all SSRS (native mode)
# folders & their security policies
# & output dataset to CSV file
#---------------------------------------------
Clear-Host
$ReportServerUri = 'http://REPORTSERVERURL/ReportServer/ReportService2010.asmx?wsdl'

Keybase proof

I hereby claim:

  • I am cporteou on github.
  • I am cporteous (https://keybase.io/cporteous) on keybase.
  • I have a public key ASDwx4QcjXFczeW6YMYevDvUMVjV5iTPUQ8wSGsulC93hQo

To claim this, I am signing this object:

@cporteou
cporteou / azure-pipelines_002.yml
Created January 11, 2021 14:08
Azure pipelines YAML files for blog article: CI/CD for Azure Data Factory: Adding a production deployment stage
# CICD Pipeline for Azure Data Factory
# Author: Craig Porteous (@cporteous)
trigger:
- adf_publish
pool:
vmImage: 'vs2017-win2016'
stages: