Kinook Software Forum

Go Back   Kinook Software Forum > Visual Build Professional > [VBP] Third Party Tools
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Rating: Thread Rating: 7 votes, 5.00 average. Display Modes
  #1  
Old 10-16-2007, 05:18 PM
ambalboa ambalboa is online now
Registered User
 
Join Date: 06-25-2007
Location: Houston, TX
Posts: 70
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.
Reply With Quote
  #2  
Old 10-16-2007, 05:35 PM
ambalboa ambalboa is online now
Registered User
 
Join Date: 06-25-2007
Location: Houston, TX
Posts: 70
Also, I have the "Hide application window" option checked. It doesn't seem to work.
Reply With Quote
  #3  
Old 10-16-2007, 08:01 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
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
Reply With Quote
  #4  
Old 10-17-2007, 09:09 AM
ambalboa ambalboa is online now
Registered User
 
Join Date: 06-25-2007
Location: Houston, TX
Posts: 70
Am I right in doing it with %DOSCMD%? I suppose doing it with Oracle SQL Developer is not possible? Thanks for your response.
Reply With Quote
  #5  
Old 10-17-2007, 10:53 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
I don't know exactly what you're doing with %DOSCMD%, but as they say, "if it ain't broke, don't fix it."
Reply With Quote
  #6  
Old 10-17-2007, 11:45 AM
ambalboa ambalboa is online now
Registered User
 
Join Date: 06-25-2007
Location: Houston, TX
Posts: 70
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?
Reply With Quote
  #7  
Old 10-17-2007, 11:58 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
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.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



All times are GMT -5. The time now is 07:18 AM.


Copyright © 1999-2023 Kinook Software, Inc.