1

My SSIS project builds and run succesfully in VS2017. But when I copy the dtsx file into my server and use cmd to run it, I get error this error:

Error Log in CMD

Error Log in CMD

Basically, I'm using Script Task to invoke api rest with C#. The error is like the sintaxis were wrong but it run successfully in visual studio.

This is the list of program the server has. Do I need something else in the server?

Server's Program and Features

Server's Program and Features

Thank you in advance.

Emma
  • 27,428
  • 11
  • 44
  • 69
Joe
  • 11
  • 1
  • https://stackoverflow.com/questions/54647526/how-to-find-version-of-installed-ssis – quaabaam Nov 18 '20 at 23:54
  • i executed the same batch in my laptop (VS installed) and I have the same error. do you know why? – Joe Nov 18 '20 at 23:58
  • As it doesn't execute fine on your laptop as well, you propably have not enquoted or escaped all parameters you process, try printing the commands in question. – DerSchnitz Nov 19 '20 at 00:33
  • The first things I would check, make sure you have the same version of SQL installed in both environments (or that the package is built for the correct SQL version where you are deploying it) and verify you actually have SSIS installed on the server/system you are running the package. – quaabaam Nov 19 '20 at 00:52
  • I always run my SSIS packages in my laptop through batch file with no problem. But in this case my package have Script task with C#. It runs fine without the script task. I have no parameters in the batch file I have all in the database in a table. – Joe Nov 19 '20 at 01:05
  • Hm, ok. So the error messages talk about lines 145 and 150 of ScriptMain.cs. I'd bet somethings is evaluated in there that contains characters not being escaped. As you shared no source code, we ave to guess though. – DerSchnitz Nov 19 '20 at 01:38
  • Yes, it was the code. In VS there is no problem with **Res.Estado is null**, builds and runs fine. But in cmd show error. So I erase this part and just left **Res.Estado == string.Empty** and everything is fine now. `if (Res.Estado is null || Res.Estado == string.Empty) { Dts.Variables["v_EstadoAdd"].Value = "ERROR DESCONOCIDO"; Dts.Variables["v_MensajeAdd"].Value = response.StatusCode.ToString() + " - " + response.ReasonPhrase.ToString(); }` – Joe Nov 19 '20 at 20:48

0 Answers0