How to automate the SQL query execution from command line?
I want to connect to an oracle database form Command line through sqlplus and then execute a sql query from the sql prompt.
Is is possible to automate this using Silk Test?
If not then what's the alternative solution?
** I do not want to use the database functions provided by Silk Test.
It would be great if somebody can help me on this.
Re: How to automate the SQL query execution from command line?
Yep, I've automated a number of Unix related tasks through a telnet/PuTTY session. Use the TypeKeys method on a Telnet/PuTTY dialog box.
DialogBox.TypeKeys("any unix cmd")
If you want to capture the output I recommend PuTTY. It's free and allows you to capture the entire screen which you could then parse in Silk. You can adjust your screen scroll back as well to allow for more lines. You must use alt keys to copy the screen and then get the copied info from the Clipboard object.
//copy screen to clipboard
//get info from clipboard
LIST OF STRING lsScreenContents = Clipboard.GetContents()
Hope it helps.
ps -- why don't you want to use the DB commands within Silk?