Doing a Reverse Engineering of a SQL Server 2008 database. When it's completed and going to a function in the Physical Model Explorer, certain functions with comments and parameters are truncated or omitted in Edit mode in the Physical Model Explorer.
For example, a function called SalesDate is stored in the Database as follows:
CREATE FUNCTION [dbo].[SalesDate]
-- =============================================
-- Author: User
-- Create date: 01/15/2013
-- Description: Called by Adhoc Sales Cube Build
--
-- This is a test comment box.
--
-- THIS FUNCTION IS INTENDED ONLY TO BE CALLED BY
-- DATABASE FUNCTIONS LISTED ABOVE, NOT BY ANY OTHER
-- CODE.
--
-- =============================================
(
@pInputDate DATETIME,
@pFromCurrentYearDate DATETIME,
@pThruCurrentYearDate DATETIME,
@pWeeklyDetail INTEGER
)
RETURNS DATETIME
However, after the Reverse Engineering and going to the Physical Model Explorer for the same function and going to the "SQL Preview" tab, only the following is seen:
CREATE FUNCTION [dbo].[SalesDate] ()
RETURNS DATETIME
WORKAROUND:
In Reverse Engineering Wizard; Options section, select "Load Some Objects as SQL Sentence Only" check box. Then functions, procedures, views and triggers are loaded as whole pieces of SQL code without parsing (not divided into individual fields).
STATUS:
Issue fixed in version 5.0. The latest version of Toad Data Modeler can be downloaded at:
https://support.quest.com/toad-data-modeler/download-new-releases