Quantcast
Channel: Answers by "KillerDBA"
Viewing all articles
Browse latest Browse all 30

Answer by KillerDBA

$
0
0

I'm looking forward to any suggestions on how to get an all-or-none on DDL updates... Most likely, you're going to have to be prepared to flashback your database (if you're on a recent enough version of Oracle). All DDL is automatically commited, so each DDL change you do should result in an irrevocable commit. This is one of the reasons I like SQL Server - you can control transactions that involved DDL on your objects, just like transactions to data in tables.

And I'm not sure if your immediate issue is related to the lock conflict you sugges, but I think you're right. Here's a workaround for that... use a temporary table to store the constraint and table names and then loop off a cursor in that table.

Update:

It appears that the only DDL wish to use is the management of the FK relationships and you want to do this so that INSERT statements won't fail. Is there some reason you can't rearrange your INSERTs so that the FKs can be left in place? I've done database transforms and ordinarily we just make sure we create the parent records first; we leave the FK definitions alone.


Viewing all articles
Browse latest Browse all 30

Latest Images

Trending Articles





Latest Images