Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Why Oracle does not allow rollback of DDL statements?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  Messages 1 - 25 of 71 - Collapse all  -  Translate all to Translated (View all originals)   Newer >
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
zigzag...@yahoo.com  
View profile  
 More options Nov 9 2008, 6:36 pm
Newsgroups: comp.databases.oracle.server
From: zigzag...@yahoo.com
Date: Sun, 9 Nov 2008 15:36:51 -0800 (PST)
Local: Sun, Nov 9 2008 6:36 pm
Subject: Why Oracle does not allow rollback of DDL statements?
I have always been surprised why Oracle does a implicit commit when
DDL statements (e.g create table …) are executed.  DDL statements
simply write information (insert, delete and update) to data
dictionary, so why DDL statement cannot be rolled back. Am I missing
some thing?

I was learning SQL Server few months ago and I noticed that SQL Server
does allow rollback of DDL statements if I am not mistaken. It lloks
like there is something in Oracle architecture which prevents rollback
of DDL satements. Rollback of all staements should be allowed not just
of DML statements.

Appercaite your insight.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
hpuxrac  
View profile  
(1 user)  More options Nov 9 2008, 6:41 pm
Newsgroups: comp.databases.oracle.server
From: hpuxrac <johnbhur...@sbcglobal.net>
Date: Sun, 9 Nov 2008 15:41:06 -0800 (PST)
Local: Sun, Nov 9 2008 6:41 pm
Subject: Re: Why Oracle does not allow rollback of DDL statements?
On Nov 9, 6:36 pm, zigzag...@yahoo.com wrote:

> I have always been surprised why Oracle does a implicit commit when
> DDL statements (e.g create table …) are executed.  DDL statements
> simply write information (insert, delete and update) to data
> dictionary, so why DDL statement cannot be rolled back. Am I missing
> some thing?

> I was learning SQL Server few months ago and I noticed that SQL Server
> does allow rollback of DDL statements if I am not mistaken. It lloks
> like there is something in Oracle architecture which prevents rollback
> of DDL satements. Rollback of all staements should be allowed not just
> of DML statements.

> Appercaite your insight.

Why don't you get Tom Kyte's 10g book the first several chapters of
architecture related material could give you the insight you are
looking for probably.

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
gym dot scuba dot kennedy at gmail  
View profile  
 More options Nov 9 2008, 6:52 pm
Newsgroups: comp.databases.oracle.server
From: "gym dot scuba dot kennedy at gmail" <kenned...@verizon.net>
Date: Sun, 09 Nov 2008 23:52:36 GMT
Local: Sun, Nov 9 2008 6:52 pm
Subject: Re: Why Oracle does not allow rollback of DDL statements?

<zigzag...@yahoo.com> wrote in message

news:57ce7648-b6db-4e34-ad52-4dc171ceb0a9@v16g2000prc.googlegroups.com...
I have always been surprised why Oracle does a implicit commit when
DDL statements (e.g create table …) are executed.  DDL statements
simply write information (insert, delete and update) to data
dictionary, so why DDL statement cannot be rolled back. Am I missing
some thing?

I was learning SQL Server few months ago and I noticed that SQL Server
does allow rollback of DDL statements if I am not mistaken. It lloks
like there is something in Oracle architecture which prevents rollback
of DDL satements. Rollback of all staements should be allowed not just
of DML statements.

Appercaite your insight.

Wanting it different than it is isn't going to change the facts.  In general
in Oracle you don't execute DDL statements on the fly. (eg create and drop
tables on the fly.  There are global temporary tables for that and they are
created one time)  In SQL Server there is often more of a need to create a
temporary table on the fly due to locking issues (that Oracle does not
have).  So SQL Server HAS to work that way or their are up the proverbial
creek without a paddle.  In Oracle you shouldn't be doing DML and the DDL
that you want ot roll back.  Could Oracle change the way it does that?  Sure
it is technically possible.  Could Oracle allow dirty reads?  Sure it is
technically possible, but it goes against their philosophy.
Jim


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Serge Rielau  
View profile  
 More options Nov 9 2008, 7:37 pm
