TSM data base change

I recently created a new tsm file using a test db

I would like to reuse it and point to my production db

I can not find a simple solution in TOAD and hope that someone can point me in the right direction.


Currently the Query Builder wants to use the connection it is saved with. I entered CR 75,799 to allow executing against different connections.

For now, try this work around.

  1. Open tsm file.
  2. Press the ‘Send to Editor’ button. This will send the SQL to a new editor.
  3. Change the current connection to the one you want. (Use the drop down on the BOTTOM RIGHT of application)
  4. Press the ‘Send to Query Builder’ button. This will reserve engineer this SQL into a new Query Builder that is pointing to the connection you want.
  5. Save to new tsm file.

In the end you are making another file with the new connection, but should be workable for what you need.


That is what I am doing and hoped there was a 1 step approach.
The one thing I need to do still is replace the old db name with the new.

You also use the Find and Replace in files to change the connect data.

Thanks again

I have done all that and edited the query via the diagram where I added a new table and column. Saved the file as a .sql all looked good.

Except when I open the sql file I get nothing like the sql statement I left in there. There is all this formatting going on in the file what perhaps looks like the formatting for the diagram.

No sign of sql code and it will not run.

More advice is appreciated.


I assume you mean you saved to a tsm file (not .sql). When you changed the connection and sent to a new Query Builder you should see the diagram built. If the scope of the new connection was different and the tables don’t resolve you will get a message that says the Query Builder could not reverse engineer it. I’ll assume the tables exist on both databases. Check the schema. If the tables are not schema referenced and your connection does not alter to that schema the tables will not resolve. Check and see if this is the case.

P.S. Did you execute the sql in the editor after you changed the connection?