Toad World® Forums

Generate DDL after TBS delete


#1

Hi,

I deleted a tablespace. It was removed from tables, etc in the editor, however when I generated the tablespace clause showed the tablespace.

After saving and reopening the model, generate correctly showed no tablespace clause.

Regards
Malcolm


#2

Hello Malcolm,

Please write us in detail what you did. Thanks very much for the details.

I look forward to hearing from you.

Vladka


#3

Hi Vladka,

  1. open a REd model. (I want to remove the table to tablespace assignment so I can create different schema with the same DDL)
  2. edit table and check tablespace (eg TBS1) is assigned
  3. in Physical Model Explorer right click tablespace (TBS1) and delete it
  4. edit table and check tablespace is no longer assigned (it is blank)
  5. generate DDL
  6. check DDL and see the tables have “TABLESPACE TBS1” clause
  7. close and save the model
  8. reopen the model
  9. edit table and check tablespace (it is None)
  10. generate DDL
  11. check DDL and see the tables have no TABLESPACE clause (which is what I wanted)

HTH
Malcolm


#4

Hello Malcolm,

  1. open a REd model.
  2. edit table and check tablespace (eg TBS1) is assigned
  3. in Physical Model Explorer right click tablespace (TBS1) and delete it
  4. edit table and check tablespace is no longer assigned (it is blank)
  5. generate DDL
  6. check DDL and see the tables have “TABLESPACE TBS1” clause

I take exactly the same steps, however the clause of the deleted tablespace is not included in the script I get. Unfortunately, I keep failing to reproduce the problem.
I will forward it to our testers for further verification.
Thanks very much.

Vladka


#5

Hi Vladka,

I’ve tried a different model with the same result.

I wrote a script to Log Entity.Tablespace.Name and ran it after step 4.
Although the Entity Edit dialog showed the tablespace as blank, Entity.Tablespace.Name still showed the original name. I guess this is why it still appears in the DDL script.

Malcolm


#6

Hi Vladka,

I’ve just tried the whole test from scratch.

When I do the RE, then delete the TBS I get the correct DDL code.

If I save the model before I delete the TBS I get the wrong code.

Malcolm


#7

Hi Malcolm,

Thanks for your fantastic co-operation!
Finally, we have managed to simulate the problem. We will fix it. CR # 47 919.

Thanks again.

Regards,

Vladka + TDM Team