Quantcast
Channel: SQLServerCentral » Programming » Powershell » Latest topics
Viewing all articles
Browse latest Browse all 467

Change DB owner to AD account that is member of sa

$
0
0
So I have an AD account that is a member of an AD group that has sa on our SQL 2008 R2 server.How can I set the ownership of the DBs on that server to that account, ideally using PoSh + smo (although ALTER AUTHORIZATION is not out of the question)?Does it really require an individual SQL login for that AD account?Because $DB.SetOwner("Domain\AD_Account") is throwing me an error.Thanks,P

Viewing all articles
Browse latest Browse all 467

Trending Articles