Schema lock when create partition policy

Posted by Valeriy Bashkatov on 17-Jul-2014 03:04

Hello,

Maybe I am something not understand, but...

I tried to create a Partition policy at a time when users are working with the database.

I got the following message: "Failed to create partition policy. The service reguest was stopped. This could be because a schema lock exists or could not be aquired."

After that I killed all users :-) 

Then I opened a new session where I began to read a completely different table, not the one for which I was trying to create a partition.

repeat:
   for each branch no-lock.
       displ branch. pause 0.
   end.
end.

At the same time I made ​​an attempt to re-create the Partition policy and I received a similar message.

Thus, it turns out that in a production environment I can not create a Partition policy as it is impossible to disconnect users out there - many of our clients work in database in 24x7 mode and in some cases, the database has several thousand users.

Because of this, the implementation of Table Partitioning at large clients I think it will be impossible.

Can you comment on that?

Regars,
Valeriy

Posted by Richard Banville on 17-Jul-2014 07:46

The initial assignment of an existing  non-partitioned table to a partitioned table currently does require an exclusive schema lock.  Once a table is identified as a partitioned table, defining and adding additional partitions to that table does not require exclusive access.

All Replies

Posted by Richard Banville on 17-Jul-2014 07:46

The initial assignment of an existing  non-partitioned table to a partitioned table currently does require an exclusive schema lock.  Once a table is identified as a partitioned table, defining and adding additional partitions to that table does not require exclusive access.

Posted by Valeriy Bashkatov on 17-Jul-2014 07:58

This means that for initializing the table for partitioning in a production environment I am forced to disconnect all users. Unfortunately, in most cases it will be difficult.

Posted by Richard Banville on 17-Jul-2014 08:04

Yes, unfortunately that is currently the case.

Posted by Valeriy Bashkatov on 17-Jul-2014 08:07

Do you plan to change anything here in the future?

Posted by Richard Banville on 17-Jul-2014 08:34

Currently under investigation and will hopefully be part of the "db user notify" project or a follow on to that.  Neither has been scheduled to a release as of yet.

This thread is closed