Analyze Stored Procedures in Oracle and SQL Server
Posted on 2008-10-30
I have been working on a tool to allow a user to point it at a database (Oracle or SQL Server) and then pass it the name of a stored procedure and have it return the input parameters and types and also the return columns and types.
I have used several methods, but at best only can retrieve either too many, or not all of the columns which represent the resultset. The problem is that the stored procedure may have aliased and/or constructed column names and none of the methods I have found and have been noodling around with wll retrieve these constructed column names.
Are there any tools or database objects that can get me the solution? I have been using the command builder object to return the input parameters and executing the stored proc and then reading the returned column names. However, even if I do this and get the aliased column names, the db analyzer does not know what the name of the aliased columns are.