0

我有一個用於數據庫備份/恢復的powershell腳本。出於某種原因,我正在使用new-pssessioninvoke-command遠程執行腳本。我「Restore-SQLdatabase」NT AUTHORITY ANONYMOUS LOGON登錄失敗

1.connecting to remote server 
2.the local server is in a domain 
3.the remote server is in same domain 
4.Using the domain account which exist in both the machine and have admin rights. 
5.My SQL Service (I mean the instance/engine) is running with 
    the same Domain account 

備份與命令Backup-SQLdatabase成功,但恢復Restore-SQLdatabase failes 錯誤Login failed for NT AUTHORITY\ANONYMOUS LOGON

只是爲了試驗/錯誤我添加了「NT AUTHORITY \ ANONYMOUS LOGON」給管理員組,在那個還原必須發生但沒有運氣的機器上。

任何線索我在做什麼錯(OR)我該如何解決這個問題。

感謝您的幫助。

謝謝。

編輯:-SQLTrustedConnection開關可以解決這個問題?

回答

0

嘗試了一下後,我發現了一個竅門。需要恢復的機器我作爲用戶添加了「NT AUTHORITY \ ANONYMOUS LOGON」。

如何添加:

連接到數據庫實例使用SSMS - >展開安全 - >展開登錄 - >右鍵點擊登錄 - >創建新的登錄

相關問題