Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Toad DevOps Toolkit PL/SQL Code Analysis
# Import win32com.client so that we have easy access to COM interfaces.
import win32com.client
# Connection information used to connect to your Oracle database.
# Start Toad DevOps Toolkit.
tdt = win32com.client.Dispatch("Toad.ToadAutoObject")
# Create and assign a Toad DevOps Toolkit connection.
tdt.CodeAnalysis.Connection = tdt.Connections.NewConnection(source_connection)
# Set code analysis report information.
tdt.CodeAnalysis.ReportName = "CA Report"
tdt.CodeAnalysis.OutputFolder = "C:\Temp"
tdt.CodeAnalysis.ReportFormats.IncludeHTML = True
# Set database object information to analyze.
database_object = tdt.CodeAnalysis.DBObjects.Add()
database_object.ObjectName = "ADD_EXPENSES"
database_object.ObjectOwner = "SCOTT"
database_object.ObjectType = "FUNCTION"
# Execute Code Analysis.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment