I've already tried OracleCommand but it's designed for one command only. The script is full of CREATE and procedures. There's a way to run this big script without re-designing it? Also I've tried microsoft.sqlserver.management.smo but it's not present in my machine.
-
Maybe this answer will help?Ponder Stibbons– Ponder Stibbons2019-07-23 10:05:27 +00:00Commented Jul 23, 2019 at 10:05
-
Already seen but there are 3900 lines of code so redesigning every subcommand with this tecnhique it will be a masive work. Also in the script there are begin-end procedures.Kannon Sama– Kannon Sama2019-07-23 10:10:13 +00:00Commented Jul 23, 2019 at 10:10
-
Sounds like you've got a script intended to be run from an Oracle client like SQL*Plus. Why do you need to run it from C#?APC– APC2019-07-23 10:48:30 +00:00Commented Jul 23, 2019 at 10:48
-
I'm developing an installer, I could do this action with a Custom action calling sqlplus from c# or another enviroment, but doing so there will be the necessity to input the password. I would like to having all automatic.Kannon Sama– Kannon Sama2019-07-23 10:53:56 +00:00Commented Jul 23, 2019 at 10:53
-
How often will you have to run this script? If this script is truly ginormous, or if the script changes frequently, it might be worth parsing the script and converting it to multiple SQL statements. You could do that with my open source program PLSQL_LEXER. It's not a full parser, but it's smart enough to know how to split statements and remove the terminators. And it runs in any Oracle database and could be used to either generate C# commands or run SQL commands. The downside is it's not trivial to install and use.Jon Heller– Jon Heller2019-07-24 04:36:46 +00:00Commented Jul 24, 2019 at 4:36
|
Show 1 more comment