Results 1 to 2 of 2

Thread: [RESOLVED] Query to add Windows Authenticated User via Remote Desktop [MS SQL Express]

  1. #1

    Thread Starter
    Hyperactive Member gjon's Avatar
    Join Date
    Nov 2004
    Location
    Inescapable Void
    Posts
    442

    Resolved [RESOLVED] Query to add Windows Authenticated User via Remote Desktop [MS SQL Express]

    I was able to do this on a Windows XP machine but I am not able to get this to work on a Windows 2003 Server machine.
    I am connecting to the Windows 2003 Server and MS SQL Express via remote desktop on the lan.

    This is what worked for me before:
    EXEC sp_grantlogin '4800X2\ASPNET'
    USE MyDB
    EXEC sp_grantdbaccess '4800X2\ASPNET'
    EXEC sp_addrolemember 'db_owner', '4800X2\ASPNET'

    But for some reason now I am getting this error:
    Msg 15401, Level 11, State 1, Procedure sp_grantlogin, Line 49
    Windows NT user or group '4800X2\ASPNET' not found. Check the name again.
    Msg 15401, Level 16, State 1, Line 1
    Windows NT user or group '4800X2\ASPNET' not found. Check the name again.
    Msg 15410, Level 11, State 1, Procedure sp_addrolemember, Line 75
    User or role '4800X2\ASPNET' does not exist in this database.

    I thought what I needed to add was the name of this pc that will connect remotely, but that doesn't seem to be working.
    What weird is the old copy of this query I used had the local pc as the computer name. If I exchange the computer name from the remote pc name to the local 2003 Server machine name, the query works fine. Although that still doesn't let me add connections via Web Developer Express without error. It doesn't make sense to me anyhows, how could I have used the local machine's name and not the remote machine's name to get this to work previously. So confused.

    Thank you in advance for help.

  2. #2

    Thread Starter
    Hyperactive Member gjon's Avatar
    Join Date
    Nov 2004
    Location
    Inescapable Void
    Posts
    442

    Re: Query to add Windows Authenticated User via Remote Desktop [MS SQL Express]

    I found that I could use localhost\SqlExpress and it worked.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width