Advertisement
SQLSoldier

Untitled

Aug 18th, 2013
196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
T-SQL 0.51 KB | None | 0 0
  1. USE master;
  2.  
  3. ALTER DATABASE AdventureWorksDW2012 ADD FILEGROUP IndexFG;
  4. ALTER DATABASE AdventureWorksDW2012 ADD FILE (
  5.     NAME = N'IndexFile',
  6.     FILENAME = N'D:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\IndexFile.ndf',
  7.     ) TO FILEGROUP IndexFG;
  8. GO
  9.  
  10. Use AdventureWorksDW2012;
  11.  
  12. ALTER INDEX IX_FactIneternetSales_ShipDateKey On dbo.FactInternetsales Disable;
  13. Go
  14.  
  15. CREATE INDEX IX_FactIneternetSales_ShipDateKey On dbo.FactInternetsales (ShipDateKey)
  16.     With (Drop_Existing = On)
  17.     On IndexFG;
  18. Go
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement