Last active
December 15, 2015 02:29
-
-
Save cmendesce/5187188 to your computer and use it in GitHub Desktop.
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
| exec sp_MSforeachtable 'ALTER TABLE ? NOCHECK CONSTRAINT ALL' | |
| exec sp_MSforeachtable 'ALTER TABLE ? DISABLE TRIGGER ALL' | |
| exec sp_MSforeachtable 'DELETE ?' | |
| exec sp_MSforeachtable 'ALTER TABLE ? CHECK CONSTRAINT ALL' | |
| exec sp_MSforeachtable 'ALTER TABLE ? ENABLE TRIGGER ALL' | |
| exec sp_MSforeachtable 'IF OBJECTPROPERTY(OBJECT_ID("?"), "TableHasIdentity") = 1 BEGIN DBCC CHECKIDENT ("?",RESEED,1) END' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment