Last active
March 4, 2018 19:31
-
-
Save hamermike/08c6740d6853920c5e3297ffbb3e71b9 to your computer and use it in GitHub Desktop.
Toad DevOps Toolkit PL/SQL Code Analysis
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Import win32com.client so that we have easy access to COM interfaces. | |
import win32com.client | |
# Connection information used to connect to your Oracle database. | |
source_connection = "SCOTT/SCOTT_PASSWORD@ORA_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. | |
tdt.CodeAnalysis.Execute() | |
tdt.Quit() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment