This file contains hidden or 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
/* Delete Old Document Versions */ | |
Declare @keepOldVersionsCount int, @keepNewerThanDate datetime | |
Set @keepOldVersionsCount = 0 /* 0 Keeps published and newest only. */ | |
Set @keepNewerThanDate = getdate() /* getDate() or '2013-01-01' */ | |
IF OBJECT_ID('tempdb..#versions') IS NOT NULL DROP TABLE #versions | |
SELECT VersionID, nodeId, updateDate, newest, published INTO #versions |
This file contains hidden or 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
DECLARE @cols NVARCHAR(max), @ContentTypeId int | |
SET @ContentTypeId = 1074 | |
SELECT @cols = STUFF(( | |
SELECT DISTINCT TOP 100 PERCENT | |
'],[' | |
+ CONVERT(varchar, Name + ' (' + CONVERT(varchar, id) + ')', 255) | |
FROM | |
dbo.cmsPropertyType | |
WHERE |
This file contains hidden or 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
forfiles -p "< Path To Folder >" -s -m *.* /D -< Number of days ago > /C "cmd /c del @path" |
This file contains hidden or 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
Get-ChildItem "C:\Users\Tim\Desktop\DL\uCommerce\8e0acd5c-f842-49db-933d-cc9e61fcff51\bin" -Filter *.dll.* | ` | |
Foreach-Object{ | |
Rename-Item $_.FullName ([io.fileinfo]$_.FullName).basename | |
} |
This file contains hidden or 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 Master | |
GO | |
CREATE DATABASE DATABASENAMECMS | |
GO | |
DECLARE @DatabaseName nvarchar(255), @Username nvarchar(255), @Password nvarchar(255), @AddToASPNet bit, @IsUmbracoInstall bit | |
SET @DatabaseName = 'DATABASENAMECMS' -- NOTE this must also match the CREATE value above and below the "Creating Users" script | |
SET @Username = 'DATABASENAMEUser' | |
SET @Password = '' |
This file contains hidden or 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
$ago = 7; | |
$now = Get-Date; | |
$limit = $now.AddDays($ago * -1) | |
$filename = "UmbracoTraceLog.txt.*" | |
$path = "D:\Websites\" | |
# Delete files older than the $limit. | |
Get-ChildItem -Path $path -Recurse -Force | Where-Object { !$_.PSIsContainer -and $_.LastwriteTime -lt $limit -and $_.name -like $filename } | Remove-Item -WhatIf | |
# Delete any empty directories left behind after deleting the old files. |
This file contains hidden or 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
BEGIN TRAN | |
-- Activate variants | |
UPDATE uCommerce_Product SET DisplayOnSite = 1, AllowOrdering = 1 where ParentProductId IS NOT NULL | |
-- Insert the price group prices | |
INSERT into uCommerce_PriceGroupPrice (ProductId, Price, PriceGroupId) | |
SELECT p.ProductId, NULL, pg.PriceGroupId | |
FROM uCommerce_Product p LEFT JOIN uCommerce_PriceGroupPrice pgp ON p.ProductId = pgp.ProductId, uCommerce_PriceGroup pg | |
WHERE pgp.ProductId IS NULL AND pg.Deleted = 0 |
This file contains hidden or 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
BEGIN TRAN | |
SELECT TOP 100 | |
* | |
FROM | |
uCommerce_Product p | |
LEFT JOIN uCommerce_PriceGroupPrice pgp ON p.ProductId = pgp.ProductId | |
LEFT JOIN uCommerce_Product pp ON p.ParentProductId = pp.ProductId | |
WHERE | |
p.ParentProductId IS NOT NULL |
This file contains hidden or 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
!QAZ1qaz | |
!QAZ2wsx | |
!Qaz2wsx | |
!QAZxsw2 | |
!QAZzaq1 | |
#EDC4rfv | |
123qweASD | |
12qw!@QW | |
1941.Salembbb.41 | |
1qaz!QAZ |
This file contains hidden or 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
DECLARE | |
@RowsToDelete INT = 100 | |
, @rows INT = 1 | |
, @batch INT = 1 | |
, @batchestorun INT = 2000 | |
, @message nvarchar(max) | |
, @keepOldVersionsCount int | |
, @keepNewerThanDate DATETIME | |
SET @keepOldVersionsCount = 0 /* 0 Keeps published and newest only. */ |