• the following should generate the alter schema commands to change schema for any Stored Proc not owned by dbo

    select 'alter schema dbo transfer ' + sch.name + '.' + tab.name

    from sys.schemas sch inner join sys.objects tab on sch.schema_id = tab.schema_id

    where sch.name <> 'dbo' and tab.type = 'P'

    order by tab.name

    -----------------------------------------------------------------------------------------------------------

    "Ya can't make an omelette without breaking just a few eggs" 😉