Newsgroups: comp.databases.oracle.server
From: Serge Rielau <srie...@ca.ibm.com>
Date: Sun, 09 Nov 2008 19:37:13 -0500
Local: Sun, Nov 9 2008 7:37 pm
Subject: Re: Why Oracle does not allow rollback of DDL statements?
http://en.wikipedia.org/wiki/Blasphemy

First column storage, now transactional DDL.
You are loosing your way zigzag.. what's next, stop tithing?
You know what's waiting on the other side!

*satanicalchuckle**
Serge

--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Noons  
View profile  
 More options Nov 10 2008, 3:45 am
Newsgroups: comp.databases.oracle.server
From: Noons <wizofo...@yahoo.com.au>
Date: Mon, 10 Nov 2008 19:45:12 +1100
Local: Mon, Nov 10 2008 3:45 am
Subject: Re: Why Oracle does not allow rollback of DDL statements?
zigzag...@yahoo.com wrote,on my timestamp of 10/11/2008 10:36 AM:

> I have always been surprised why Oracle does a implicit commit when
> DDL statements (e.g create table …) are executed.  

It's called database consistency.
Only real databases have it.

> DDL statements
> simply write information (insert, delete and update) to data
> dictionary, so why DDL statement cannot be rolled back.

Oh no they most certainly don't just do that!

 > Am I missing

> some thing?

A lot, actually. But it'll come.

> I was learning SQL Server few months ago and I noticed that SQL Server
> does allow rollback of DDL statements if I am not mistaken.

It does not.

> It lloks
> like there is something in Oracle architecture which prevents rollback
> of DDL satements.

No there isn't. Read about the FRA.

>Rollback of all staements should be allowed not just
> of DML statements.

Actually, it should not. There is no requirement
anywhere for such in any of the available standards
for relational database architecture or design.

> Appercaite your insight.

yuo gto ti.

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Thomas Kellerer  
View profile  
 More options Nov 10 2008, 4:02 am
Newsgroups: comp.databases.oracle.server
From: Thomas Kellerer <YQDHXVLMU...@spammotel.com>
Date: Mon, 10 Nov 2008 10:02:08 +0100
Local: Mon, Nov 10 2008 4:02 am
Subject: Re: Why Oracle does not allow rollback of DDL statements?
Noons, 10.11.2008 09:45:

>> I have always been surprised why Oracle does a implicit commit when
>> DDL statements (e.g create table …) are executed.  

> It's called database consistency.
> Only real databases have it.

But creating objects in a database needs to be consistent as well. I don't see why having transactional DDL contradicts database consistency.

Actually I think it adds to consistency.

>> DDL statements
>> simply write information (insert, delete and update) to data
>> dictionary, so why DDL statement cannot be rolled back.

> Oh no they most certainly don't just do that!

So what else are they doing?

 >> I was learning SQL Server few months ago and I noticed that SQL Server

>> does allow rollback of DDL statements if I am not mistaken.

> It does not.

