How to get detailed exception information

Hello,
We started to use SQL Clone commands to automate the creation and refreshing the Images, so we scheduled some tasks to be run in a certain period of time to refresh Images and Clones, we also tried to add logging to be able to manage the situation when the Images or Clones cannot be refreshed, but in many cases we cannot get a detailed exception information specially in SQL Clone commands like (connect-sqlclone , Remove-sqlclone etc.) , and it makes difficulties to investigate and reproduce the error because the only detail that we receive is "A task was canceled",
so I was wondering if there is a way to be able to get more detail about command exceptions?
Thanks,
Amirhadi
Tagged:

Comments

  • The PowerShell cmdlets are an alternative interface to the web UI, and so their job is just to send requests over HTTP to the SQL Clone Server backend. If the server returned an exception, that ought to be thrown by the cmdlet, and if you use the Wait-SqlCloneOperation cmdlet after starting a create/remove operation, it will throw any exception that occurred during the creation/deletion of an image/clone.

    If an unhandled exception was thrown in the Server or Agent, it should be logged in the relevant log files, as described here:
    https://documentation.red-gate.com/clone2/troubleshooting/log-locations

    Given that you're seeing "A task was canceled", particularly with Connect-SqlClone which only does a very simple handshake, I wonder whether this might actually be a timeout occurring when the cmdlet is trying to communicate with SQL Clone Server?
  • AmirhadiAmirhadi Posts: 5 New member
    Thanks for the information,
    but I mentioned  "Connect-SqlClone" just as an example , actually we used "Wait-sqlCloneOperation" but all exceptions that we get from SqlClone commands are the same : "A task was canceled" and that makes the debugging difficult for us,
    Amirhadi 
  • Wait-SqlCloneOperation should throw the relevant error from the create/delete operation rather than "A task was canceled", e.g.



    Are you seeing an error in the SQL Clone Server or Agent logs? Would you be able to share the relevant part of your PowerShell script?
Sign In or Register to comment.