locked
How to add computer Account in SQL 2005 RRS feed

  • Question

  • hi

    After installing sql 2005 i cant find computer account in login in SQL 2005

    plz give me suggetion how to add computer account in login in SQL 2005 with out adding in Builtin\administrators group

    There is one string through you can add computer account in login in SQL 2005
     

    plz help me
    Wednesday, September 23, 2009 7:41 AM

Answers

  • I would suggest to provide clear question for immediate answers

    If you are trying to add login of your computer in SQL Server below command can use.Replace your DOMAIN\ACCOUNT.


    USE

     

    [master]
    GO
    EXEC master.dbo.sp_grantlogin @loginame = N'DOMAIN\ACCOUNT'
    EXEC master.dbo.sp_defaultdb @loginame = N'DOMAIN\ACCOUNT', @defdb = N'master'
    EXEC master.dbo.sp_defaultlanguage @loginame = N'DOMAIN\ACCOUNT'
    GO
    Please Vote & "Mark As Answer" if this post is helpful to you.

    Cheers
    Prakash Nandwana
    Bangalore , India

     

    Wednesday, September 23, 2009 9:37 AM

All replies

  • AFAIK, SQL Server 2005 only can add a user or a group for login and does not support a computer name.
    This posting is provided "AS IS" with no warranties, and confers no rights.
    Wednesday, September 23, 2009 8:11 AM
    Answerer
  • Hi

    What is it you want to achieve exactly?

    The trivial answer is to grant access to

    <Domain>\Computername$

    but I'm not sure if this is what you *really* want.

    Ewan

    If you have found this post helpful, please click the 'Vote as Helpful' link (the green triangle and number on the top-left).

    If this post answers your question, click the 'Mark As Answered' link below. It helps others who experience the same issue in future to find the solution.
    Wednesday, September 23, 2009 8:13 AM
  • I would suggest to provide clear question for immediate answers

    If you are trying to add login of your computer in SQL Server below command can use.Replace your DOMAIN\ACCOUNT.


    USE

     

    [master]
    GO
    EXEC master.dbo.sp_grantlogin @loginame = N'DOMAIN\ACCOUNT'
    EXEC master.dbo.sp_defaultdb @loginame = N'DOMAIN\ACCOUNT', @defdb = N'master'
    EXEC master.dbo.sp_defaultlanguage @loginame = N'DOMAIN\ACCOUNT'
    GO
    Please Vote & "Mark As Answer" if this post is helpful to you.

    Cheers
    Prakash Nandwana
    Bangalore , India

     

    Wednesday, September 23, 2009 9:37 AM
  • Hi,

    In the SQL Server Object Explorer, double click Security - > right click Logins - > New Login ..., add you computer account as login.

    Please tell me if i misunderstand you, thanks!
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Friday, September 25, 2009 7:50 AM
  • I have very strange request from my application team and they want to add the server name as a login in sql server.

    what i need to acheive is Domianname\Computername$ to be with bulk admin role.....

    Can anybody help with the way to do it.....

    I am able to add the computer name as a member of the local administrators and not able to do the same for the sql server logins....

    Regards
    Nimesh

    Saturday, December 11, 2010 6:01 PM
  • I have very strange request from my application team and they want to add the server name as a login in sql server.

    what i need to acheive is Domianname\Computername$ to be with bulk admin role.....

    Can anybody help with the way to do it.....

    I am able to add the computer name as a member of the local administrators and not able to do the same for the sql server logins....

    Regards
    Nimesh

    Hi,

    It is not supported to create a SQL Server login from computer account. It is only supported to create a login from Windows local/domain users or group that uses Windows Authentication mode or create a SQL Server login that uses SQL Server Authenticatioin mode. For more information, please refer to How to: Create a SQL Server Login (http://msdn.microsoft.com/en-us/library/aa337562.aspx).

    Hope this helps.

    Thanks,
    Chunsong


    Please remember to click "Mark as Answer" on the post that helps you, and to click "Unmark as Answer" if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
    Monday, December 13, 2010 2:04 AM
  • HI Nimesh

     

    Try this query

    create login [domainname\comutername$] from windows

    you can create computer account as login account

     

     

    • Proposed as answer by Josh Patterson Friday, November 4, 2011 3:01 PM
    Monday, December 13, 2010 4:59 AM
  • I have very strange request from my application team and they want to add the server name as a login in sql server.

    what i need to acheive is Domianname\Computername$ to be with bulk admin role.....

    Can anybody help with the way to do it.....

    I am able to add the computer name as a member of the local administrators and not able to do the same for the sql server logins....

    Regards
    Nimesh

    Hi,

    It is not supported to create a SQL Server login from computer account. It is only supported to create a login from Windows local/domain users or group that uses Windows Authentication mode or create a SQL Server login that uses SQL Server Authenticatioin mode. For more information, please refer to How to: Create a SQL Server Login (http://msdn.microsoft.com/en-us/library/aa337562.aspx).

    Hope this helps.

    Thanks,
    Chunsong


    Please remember to click "Mark as Answer" on the post that helps you, and to click "Unmark as Answer" if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
    Actually it is. During the install of SCCM you can add the computer account as DB owner (required), but what do you do if you forget ? when trying from SQL manager, there is not option to add a computer object.
    Wednesday, January 5, 2011 5:49 AM