#1
|
|||
|
|||
How do you run script using Oracle SQL Develloper silently?
I am having trouble running Oracle SQL Developer silently. I am trying to run a sql script file using the 'Run Program' action step and I entered the following on the Command field:
"C:\SQL Developer\sqldeveloper-1.1.2.2579\sqldeveloper\sqldeveloper.exe" sqlplus "username/password@oracleserver" Note, the username, password and oracleserver are the values I enter accordingly (no spaces, no quotes). On the Input tab, I enter the .sql file name. I also entered it as a string, as in @C:\FILEPATH\FILENAME.sql and the oracle program just opens up, it doesn't even run the script file. I have been unsuccessful in running the script file every time. I am able to do this by calling the command prompt (cmd.exe, by using the %DOSCMD% system macro) but not this way. Any help would be greatly appreciated. Thanks. |
#2
|
|||
|
|||
Also, I have the "Hide application window" option checked. It doesn't seem to work.
|
#3
|
|||
|
|||
Oracle SQL Developer is a graphical tool. Use the SQL*Plus command-line tool for automating Oracle tasks.
http://www.orafaq.com/faq/sqlplus http://www.visualbuild.com/Manual/oracle.htm |
#4
|
|||
|
|||
Am I right in doing it with %DOSCMD%? I suppose doing it with Oracle SQL Developer is not possible? Thanks for your response.
|
#5
|
|||
|
|||
I don't know exactly what you're doing with %DOSCMD%, but as they say, "if it ain't broke, don't fix it."
|
#6
|
|||
|
|||
Yes, I agree with that and it seems to be working fine with the command-prompt. Basically, I am calling SQLPlus from the command-prompt, and it runs the script file but my co-workers are telling me that Oracle SQL Developer's output is easier to understand for debugging purposes. They tell me that the reason for not being able to automate the script run is because some sqlplus statements are incompatible with sql worksheet in Oracle SQL Developer. They suggest I modify the .sql file by replacing certain syntax with PL/SQL syntax. You say this is a graphical tool, so even if the modifications are made, can it be automated and included in the build process I created?
|
#7
|
|||
|
|||
I downloaded Oracle SQL Developer v1.2.1. When launched without parameters, a GUI app opened, and when launched with sqldeveloper -?, it displayed this message box
--------------------------- Oracle SQL Developer --------------------------- Commands: -verbose Show JNI options -client Use Client as the Java VM -server Use Hotspot Server as the Java VM --<directive>=<value> Override a directive from the configuration file -J<flag> Pass <flag> directly to the runtime system -conf[igure] <file.conf> Use the specified configuration file -multi Start a new instance -migrate Migrate user settings from a previous installation --------------------------- OK --------------------------- I didn't see much more in the help regarding calling it from the command-line, so my guess is that it's not amenable to performing automated SQL statements and is meant to be an interactive tool. At any rate, you should contact Oracle for further information about it. |
|
|