Yes it does (Note that I do not like SQL Server at all, but that is definitely a plus - or it would be if SQL Server wasn't that awful when it comes to locking...)

>> Rollback of all staements should be allowed not just
>> of DML statements.

> Actually, it should not. There is no requirement
> anywhere for such in any of the available standards
> for relational database architecture or design.

There might not be a requirement, but it *is* very handy.

Just think of an database upgrade script that fails in the middle. With transactional DDL I simply do a rollback fix the cause of the error and start the script again. With non-transactional DDL I need to remove all objects that were created until then to put the DB into the state before I ran the script.

Thomas


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mladen Gogala  
View profile  
 More options Nov 10 2008, 4:28 am
Newsgroups: comp.databases.oracle.server
From: Mladen Gogala <gogala.mla...@gmail.com>
Date: Mon, 10 Nov 2008 10:28:22 +0100 (CET)
Local: Mon, Nov 10 2008 4:28 am
Subject: Re: Why Oracle does not allow rollback of DDL statements?

On Mon, 10 Nov 2008 10:02:08 +0100, Thomas Kellerer wrote:
> But creating objects in a database needs to be consistent as well. I
> don't see why having transactional DDL contradicts database consistency.

> Actually I think it adds to consistency.

So, I create table, Noons creates an index to that table, in his own
schema. If I was able to roll back the table creation, what happens to
Nuno's index? Flashback table to before drop is possible with all releases
that support flashback area, since the version 7.3.6.

--
Mladen Gogala
http://mgogala.freehostia.com


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Shakespeare  
View profile  
 More options Nov 10 2008, 4:34 am
Newsgroups: comp.databases.oracle.server
From: Shakespeare <what...@xs4all.nl>
Date: Mon, 10 Nov 2008 10:34:53 +0100
Local: Mon, Nov 10 2008 4:34 am
Subject: Re: Why Oracle does not allow rollback of DDL statements?
Mladen Gogala schreef:

> On Mon, 10 Nov 2008 10:02:08 +0100, Thomas Kellerer wrote:

>> But creating objects in a database needs to be consistent as well. I
>> don't see why having transactional DDL contradicts database consistency.

>> Actually I think it adds to consistency.

> So, I create table, Noons creates an index to that table, in his own
> schema. If I was able to roll back the table creation, what happens to
> Nuno's index? Flashback table to before drop is possible with all releases
> that support flashback area, since the version 7.3.6.

Of course, Noons could only create the index AFTER you commit your DDL!
So no roll back would be possible anymore.

Shakespeare


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Thomas Kellerer  
View profile  
 More options Nov 10 2008, 4:38 am
Newsgroups: comp.databases.oracle.server
From: Thomas Kellerer <YQDHXVLMU...@spammotel.com>
Date: Mon, 10 Nov 2008 10:38:03 +0100
Local: Mon, Nov 10 2008 4:38 am
Subject: Re: Why Oracle does not allow rollback of DDL statements?
Mladen Gogala, 10.11.2008 10:28:
> On Mon, 10 Nov 2008 10:02:08 +0100, Thomas Kellerer wrote:

>> But creating objects in a database needs to be consistent as well. I
>> don't see why having transactional DDL contradicts database consistency.

>> Actually I think it adds to consistency.

> So, I create table, Noons creates an index to that table, in his own
> schema. If I was able to roll back the table creation, what happens to
> Nuno's index? Flashback table to before drop is possible with all releases
> that support flashback area, since the version 7.3.6.

Noons can't create an index on a table that I have not committed (because he will not see it).
It's just like he can't delete a row in a table that I have inserted but not committed.

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mladen Gogala  
View profile  
 More options Nov 10 2008, 5:54 am
Newsgroups: comp.databases.oracle.server
From: Mladen Gogala <gogala.mla...@gmail.com>
Date: 10 Nov 2008 11:54:44 +0100
Local: Mon, Nov 10 2008 5:54 am
Subject: Re: Why Oracle does not allow rollback of DDL statements?

OK, that would make things even worse, because you would have "local"
objects, visible only from the creating session. There would be no way
to meaningfully monitor the system and explain SQL as the "noncommitted"
table would not exist from the perspective of any other user.

--
Mladen Gogala
http://mgogala.freehostia.com


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mladen Gogala  
View profile  
 More options Nov 10 2008, 5:56 am
Newsgroups: comp.databases.oracle.server
From: Mladen Gogala <gogala.mla...@gmail.com>
Date: 10 Nov 2008 11:56:53 +0100
Local: Mon, Nov 10 2008 5:56 am
Subject: Re: Why Oracle does not allow rollback of DDL statements?

On Mon, 10 Nov 2008 10:38:03 +0100, Thomas Kellerer wrote:
> Noons can't create an index on a table that I have not committed
> (because he will not see it). It's just like he can't delete a row in a
> table that I have inserted but not committed.

That would imply allowing "local" schema objects, like "local tables"
or "local temporary tables". That would make it practically impossible to
meaningfully monitor the system and run explain plan on SQL statements.

--
Mladen Gogala
http://mgogala.freehostia.com


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Shakespeare  
View profile  
 More options Nov 10 2008, 6:03 am
Newsgroups: comp.databases.oracle.server
From: Shakespeare <what...@xs4all.nl>
Date: Mon, 10 Nov 2008 12:03:16 +0100
Local: Mon, Nov 10 2008 6:03 am
Subject: Re: Why Oracle does not allow rollback of DDL statements?
Mladen Gogala schreef:

Indeed. I wasn't saying it would be any better.... or any good at all.
But isn't this the case with all uncomitted transactions?
What about two users creating the same table(s) with a delayed commit?
And what about DROP TABLE statements? Should they be roll backed as
well?????

Shakespeare


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Thomas Kellerer  
View profile  
 More options Nov 10 2008, 6:08 am
Newsgroups: comp.databases.oracle.server
From: Thomas Kellerer <YQDHXVLMU...@spammotel.com>
Date: Mon, 10 Nov 2008 12:08:37 +0100
Local: Mon, Nov 10 2008 6:08 am
Subject: Re: Why Oracle does not allow rollback of DDL statements?
Mladen Gogala, 10.11.2008 11:56:

> On Mon, 10 Nov 2008 10:38:03 +0100, Thomas Kellerer wrote:

>> Noons can't create an index on a table that I have not committed
>> (because he will not see it). It's just like he can't delete a row in a
>> table that I have inserted but not committed.

> That would imply allowing "local" schema objects, like "local tables"
> or "local temporary tables". That would make it practically impossible to
> meaningfully monitor the system and run explain plan on SQL statements.

Other RDBMS can handle that. rdb/VMS was able to handle things like that 15 years ago.
Oracle should have a look at the source code as they now own that product :)

Thomas


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Noons  
View profile  
 More options Nov 10 2008, 6:49 am
Newsgroups: comp.databases.oracle.server
From: Noons <wizofo...@yahoo.com.au>
Date: Mon, 10 Nov 2008 22:49:33 +1100
Local: Mon, Nov 10 2008 6:49 am
Subject: Re: Why Oracle does not allow rollback of DDL statements?
Thomas Kellerer wrote,on my timestamp of 10/11/2008 8:02 PM:

>  >> I was learning SQL Server few months ago and I noticed that SQL Server
>>> does allow rollback of DDL statements if I am not mistaken.

>> It does not.
> Yes it does (Note that I do not like SQL Server at all, but that is

No, it does not. Don't try that rubbish with me, I've
been breathing SS2K5 for the last 14 months. It does not.
The front end you most likely use to access it does allow that.
But that is not SQL Server.

> There might not be a requirement, but it *is* very handy.

No it is not. Try having a process that relies on dropping a
table to succeed and another that relies on a create index on
that table.  Which one is supposed to end first, when?

> Just think of an database upgrade script that fails in the middle. With
> transactional DDL I simply do a rollback fix the cause of the error and
> start the script again. With non-transactional DDL I need to remove all
> objects that were created until then to put the DB into the state before
> I ran the script.

So what?  Test the script first.  Databases
are not to be managed like digital photography
where if you don't like something you erase it.
Databases are to be handled by supposedly responsible
folks who presumably now what they are doing.
The last thing a db needs is the
"bang-head-on-wall-until-something-gives" approach.

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Noons  
View profile  
 More options Nov 10 2008, 6:52 am
Newsgroups: comp.databases.oracle.server
From: Noons <wizofo...@yahoo.com.au>
Date: Mon, 10 Nov 2008 22:52:52 +1100
Local: Mon, Nov 10 2008 6:52 am
Subject: Re: Why Oracle does not allow rollback of DDL statements?
Thomas Kellerer wrote,on my timestamp of 10/11/2008 10:08 PM:

>> That would imply allowing "local" schema objects, like "local tables"
>> or "local temporary tables". That would make it practically impossible to
>> meaningfully monitor the system and run explain plan on SQL statements.

Or even manage space in that system.  Yeah, we know: "disk is
cheap".  Try that with SAN platinum disks and see how high
it flies with the CFO...

> Other RDBMS can handle that. rdb/VMS was able to handle things like that
> 15 years ago. Oracle should have a look at the source code as they now
> own that product :)

Given they have owned the product for that long
and haven't even bothered duplicating that one should
tell us something?

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Serge Rielau  
View profile  
 More options Nov 10 2008, 6:52 am
