ALTER DATABASE oldDBname SET SINGLE_USER WITH ROLLBACK IMMEDIATE
ALTER DATABASE oldDBname MODIFY NAME =newDBname
ALTER DATABASE newDBname SET MULTI_USER
sql for everyone
ALTER DATABASE oldDBname SET SINGLE_USER WITH ROLLBACK IMMEDIATE
ALTER DATABASE oldDBname MODIFY NAME =newDBname
ALTER DATABASE newDBname SET MULTI_USER