Skip to content

Instantly share code, notes, and snippets.

Avatar

Simon sqlsimon

  • UK
View GitHub Profile
View splitting_large_files_with_7z
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
@sqlsimon
sqlsimon / camping.txt
Last active Aug 9, 2017
Camping Stuff
View camping.txt
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
View postModuleInstall.ps1
$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
View legacy_sql_sequence_gen.sql
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
View SSISDB_cleardown.sql
:setvar SSISDB_NAME "SSISDb"
USE $(SSISDB_NAME)
SET NOCOUNT ON
SET XACT_ABORT ON
BEGIN TRANSACTION
View 14DayJobStepRuntimes.sql
USE msdb;
/*
Get the runtime of sql agent job and job steps over the last 14 days
*/
DECLARE @JobName SYSNAME = '<job name here>'
View RestoreHistory.sql
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)
View BackupHIstory.sql
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)
@sqlsimon
sqlsimon / tfs2013build.txt
Last active Oct 21, 2015
BoxStarter script to build and configure TFS2013 along with SQL Express to host the db
View tfs2013build.txt
cinst VisualStudioTeamFoundationServerExpress2013
cinst MsSqlServer2012Express
cinst visualstudio2013teamexplorer
$tfsConfig="$env:ProgramFiles\Microsoft Team Foundation Server 12.0\Tools\TfsConfig.exe"
.$tfsConfig unattend /configure /type:standard
.$tfsConfig unattend /configure /type:build `
/inputs:collectionurl=http://localhost:8080/tfs`;ServiceAccountName="LOCAL SERVICE"`;ServiceAccountPassword="pass"
View Useful Chocolatey Packages.txt
sqlserver2014express - sql 2014 express with management studio
sqlserver2012express - sql 2014 express with management studio
git
git.install
visualstudioteamfoundationserverexpress2013
visualstudioexpress2012tfs
octopusdeploy.tentacle
octopusdeploy
octopustools
You can’t perform that action at this time.