我有一個用於數據庫備份/恢復的powershell腳本。出於某種原因,我正在使用new-pssession
和invoke-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
開關可以解決這個問題?