locked
SETSPN -A MSSQLSvc issue RRS feed

  • Question

  • Hi,

     I am trying to create SPN using the SETSPN tool. But when i run the following command

    SetSPN –A MSSQLSVC/FQDN:Port domain_account

    syntax help is thrown back like the following

    Usage: SetSPN [switches data] computername
      Where "computername" can be the name or domain\name

      Modifiers:
       -F = perform the duplicate checking on forestwide level
       -P = do not show progress (useful for redirecting output to file)
      Switches:
       -R = reset HOST ServicePrincipalName
        Usage:   setspn -R computername
       -A = add arbitrary SPN
        Usage:   setspn -A SPN computername
       -S = add arbitrary SPN after verifying no duplicates exist
        Usage:   setspn -S SPN computername
       -D = delete arbitrary SPN
        Usage:   setspn -D SPN computername
       -L = list registered SPNs
        Usage:   setspn [-L] computername
       -Q = query for existence of SPN
        Usage:   setspn -Q SPN
       -X = search for duplicate SPNs
        Usage:   setspn -X

    Examples:
    setspn -R daserver1
       It will register SPN "HOST/daserver1" and "HOST/{DNS of daserver1}"
    setspn -A http/daserver daserver1
       It will register SPN "http/daserver" for computer "daserver1"
    setspn -D http/daserver daserver1
       It will delete SPN "http/daserver" for computer "daserver1"
    setspn -F -S http/daserver daserver1
       It will register SPN "http/daserver" for computer "daserver1" if no such SPN
    exists in the forest

    Could some point me in right direction to fix this ?

     

    Best Regards,

    Naresh Koutam

    Monday, May 16, 2011 9:51 AM

Answers

  • The reason for my earlier comment is because i see different hyphen in command you have pasted.
    SetSPN –A MSSQLSVC/FQDN:Port domain_account
    SetSPN -A MSSQLSVC/FQDN:Port domain_account

    Watch closely in above commands.... Yeah, I know i have eagle eyes.
    Balmukund Lakhani | Please mark solved if I've answered your question, vote for it as helpful to help other user's find a solution quicker
    --------------------------------------------------------------------------------
    This posting is provided "AS IS" with no warranties, and confers no rights.
    --------------------------------------------------------------------------------
    My Blog: http://blogs.msdn.com/blakhani
    Team Blog: http://blogs.msdn.com/sqlserverfaq
    Monday, May 16, 2011 3:21 PM

All replies

  • if you are copying and pasting this command on command prompt make sure you replace hyphen correctly as I have seen issues while pasting from word document
    Balmukund Lakhani | Please mark solved if I've answered your question, vote for it as helpful to help other user's find a solution quicker
    --------------------------------------------------------------------------------
    This posting is provided "AS IS" with no warranties, and confers no rights.
    --------------------------------------------------------------------------------
    My Blog: http://blogs.msdn.com/blakhani
    Team Blog: http://blogs.msdn.com/sqlserverfaq
    Monday, May 16, 2011 3:02 PM
  • The reason for my earlier comment is because i see different hyphen in command you have pasted.
    SetSPN –A MSSQLSVC/FQDN:Port domain_account
    SetSPN -A MSSQLSVC/FQDN:Port domain_account

    Watch closely in above commands.... Yeah, I know i have eagle eyes.
    Balmukund Lakhani | Please mark solved if I've answered your question, vote for it as helpful to help other user's find a solution quicker
    --------------------------------------------------------------------------------
    This posting is provided "AS IS" with no warranties, and confers no rights.
    --------------------------------------------------------------------------------
    My Blog: http://blogs.msdn.com/blakhani
    Team Blog: http://blogs.msdn.com/sqlserverfaq
    Monday, May 16, 2011 3:21 PM