Database ownership


One of the features that I most like about management studio is the ability to generate a script of the actions that have been taken in one of the (many) dialog boxes.

This has tremendous value for both learning and for creating scripts to pass to another DBA.

Create Script in SQL SERVER Management studio

Create Script in SQL SERVER Management studio

However, I found an example today of SSMS using older syntax to generate a script.

I was changing the owner of a database and I noticed that upon scripting out the command, the following was produced

EXEC [ASPState].dbo.sp_changedbowner @loginame = N'sa', @map = false

now, the documentation for sp_changedbowner (for 2008) states that the syntax is set for removal.

So, really, I feel SSMS should be using the more upto date version which is


Have a nice day.



About Martin Catherall

Martin Catherall is Senior SQL consultant at SQL Down Under, based in Melbourne, Australia. Martin is also a Microsoft Data Platform MVP and Regional Mentor (RM) for the Professional Association for SQL Server. Prior to relocating to Australia he was extremely active in the Christchurch, New Zealand data community - founding the local SQL Server user group and organizing SQL Saturday Christchurch - which later became SQL Saturday South Island. He likes learning interesting stuff about processing and storing data and passing on his knowledge. In his spare time he likes to learn guitar and hang out with his two young sons Callum Glen and Robert Michael.