I have added a step to run the stored procedure with library script “SQL - Execute Scripts Ordered step”.
When I’m providing the script to execute the stored procedure it is throwing the below Exception:
“Exception calling “ReadAllText” with “1” argument(s): “The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.”
Closing connection”
I believe this is because of the large text script I provide to execute in field “SQL Script File”.
As shown in examples I’m providing the stored procedure execution script directly but in library PowerShell’s scipt - $content = [IO.File]::ReadAllText($OctopusParameters[‘SqlScriptFile’])
ReadAllText is expecting something less than 260 characters.
One solution I can think of is to provide the execution script as a file with package itself. But this will be the last resort.
Please suggest the solution to this. How can I run the stored procedure directly from the step in process?