SQL DB Issue

Rohit Kulkarni 686 Reputation points
2022-02-11T13:51:19.087+00:00

Hello Team,

I need to change the DB Owners Name(Windows NT).But i am not seeing the name of the person in the below mentioned screenshot :

Please advise how to make to display the name of the person.

173631-image.png

Regards
RK

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
12,885 questions
0 comments No comments
{count} votes

4 answers

Sort by: Most helpful
  1. Tom Phillips 17,716 Reputation points
    2022-02-11T15:11:13.793+00:00

    You normally do not change the owner. It is best if you leave the db owner to always be "sa".

    What is the reason you want to change the database owner?


  2. Erland Sommarskog 102.3K Reputation points
    2022-02-11T22:41:34.527+00:00

    To change the database owner, use this command:

    ALTER AUTHORIZATION ON DATABASE:ThisDB TO [DOMAIN\User]
    

    Then you don't have to worry about the UI.

    But as I said in my reply to Tom, the best is to create an SQL login which exists solely to own that database and do not grant that login any permissions.

    0 comments No comments

  3. Seeya Xi-MSFT 16,451 Reputation points
    2022-02-14T09:13:45.12+00:00

    Hi @Rohit Kulkarni ,

    Agree with Erland.
    BTW, if the modification is successful through tsql, then pay attention to check whether the version of SSMS is too low(GO SSMS->Navigation Bar->Help->About). If yes, please install the latest SSMS.

    Best regards,
    Seeya


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  4. Erland Sommarskog 102.3K Reputation points
    2022-02-14T22:15:24.313+00:00

    Previously it was created the WINDOWS_NT User.The person now left the company.

    Yes, having an individual as the owner of a database is a very bad idea. Exactly for the reason you mention.

    Can i go ahead and change it go sa.

    Again, I recommend that you create an SQL login with no other permissions to own that database.

    Is it going impact any where .Please advise.

    Maybe it will. Maybe it will not. In most cases, changing the owner of a database has no impact, but, yes there are situations where you could run into problems.

    This statement should return two zeroes:

    SELECT is_trustworthy_on, is_db_chaining_on 
    FROM   sys.databases 
    WHERE  name = 'theDB'
    

    If not, there are things to investigate.

    Furthermore, does this SELECT return more than one row:

    SELECT * FROM TheDB.sys.assemblies
    

    Again, this calls for further investigation.

    Also, was the current user a member of sysadmin, or a plain user?

    I cannot say that I have been able to think of everything that could possibly blow up, but generally the risk is reasonably low. In any case, you cannot keep the current situation, because it will be problematic when the user disappears out of the AD. So you will have no choice - and then be prepared to act if something pops up.