USE master;  
GO  
ALTER DATABASE [db] SET SINGLE_USER WITH ROLLBACK IMMEDIATE;
GO
ALTER DATABASE [db] MODIFY NAME = [db_OLD];
GO  
ALTER DATABASE [db_OLD] SET MULTI_USER;
GO