Newsgroups: comp.databases.oracle.server
From: Serge Rielau <srie...@ca.ibm.com>
Date: Mon, 10 Nov 2008 06:52:42 -0500
Local: Mon, Nov 10 2008 6:52 am
Subject: Re: Why Oracle does not allow rollback of DDL statements?
Thomas Kellerer wrote:
> Mladen Gogala, 10.11.2008 11:56:
>> On Mon, 10 Nov 2008 10:38:03 +0100, Thomas Kellerer wrote:

>>> Noons can't create an index on a table that I have not committed
>>> (because he will not see it). It's just like he can't delete a row in a
>>> table that I have inserted but not committed.

>> That would imply allowing "local" schema objects, like "local tables"
>> or "local temporary tables". That would make it practically impossible to
>> meaningfully monitor the system and run explain plan on SQL statements.

I think now it's getting to teh meat. Supporting transactional DDL does
not come for free.
It's obvious that the community is perfectly happy to wrap each EXECUTE
IMMEDIATE 'CREATE OR REPLACE ....' into an autonomous transaction and
handle logical undo sripts. So.. no incentive.

Other RDBMS which do have transactional DDL can very well monitor their
system, even explain a query on DDL that isn't committed so long as the
one explaining is the session that did the DDL, just like their own
modifications to regular data. The schema catalog is just another set of
tables after all.

The locking between the index and teh table is no different than any
other update lock.

Cheers
Serge
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Cristian Cudizio  
View profile  
 More options Nov 10 2008, 6:57 am
Newsgroups: comp.databases.oracle.server
From: Cristian Cudizio <cristian.cudi...@yahoo.it>
Date: Mon, 10 Nov 2008 03:57:57 -0800 (PST)
Local: Mon, Nov 10 2008 6:57 am
Subject: Re: Why Oracle does not allow rollback of DDL statements?
On 10 Nov, 12:08, Thomas Kellerer <YQDHXVLMU...@spammotel.com> wrote:

I think that on Oracle Database, now, it would be technically ease to
make some DDL transactional, as create
and drop table, but it seems to me not so useful. What tecnically
seems to me a problem seems to be
something such as adding and removing columns. Especially when
removing columns Oracle has to go into each
block, it seems to me complicated and dangerous make it transactional.

Regards,
 Cristian


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Shakespeare  
View profile  
 More options Nov 10 2008, 6:58 am
Newsgroups: comp.databases.oracle.server
From: Shakespeare <what...@xs4all.nl>
Date: Mon, 10 Nov 2008 12:58:55 +0100
Local: Mon, Nov 10 2008 6:58 am
Subject: Re: Why Oracle does not allow rollback of DDL statements?
zigzag...@yahoo.com schreef:

> I have always been surprised why Oracle does a implicit commit when
> DDL statements (e.g create table …) are executed.  DDL statements
> simply write information (insert, delete and update) to data
> dictionary, so why DDL statement cannot be rolled back. Am I missing
> some thing?

> I was learning SQL Server few months ago and I noticed that SQL Server
> does allow rollback of DDL statements if I am not mistaken. It lloks
> like there is something in Oracle architecture which prevents rollback
> of DDL satements. Rollback of all staements should be allowed not just
> of DML statements.

> Appercaite your insight.

"DDL statements
simply write information (insert, delete and update) to data
dictionary, so why DDL statement cannot be rolled back. Am I missing
some thing?"

Yes you are! Suppose you drop a table (or delete a column). All data,
indices or whatever will be lost and not regained by merely rolling back
the dictionary tables....
So there must be a little bit more to it than just those tables.

I understand your need for rolling back DDL though, regarding the number
of typing errors in 11 lines of text..... <g>

Shakespeare


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Cristian Cudizio  
View profile  
 More options Nov 10 2008, 6:59 am
Newsgroups: comp.databases.oracle.server
From: Cristian Cudizio <cristian.cudi...@yahoo.it>
Date: Mon, 10 Nov 2008 03:59:05 -0800 (PST)
Local: Mon, Nov 10 2008 6:59 am
Subject: Re: Why Oracle does not allow rollback of DDL statements?
On 10 Nov, 10:02, Thomas Kellerer <YQDHXVLMU...@spammotel.com> wrote:

