Skip to content

Instantly share code, notes, and snippets.

-- Change DB
use [org_MSCRM]
-- 1. PartitionCreate
-- Drop any existing partition function and scheme
IF EXISTS (SELECT * FROM sys.partition_schemes WHERE name = N'AuditPScheme')
BEGIN
print 'Dropping Partition Scheme AuditPScheme'
DROP PARTITION SCHEME [AuditPScheme]
-- Based on http://support2.microsoft.com/kb/2664150
-- Change DB
use [test_MSCRM]
BEGIN TRY
IF EXISTS (SELECT * FROM sys.sysobjects
WHERE id = object_id(N'[dbo].[PrincipalObjectAccess_New]')
AND ObjectProperty(id, N'IsUserTable') = 1)
RAISERROR ('ERROR: PrincipalObjectAccess_New already exists!!!', 16,-1);
# -*- coding: utf-8 -*-
import os
import sys
import zipfile
filename = 'list.txt'
archname = 'desktop.zip'
outdir = os.path.curdir
inputset = set()