a. 查看数据库的owner
select a.name, suser_sname(a.owner_sid) as oname from sys.databases a order by oname;
b. 查看job的owner
select a.name, suser_sname(a.owner_sid) as oname from msdb..sysjobs a order by oname;
c. 查看endpoint的owner
select a.name, a.principal_id,suser_sname(b.sid) from sys.endpoints a left join sys.database_principals b on a.principal_id=b.principal_id;
1.
2.
3.
4.
5.
6.
修改
a. 修改数据库对象的owner
ALTER AUTHORIZATION ON DATABASE::Archive To sa;
b. 修改endpoint对象的owner
ALTER AUTHORIZATION ON ENDPOINT::endpoint_mirroring To sa;
查看登录后复制 a. 查看数据库的ownerselect a.name, suser_sname(a.owner_sid) as oname from sys.databases a order by oname;b. 查看job的ownerselect a.name, suser_sname(a.owner_si...