They allocate space on tablespaces (obviusly speaking about locally
managed tablespaces)

Regards,

 Cristian


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mladen Gogala  
View profile  
 More options Nov 10 2008, 7:05 am
Newsgroups: comp.databases.oracle.server
From: Mladen Gogala <gogala.mla...@gmail.com>
Date: 10 Nov 2008 13:05:11 +0100
Local: Mon, Nov 10 2008 7:05 am
Subject: Re: Why Oracle does not allow rollback of DDL statements?

On Mon, 10 Nov 2008 12:08:37 +0100, Thomas Kellerer wrote:

> Other RDBMS can handle that. rdb/VMS was able to handle things like that
> 15 years ago. Oracle should have a look at the source code as they now
> own that product :)

> Thomas

So, you are suggesting that Oracle RDBMS should learn from the RDBMS that
has failed and vanished from the market? Why would they do that? To look
more like SQL Server, a DB that Oracle has wiped the floor with? Hardly
seems like a goal worth pursuing.

--
Mladen Gogala
http://mgogala.freehostia.com


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Serge Rielau  
View profile  
 More options Nov 10 2008, 7:06 am
Newsgroups: comp.databases.oracle.server
From: Serge Rielau <srie...@ca.ibm.com>
Date: Mon, 10 Nov 2008 07:06:06 -0500
Local: Mon, Nov 10 2008 7:06 am
Subject: Re: Why Oracle does not allow rollback of DDL statements?
Noons wrote:
> Thomas Kellerer wrote,on my timestamp of 10/11/2008 8:02 PM:

>>  >> I was learning SQL Server few months ago and I noticed that SQL
>> Server
>>>> does allow rollback of DDL statements if I am not mistaken.

