Hello, folks. My name is Robert Pound, a product technologist from Quest. And today, we're going to discuss script execution in Toad DevOps Toolkit. Toad DevOps Toolkit is a Windows application that allows you to reliably execute Oracle Database functions within continuous integration platforms such as Jenkins, Bamboo, and others. Toad DevOps Toolkit supports access through a number of languages. But the focus of this video will be on PowerShell.
It is assumed for this video that you have knowledge of PowerShell continuous integration platforms and an understanding of the Toad features being discussed. There are several components to help you along your DevOps journey. The focus of this video will be on running code using script execution feature.
To get started, you may want to review the Example folder under the Toad DevOps Toolkit installation examples-- PowerShell and PowerShell scripts-- has a wide range of examples in PowerShell. And if we look specifically at the execute script PowerShell script, we can see that it contains all the PowerShell examples for execute script.
Let me go ahead and switch over to my demo. And we can walk through the basics of executing scripts in Toad DevOps Toolkit. Before I get started, it's important to note that I'm using PowerShell 5.0. And that's because that is the level of PowerShell that was used in the development of the example. However, it's not necessary to run Toad DevOps Toolkit. I'm also not using code best practices in my script for clarity. Let me go ahead and start.
So we have our connection information at the top, both the database and the connection string. And the first thing we do is create a new com object, Toad.ToadAutoObjects. This starts the process and creates the object for Toad DevOps Toolkit.
Once we have the object created, we establish a new connection with the connection information above. And from here, we set some parameters. So the first thing we do is add a new script to this object. And we have to identify the source for that script. So if we want to include the output into the object, we have to set this to true.
And I'm going to output the results. So I'm going to go ahead and set this to true. And I am limiting it to 10 rows. And that's, again, for demo purposes. And we have different options for input. I'm going to simply pass in a string. But obviously, if you wanted to add in a file at this point, you could.
So once we have the parameters set, the next thing to do is actually execute the script. And finally, we output it to the screen just so we can see the results from that script. And finally, with some housekeeping, we quit, and thus ending the process. And that's it, short and simple.
Hopefully, this helped you out in understanding a little bit more about how to execute scripts in Toad DevOps Toolkit. For more information on this topic, you can check out the help file. And if you navigate to All Programs, Quest Software, and Toad DevOps Toolkit, you can find the help file. You can also check out community-driven innovation going on at www.toadworld.com. For more information on this product, you can visit www.quest.com/products/ToadDevopsToolkit. Thank you. And have an excellent day.