We are calling sqldatacompare via powershell remote execution.
If I log as the user were are coming across as - it works.
If we call the powershell script (again as the same user) we get an access denied:
System.Management.Automation.RemoteException
Unhandled Exception:
System.UnauthorizedAccessException: Access to the path is
denied.
I personally think it is because the user coming across needs "Logon as a Batch Service" or "Logon as a Service" rights but not sure right now and wanted to ask a question first.
My question is - which path is it complaining about?
Is it where the project file is (i.e. ..\config\sdc)?
Is it where it wants to export files to (i.e. ..D:\temp\RedgateCompare)?
My other question is - is there some verbose switch we can use - we tried /verbose in PowerShell but got the same error.
Is there some special diagnostic switch we can use that will tell us more?
I know it is access denied - but I don't know on
what<Error stuff>
Version of SQL Data Compare Command Line:
V14.1.7.14336
Command Line is:
& 'C:\Program Files (x86)\Red Gate\SQL Data Compare
14\sqldatacompare' /Server1:. /Database1:'PRODDB' /Server2:. /Database2:'PRODDB_DELTA'
/Export:'D:\Temp\RedgateCompare' /Project:'C:\Config\sdc\PRDODB.sdc' /Verbose
/Force /MaxTransactionSizeMB:300 2>&1
Error:
System.Management.Automation.RemoteException
Unhandled Exception:
System.UnauthorizedAccessException: Access to the path is
denied.
at System.IO.__Error.WinIOError(Int32
errorCode, String maybeFullPath)
at System.IO.Pipes.NamedPipeClientStream.Connect(Int32
timeout)
at
RedGate.Ipc.NamedPipes.NamedPipeEndpointClient.Connect(Int32 timeoutMs)
at
RedGate.Ipc.Rpc.RpcConnectionProvider.TryGetConnection(TimeSpan timeout)
at
RedGate.Ipc.ReconnectingConnectionProvider.ReconnectionWorker()
at
System.Threading.ExecutionContext.RunInternal(ExecutionContext
executionContext, ContextCallback callback, Object state, Boolean
preserveSyncCtx)
at
System.Threading.ExecutionContext.Run(ExecutionContext executionContext,
ContextCallback callback, Object state, Boolean preserveSyncCtx)
at
System.Threading.ExecutionContext.Run(ExecutionContext executionContext,
ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
Exit code: -532462766
Error comparing databases
Data : {}
InnerException :
TargetSite :
StackTrace :
HelpLink :
Source :
HResult
: -2146233087
If I log as the user were are coming across as - it works.
If we call the powershell script (again as the same user) we get an access denied:
System.Management.Automation.RemoteException
Unhandled Exception:
System.UnauthorizedAccessException: Access to the path is denied.
I personally think it is because the user coming across needs "Logon as a Batch Service" or "Logon as a Service" rights but not sure right now and wanted to ask a question first.
My question is - which path is it complaining about?
Is it where the project file is (i.e. ..\config\sdc)?
Is it where it wants to export files to (i.e. ..D:\temp\RedgateCompare)?
My other question is - is there some verbose switch we can use - we tried /verbose in PowerShell but got the same error.
Is there some special diagnostic switch we can use that will tell us more?
I know it is access denied - but I don't know on what
<Error stuff>
Version of SQL Data Compare Command Line:
V14.1.7.14336
Command Line is:
& 'C:\Program Files (x86)\Red Gate\SQL Data Compare 14\sqldatacompare' /Server1:. /Database1:'PRODDB' /Server2:. /Database2:'PRODDB_DELTA' /Export:'D:\Temp\RedgateCompare' /Project:'C:\Config\sdc\PRDODB.sdc' /Verbose /Force /MaxTransactionSizeMB:300 2>&1
Error:System.Management.Automation.RemoteException
Unhandled Exception:
System.UnauthorizedAccessException: Access to the path is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.Pipes.NamedPipeClientStream.Connect(Int32 timeout)
at RedGate.Ipc.NamedPipes.NamedPipeEndpointClient.Connect(Int32 timeoutMs)
at RedGate.Ipc.Rpc.RpcConnectionProvider.TryGetConnection(TimeSpan timeout)
at RedGate.Ipc.ReconnectingConnectionProvider.ReconnectionWorker()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
Exit code: -532462766
Error comparing databases
Data : {}
InnerException :
TargetSite :
StackTrace :
HelpLink :
Source :
HResult : -2146233087