I have a script which looks like the following:-
$machine = $computerName
Write-Host "server = $($server)"
$backup = New-Object Microsoft.SqlServer.Management.Smo.Backup
$date = Get-Date
#$file = $backupFolderDBName + "\" + $databaseName + "_" + $date + ".bak"
We have a test environment, staging and production, on the test and staging environment SQL Server runs as Local System account – I can remote onto both these servers and backup all my databases as required. On Production SQL Server runs as a specified account, when my script hits the last line to do the actual backup I get the following error:-
SqlBackup" with "1" argument(s): "Backup failed for Server
Is this the double hop issue, if I log onto the production server and run my script on the box itself it works just fine.
Thanks for any advice
So long as you're not asking the remoting session to access non-local resources, then no, it probably isn't a double-hop problem. But it sounds as if you may be asking the session to access non-local resources, since running the script when logged in on the console works.
You must be logged in to reply to this topic.