DBA Basics Part 1

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 *