Ispirer Website Ispirer Toolkit Overview Free Trial

Ispirer Toolkit: Trace Mode

As a result of the conversion, the tool creates a separate .sql file for each object with create statement. However, the question arises - how to compare the result with the source code, what was the result of the conversion with the original DDL of the object? How to unload them from the source database in order to compare with results?

Of course, it is very inconvenient to unload the code separately with the help of some tools. By enabling the trace mode, you can see the source script in one file with the converted script. This makes it easy to compare the source and the target code, analyze the conversion and collect all the necessary information to request additional information from our team or request for tool customization. Below are examples of converting the simplest function from Oracle to PG trace mode turned on and turned off:

  • The result with trace mode turned off:
CREATE OR REPLACE FUNCTION FUNC_STRING(P1 VARCHAR)
RETURNS VARCHAR LANGUAGE plpgsql
   AS $$
BEGIN
   RETURN  CONCAT('res = ',RPAD(P1,5,'*'));
END; $$;
  • The result with trace mode:
--Commented source
----CREATE FUNCTION FUNC_STRING (P1 VARCHAR2)
----RETURN VARCHAR2
----AS
----BEGIN
----RETURN  'res = ' || RPAD(P1,5,'*');
----END;

CREATE OR REPLACE FUNCTION FUNC_STRING(P1 VARCHAR)
RETURNS VARCHAR LANGUAGE plpgsql
   AS $$
BEGIN 
   RETURN  CONCAT('res = ',RPAD(P1,5,'*'));
END; $$;

How to Run Conversion in Trace Mode

More Tips and Tricks

If you have any questions or face any difficulties, please contact our support team at support@ispirer.com