duplicates = multiple editions
A Classical Introduction to Modern Number Theory, Kenneth Ireland Michael Rosen
A Classical Introduction to Modern Number Theory, Kenneth Ireland Michael Rosen
/* | |
Ref: http://www.codykonior.com/2015/05/31/how-to-convert-an-sql-login-sid-to-a-readable-string/ | |
Note that if you're doing this on the output from an Audit Login trace (http://www.safesql.com/2015/06/03/sql-server-security-and-renamed-logins/): | |
Remove the first Case When | |
Len needs to be replaced with Datalength | |
sp.sid replaced with al.LoginSid |
/************************************************************************************************************************************************* | |
Author: βββ ββββββββββ βββ βββββββββββ βββ ββββββ βββ βββ | |
βββ ββββββββββββ βββ βββββββββββ ββββββββββββββ βββ | |
βββββββ βββββββββ βββ ββββββββββββββββββββββββββββββββ | |
βββββββ βββββββββββββ ββββββββββββββββββββββββββββββββ | |
βββ βββββββββ ββββββ βββββββββββ ββββββ ββββββ βββ | |
βββ βββββββββ βββββ βββββββββββ ββββββ ββββββ βββ | |
Sr. DBA |
if not exists (select 1 from sys.objects where name = 'usp_rename_db' and type = 'P') | |
exec ('create procedure dbo.usp_rename_db as SELECT 1') | |
go | |
alter procedure dbo.usp_rename_db | |
@sourceDBName as sysname, | |
@destinationDBName as sysname, | |
@execute as int, | |
@help as int | |
as | |
/************************************************************************************************************************************************* |
/*************************************************************************************************** | |
Author: βββ ββββββββββ βββ βββββββββββ βββ ββββββ βββ βββ | |
βββ ββββββββββββ βββ βββββββββββ ββββββββββββββ βββ | |
βββββββ βββββββββ βββ ββββββββββββββββββββββββββββββββ | |
βββββββ βββββββββββββ ββββββββββββββββββββββββββββββββ | |
βββ βββββββββ ββββββ βββββββββββ ββββββ ββββββ βββ | |
βββ βββββββββ βββββ βββββββββββ ββββββ ββββββ βββ | |
Sr. DBA | |
-- http://dba.stackexchange.com/users/8783/kin |
/************************************************************************************************************************************************* | |
Author : βββ ββββββββββ βββ βββββββββββ βββ ββββββ βββ βββ | |
βββ ββββββββββββ βββ βββββββββββ ββββββββββββββ βββ | |
βββββββ βββββββββ βββ ββββββββββββββββββββββββββββββββ | |
βββββββ βββββββββββββ ββββββββββββββββββββββββββββββββ | |
βββ βββββββββ ββββββ βββββββββββ ββββββ ββββββ βββ | |
βββ βββββββββ βββββ βββββββββββ ββββββ ββββββ βββ (@TheRockStarDBA) | |
Sr. DBA | |
Date : - Original Version created on 01.15.2016 |
-- below script will help track down the backup / restore progress. | |
SELECT command, | |
s.text, | |
start_time, | |
percent_complete, | |
CAST(((DATEDIFF(s,start_time,GetDate()))/3600) as varchar) + ' hour(s), ' | |
+ CAST((DATEDIFF(s,start_time,GetDate())%3600)/60 as varchar) + 'min, ' | |
+ CAST((DATEDIFF(s,start_time,GetDate())%60) as varchar) + ' sec' as running_time, | |
CAST((estimated_completion_time/3600000) as varchar) + ' hour(s), ' | |
+ CAST((estimated_completion_time %3600000)/60000 as varchar) + 'min, ' |
------------------------------------------------------------------- | |
-- Script Name: ColumnstoreReorg.sql | |
-- | |
-- Desc: Run this to get a list of columnstore index partitions | |
-- to determine which should be reorganized. The script also | |
-- generates index reorg statements which could be run. | |
-- | |
-- Notes: SQL Server 2016 is REQUIRED. SQL Server 2016 changed | |
-- what index reorganization does to columnstore indexes, | |
-- and this script takes advantage of those changes. |
-- See http://dba.stackexchange.com/questions/136235/group-daily-schedule-into-start-date-end-date-intervals-with-the-list-of-week/136571?noredirect=1#comment257069_136571 | |
/***************************************************************** | |
DATA: Create sample data | |
*****************************************************************/ | |
IF OBJECT_ID('tempdb..#src') IS NOT NULL | |
DROP TABLE #src | |
CREATE TABLE #src (ID int PRIMARY KEY, ContractID int, dt date, dowChar char(3), dowInt int); |
<# | |
.SYNOPSIS | |
Get-SqlErrorLog is designed to quickly retrieve data from SQL Server error logs, negating the slowness of SSMS and awkwardness of manually crawling files. | |
.DESCRIPTION | |
Get-SqlErrorLog is designed to quickly retrieve data from SQL Server error logs, negating the slowness of SSMS and awkwardness of manually crawling files. | |
It is designed to be quite light in it's process, and should be quick (loading SQLPLS being the exception. |