What is the domain for sp_grantlogin?

From: Hal Heinrich (HalHeinrich_at_discussions.microsoft.com)
Date: 06/07/05

  • Next message: man-in-nature: "old question about login, but no help from the existing threads"
    Date: Tue, 7 Jun 2005 08:22:02 -0700
    
    

    I want to EXEC sp_grantlogin from within a stored procedure. I'm passed a
    username, but also need the domain - as per the BOL
    =====================
    Syntax
    sp_grantlogin [@loginame =] 'login'
    Arguments
    [@loginame =] 'login'

    Is the name of the Windows NT user or group to be added. The Windows NT user
    or group must be qualified with a Windows NT domain name in the form
    Domain\User, for example London\Joeb. login is sysname, with no default.
    =====================

    I've been using xp_loginconfig 'default domain', but need an alternative
    because I no longer have EXEC permission to xp_loginconfig.
    Will SERVERPROPERTY('MachineName') give me the domain? If not, what will?

    Thanks in advance for your help,
    Hal Heinrich
    VP Technology
    Aralan Solutions Inc.


  • Next message: man-in-nature: "old question about login, but no help from the existing threads"

    Relevant Pages

    • Re: sp_revoke login is not working as expected.
      ... EXEC xp_logininfo 'MyDomain\SomeUserAccount','members' ... Try specifying a group member rather than the group. ... This should list the Windows groups the user can connect with. ... connect with the non-existing login. ...
      (microsoft.public.sqlserver.security)
    • RE: Password never set - locked out of Windows XP Home
      ... Ran fixboot last night, and although the system said it had fixed the boot ... I am still stuck in the redundant loop of getting to a pop-up login ... only to not have it shutdown but instead pop back up with the same login box. ... my Windows XP Home system worked great. ...
      (microsoft.public.windowsxp.accessibility)
    • Re: Windows 98 getting stuck logging into a W2K3 domain.
      ... > workaround I've turned off Windows 98's ability in Client for MS ... > login stating that the domain can not be found, ... > Client for MS networks does the password validation. ...
      (microsoft.public.win2000.general)
    • RE: How to create a trusted connection
      ... You need to grant access for the Windows login by referring to the books ... is set to use Windows authentication to be able to do trusted connection. ... There are two modes of authentication in SQL Server: ...
      (microsoft.public.sqlserver.security)
    • Re: RDC Failing from home to work???
      ... Jeffrey Randow (Windows Networking & Smart Display MVP) ... >> login screen but after I put in my username and password ... >> login...after I attempt to login I see the connection ... >> the same network from home. ...
      (microsoft.public.windowsxp.work_remotely)