none
error 18456 on secondary node alwayson with powershell RRS feed

  • Question

  • Hi all,

    i get the error in object when try to launch a powershell script that remove from AG some db.

    Configuration is following:

    - 1 domain user added as administrator locally on both 2 node;

    - powershell script is invoked by jenkins scheduler. Domain user is stored on jenkins scheduler;

    - on both sql server domain user is sysadmin.

    So script work fine on primary node, remove db from ag and after delete it. When i try to launch script from primary node to secondary doesn't work, i got error in attach with "login failed for NT AUTHORITY\ANONYMOUS LOGON ".

    user and password for security are not hardcoded into the script. Into the script there is integrated security = true. We tried with integrated security = SSPI but got same error. If we put integrated security = false it works on secondary node.

    What are doing wrong?

    Thanks

    • Moved by jrv Monday, November 11, 2019 3:33 PM Better forum
    Monday, November 11, 2019 2:05 PM

All replies

  • What is "ag"?

    Your question is too vague to answer.

    For issues with SQLServer clusters post in SQLServer forum.  For issues with Jenkins post in Jenkins forum.  YOu will still have to write a clear question with the script and the complete error message.


    \_(ツ)_/

    Monday, November 11, 2019 3:05 PM
  • What is "ag"?

    Your question is too vague to answer.

    For issues with SQLServer clusters post in SQLServer forum.  For issues with Jenkins post in Jenkins forum.  YOu will still have to write a clear question with the script and the complete error message.


    \_(ツ)_/

    ag is availability group. Sorry

    So i will write in sql forum. You can close this topic. Thanks

    Monday, November 11, 2019 3:26 PM
  • I will move this to the SQL forum.


    \_(ツ)_/

    Monday, November 11, 2019 3:33 PM
  • Hi Emanuele86,

     

    Did you login the secondary node with domain user? integrated security = SSPI When false, it will use User ID and Password are specified in the connection string for authentication . When true, the current Windows account credentials are used for authentication. SSPI  is equivalent to true.

     

    Best regards,

    Dedmon Dai


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Tuesday, November 12, 2019 8:39 AM