Wednesday, March 7, 2012

Owner

I have several SQL databases and the owner is different on each of those
depending on who created it over time.
1. Can I change the owner? How?
2. What should I change it to?
3. If I change it to sa would that affect the dbs if I change the sa password?
4. Any issues if the owner account has been removed from windows/active
directory
Thanks1. Use sp_changedbowner to change the owner of the database
2. Usually I set it to either sa or a Windows account belongs to local
admistrators group. Otherwise, you may run into some unexpected problems. (I
just can't recall what it is. I think it's something related to bulk insert.
I am not sure)
3. No.
4. If you set the owner to sa, then you don't need to worry about this issue.
"Niles" wrote:
> I have several SQL databases and the owner is different on each of those
> depending on who created it over time.
> 1. Can I change the owner? How?
> 2. What should I change it to?
> 3. If I change it to sa would that affect the dbs if I change the sa password?
> 4. Any issues if the owner account has been removed from windows/active
> directory
> Thanks|||Comments Inline
"Niles" <Niles@.discussions.microsoft.com> wrote in message
news:94EDE74E-7E15-4738-9C17-9657272C5E29@.microsoft.com...
>I have several SQL databases and the owner is different on each of those
> depending on who created it over time.
> 1. Can I change the owner? How?
Yes.
USE MyDatabase
go
EXEC sp_changedbowner ('sa')
> 2. What should I change it to?
SA
> 3. If I change it to sa would that affect the dbs if I change the sa
> password?
No. Passwords affect the login not the database.
> 4. Any issues if the owner account has been removed from windows/active
> directory
There may be some problems, but changing the owner to SA should fix any
lingering issues.
Geoff N. Hiten
Microsoft SQL Server MVP
> Thanks|||Thanks
"Jack" wrote:
> 1. Use sp_changedbowner to change the owner of the database
> 2. Usually I set it to either sa or a Windows account belongs to local
> admistrators group. Otherwise, you may run into some unexpected problems. (I
> just can't recall what it is. I think it's something related to bulk insert.
> I am not sure)
> 3. No.
> 4. If you set the owner to sa, then you don't need to worry about this issue.
> "Niles" wrote:
> > I have several SQL databases and the owner is different on each of those
> > depending on who created it over time.
> > 1. Can I change the owner? How?
> > 2. What should I change it to?
> > 3. If I change it to sa would that affect the dbs if I change the sa password?
> > 4. Any issues if the owner account has been removed from windows/active
> > directory
> >
> > Thanks

No comments:

Post a Comment