Wednesday, December 30, 2009

SQL Server 2008 Implementation and Maintenance (3)

Schema , Table , View and Index

1.exec sp_spaceused 'tableName' -- show the disk space which data occupied
2. rename
sp_rename 'oldTableName' , 'NewTableName' ;

3. view all indexes
select * from sys.indexes ;

4. sp_who -- view all user session

No comments:

Post a Comment