Toad World® Forums

Identify & Translate Help: Random Corrupting: Older Converted TSM to SQL corrupts to XML Schema


#1

We are having random files is various versions of Toad corrupting and we cannot figure out the cause. Furthermore the files are so corrupt we cannot pull any data out of it to recreate the file. We end up finding saved copies (of the exact file) in other locations to use and then no corruption exists, and the file is run. We are trying to find the cause of the corruption and how to get the info in the file itself back.

The corruption seems to convert the file into XML Schema and references “CriteriaDataSet”, www.quest.com/2005/07/05/ToadSqlModeler (various others) and more. Granted the first few characters of the file are:

U+006D : LATIN SMALL LETTER M
U+006E : LATIN SMALL LETTER N
U+0004 : (END OF TRANSMISSION [EOT])

xml error corruption f3 mngmt rpt toad.png


#2

Hello,

It looks like you have saved Query Builder .tsm files. They contain information about tables, columns, where conditions, grouping and so on from Query Builder but they are not contained XML Schema. They are intended to use only in TDP. These files are not XML files!

To help me better understand your problem could you please provide more information?

Why do you think that the files are corrupted? Have you tried to open files from TDP? What happens when you open a file? Do you get an error?

What was the version of TDP that the files were created? Do you open the files with a newer version? What version do you use?

Do you have (or know) DB connections that have been used when the files were created

What info do you try to get from the files?

Regards

Aleksey


#3

Thank you for the reply. =) Questions and Answers below.

We believe, the file was a TSM copy-paste converted via editor to SQL, but when we opened the file(s) it had changed to XML schema language. At this time we still do not know the trigger or timing of the change. Granted I don’t have a ton of experience, but it looks like code for the actual layout & formatting of the diagramed view of the that query, instead of the SQL behind it. I say this because the code has has extra table and formatting references. Thank you for your help! Have a great day.

  1. Why do you think that the files are corrupted?

The image above is from TDP viewing the corrupted file, and it won’t run any version we have (3.1 - 4.3).

  1. What happens when you open a file? Do you get an error?

“Toad has determined this is a large file. Using a very large file can impact performance in the Editor”

and then when trying to “Run SQL or Script” ORA-00900: invalid SQL statement. At the mn[] at the beginning of the file.

Send to editor, says cannot be modelled.

  1. What was the version of TDP that the files were created? Do you open the files with a newer version? What version do you use?

I am unsure. I believe this was created in TDP 3 or below. Being used in 3.1 and 3.8. I use 4.3.

  1. Do you have (or know) DB connections that have been used when the files were created

RPTP Banner 8 using Oracle 11g.

  1. What info do you try to get from the files?

1 data set from multiple linked tables within the same DB connection.


#4

I am assuming that the extension of the file(s) has been changed from .TSM (or TER) to .SQL – that’s why it opens in SQL editor instead of Query Builder (Database Diagram).

Change the extension back to .TSM (and TER) and try to open file again. Please let me know the results.

Regards

Aleksey


#5

Thank you so much. I am not sure who or how the file was converted via the Toad program to the SQL, but this worked. Strange thing is it had worked as a SQL file for about a year before it did this. =)