This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:setvar SSISDB_NAME "SSISDb" | |
USE $(SSISDB_NAME) | |
SET NOCOUNT ON | |
SET XACT_ABORT ON | |
BEGIN TRANSACTION | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Spliting large files into 1GB chunks for copying. | |
Go and get the portable 7za from https://www.7-zip.org/download.html Grab the one labelled | |
(7-Zip Extra: standalone console version, 7z DLL, Plugin for Far Manager) | |
The following command will use the fastest compression and split into 1GB chunks | |
7za a c:\temp\<archive name>.7z c:\temp\<source_files>.* -v1000m -mx1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Kit wise we have this stuff that we can pool: | |
* camping table | |
* 4 x stoves | |
* 1 x bbq + charcoal, lighters etc (this will double as a firepit for after BBQ) | |
* 2 x cooking pots | |
* wooden skewers | |
* bbq tools | |
* small kettle |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$InstallPath = $OctopusParameters["Octopus.Action[Deploy dbatools package].Output.Package.InstallationDirectoryPath"] + "\contents\" | |
Write-Host $InstallPath | |
Copy-Item -Path $InstallPath -Destination "C:\Program Files\WindowsPowershell\Modules\dbatools" -Recurse -Force |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE SCHEMA [common] AUTHORIZATION [dbo] | |
CREATE TABLE [common].[sequence_test_id] | |
( | |
sequence_id bigint identity(1,1) | |
,CONSTRAINT [pk_sequence_test_id] PRIMARY KEY (sequence_id) | |
) | |
GO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
USE msdb; | |
/* | |
Get the runtime of sql agent job and job steps over the last 14 days | |
*/ | |
DECLARE @JobName SYSNAME = '<job name here>' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Use [msdb] | |
GO | |
create view [dbo].[vwRestoreHistory] | |
as | |
select | |
this_instance_name = @@SERVERNAME | |
,source_server_name = left(bs.server_name, 40) | |
,database_name = left(bs.database_name, 60) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
USE [msdb] | |
GO | |
CREATE view [dbo].[vwBackupHistory] | |
as | |
select | |
this_instance_name = @@SERVERNAME | |
,source_server_name = left(bs.server_name, 40) | |
,database_name = left(bs.database_name, 60) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<!-- Goes in C:\Windows\System32\Sysprep where --> | |
<unattend xmlns="urn:schemas-microsoft-com:unattend"> | |
<settings pass="oobeSystem"> | |
<component name="Microsoft-Windows-International-Core" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | |
<InputLocale>0809:00000809</InputLocale> | |
<SystemLocale>en-GB</SystemLocale> | |
<UILanguage>en-GB</UILanguage> | |
<UserLocale>en-GB</UserLocale> | |
</component> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Script to set the computername to be the same as the name of the virtual machine and turn off password complexity and | |
# expiration. We do that because we just use this for scrap, throwaway VMs | |
# | |
Set-ExecutionPolicy RemoteSigned | |
Enable-psremoting -Force | |
$virtualmachinename= (Get-ItemProperty 'HKLM:\software\microsoft\virtual machine\guest\parameters').virtualmachinename |
NewerOlder