How To Transfer Objects From One Schema To Another Schema In SQL Server

Ever wondered how to transfer all Database Object from One schema to another, well here is the small script, this will give you the script which you need to run. Make sure you take full backup before doing anything.

select 'alter schema [New_Schema] transfer ['+schema_name([schema_id])+'].['+[name]+']'
from sys.objects where schema_name([schema_id]) not in ('dbo', 'sys')