Shrink Database DBCC SHRINKDATABASE (UserDB, 10); (shrink database to 10% of free space)Rename a database EXEC sp_renamedb N’Accounting’, N’Financial’; (old and new name)Check file group associated with a database Sp_helpfilegroupChange the database state Check the state (user_access_desc, state_desc) select *
DBCC CHECKDB
DBCC CHECKDB Checks the logical and physical integrity of all the objects in the specified database by performing the following operations: 1. Runs DBCC CHECKALLOC on the database. 2. Runs DBCC CHECKTABLE on every table and view in the database.