Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 

Database ownership

G’day,

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
GO

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

ALTER AUTHORIZATION ON DATABASE::[ASPState] TO SA;
GO

Have a nice day.

Cheers

Martin

Comments

Leave a comment on the original post [martincatherall.com, opens in a new window]

Loading comments...