>>> It does not.
>> Yes it does (Note that I do not like SQL Server at all, but that is

> No, it does not. Don't try that rubbish with me, I've
> been breathing SS2K5 for the last 14 months. It does not.
> The front end you most likely use to access it does allow that.
> But that is not SQL Server.

That's the first I hear about that. Can you point to any docs explaining
the behavior you imply? I'm also told that SQL Server (like DB2) has
transactional DDL. Even TRUNCATE table is transactional.

>> There might not be a requirement, but it *is* very handy.
> No it is not. Try having a process that relies on dropping a
> table to succeed and another that relies on a create index on
> that table.  Which one is supposed to end first, when?

Oracle has to deal with that today!
No matter how you call it the CREATE statement still needs to be ATMIC.
And atomic implies that there is a statement level savepoint. If any of
the work against the db schema fails for any reason teh DDL statement
needs to be rolled back. And that CREATE INDEX statement must not be
permitted until the CREATE TABLE statement successfully COMPLETEs.
What if someone else tries to create a table with the same name? If
someone else drops the original table conflicting with the table I'm
trying to create.
Obviously the table also cannot be used by anyone until that commit happens.
Call it a lock or call it a latch, doesn't matter.
Oracle has to sort out timing today. The only difference is that it has
a statement level view on things rather than a transaction level view.

Cheers
Serge

--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mladen Gogala  
View profile  
 More options Nov 10 2008, 7:10 am
Newsgroups: comp.databases.oracle.server
From: Mladen Gogala <gogala.mla...@gmail.com>
Date: 10 Nov 2008 13:10:14 +0100
Local: Mon, Nov 10 2008 7:10 am
Subject: Re: Why Oracle does not allow rollback of DDL statements?

On Mon, 10 Nov 2008 06:52:42 -0500, Serge Rielau wrote:
> Other RDBMS which do have transactional DDL can very well monitor their
> system, even explain a query on DDL that isn't committed so long as the
> one explaining is the session that did the DDL, just like their own
> modifications to regular data. The schema catalog is just another set of
> tables after all.

Hmmm, I am not sure that any Oracle DBA worth his salt would like to see
that. As a DBA, I am frequently running explain plan on other sessions.
What would be gained by transactional DDL? Why is it so significant?

--
Mladen Gogala
http://mgogala.freehostia.com


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mladen Gogala  
View profile  
 More options Nov 10 2008, 7:11 am
Newsgroups: comp.databases.oracle.server
From: Mladen Gogala <gogala.mla...@gmail.com>
Date: 10 Nov 2008 13:11:47 +0100
Local: Mon, Nov 10 2008 7:11 am
Subject: Re: Why Oracle does not allow rollback of DDL statements?

On Mon, 10 Nov 2008 22:52:52 +1100, Noons wrote:
> Try that with SAN platinum disks and see how high it flies with the
> CFO...

Through the window? It depends on the height of the building where your
CFO is located.

--
Mladen Gogala
http://mgogala.freehostia.com


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Serge Rielau  
View profile  
 More options Nov 10 2008, 7:24 am
Newsgroups: comp.databases.oracle.server
From: Serge Rielau <srie...@ca.ibm.com>
Date: Mon, 10 Nov 2008 07:24:58 -0500
Local: Mon, Nov 10 2008 7:24 am
Subject: Re: Why Oracle does not allow rollback of DDL statements?
Mladen Gogala wrote:
> On Mon, 10 Nov 2008 06:52:42 -0500, Serge Rielau wrote:

>> Other RDBMS which do have transactional DDL can very well monitor their
>> system, even explain a query on DDL that isn't committed so long as the
>> one explaining is the session that did the DDL, just like their own
>> modifications to regular data. The schema catalog is just another set of
>> tables after all.

> Hmmm, I am not sure that any Oracle DBA worth his salt would like to see
> that. As a DBA, I am frequently running explain plan on other sessions.
> What would be gained by transactional DDL? Why is it so significant?

OK, let's walk through a simple example.
Assume a table with a column c1 and a view on that table.
CREATE TABLE T(c1 NUMBER);
CREATE OR REPLACE VIEW V AS SELECT c1 AS X FROM T;

You application is up and running with various users referring to V.
Now want to rename c1 to c2 (or change the type or whatever):

ALTER TABLE T RENAME COLUMN c1 TO C2;
The view is now invalidated (it depends on T.c1).
Immediately your other users will start receiving errors from the view.
It can't recompile. It's broken.

Of course you as the DBA knew that (and you did test your DDL change).
So:
CREATE OR REPLACE VIEW V AS SELECT C2 AS X FROM T;

All is fine now, your users will be happy.

With transactional DDL your users would never have seen the invalid view.
The ALTER TABLE and the CRATE OR REPLACE VIEW are a semantic unit. They
should be executed together.
Note that there very well may have been an impact to the users already
depending on the actions taken on the table. All that happens here is
that a bit more is packed onto the same atomic unit to preserve
consistency of the schema.

If I understand recent posts and comments Mark made to me at IOD
correctly "editions" in 11gR2 are meant to solve this problem (and
presumably others).

Hope that brings the discussion down to a more technical level again.

Cheers
Serge
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Thomas Kellerer  
View profile  
 More options Nov 10 2008, 7:42 am
Newsgroups: comp.databases.oracle.server
From: Thomas Kellerer <YQDHXVLMU...@spammotel.com>
Date: Mon, 10 Nov 2008 13:42:31 +0100
Local: Mon, Nov 10 2008 7:42 am
Subject: Re: Why Oracle does not allow rollback of DDL statements?
Mladen Gogala, 10.11.2008 13:05:
>> Other RDBMS can handle that. rdb/VMS was able to handle things like that
>> 15 years ago. Oracle should have a look at the source code as they now
>> own that product :)

>> Thomas

> So, you are suggesting that Oracle RDBMS should learn from the RDBMS that
> has failed and vanished from the market?

Well Oracle _made_ it vanish from the market to begin with.

Only because something is old, doesn't mean that it didn't have good features. I think rdb had data partitioning built in (e.g by index) long before Oracle was even thinking about it.

> Why would they do that? To look more like SQL Server?

That has nothing to do with making it look like SQL Server. I'm definitely not a fan of SQL Server (in fact I hate it) but I like transactional DDL and SQL Server isn't the only one to have this.
Postgres and DB2 have that as well.

Thomas


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Messages 1 - 25 of 71   Newer >
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google