[firebird-support] Re: Unable to create unique constraint

2014-03-22 Thread Aage Johansen
André wrote

...
The table is a completely new creation, and nobody else could have
been using it besides me, although the database itself is the original
production database used by some 50 concurrent users.

I disconnected and reconnected, even did a backup (to visit each
record) and explicit sweep and made sure noone else was connected
to the database late in the evening. No success.
...
 

A couple of times I've seen problems vanish just 
by stopping/starting the Firebird service.  Maybe 
just closing all connection or, at worst, 
restarting the service.  Those problems occured 
after some metadata change (with connected 
users).  The latest one was desctibed in a 
message to this list on January 14. (Subject: 
Firebird error: partner index description not found).
Maybe you did some tinkering with the metadata?

-- 
Aage J.



[firebird-support] Online DDL

2014-03-22 Thread Aldo Caruso
Hello,

   I wonder if is it sure to perform changes to the database metadata 
while there are still users connected.
   Up to now, I allways shut the database down, perform DDL changes, and 
put it back on line.
   Is it actually necessary to do that ?

Thanks for any help.
Aldo Caruso


Re: [firebird-support] Online DDL

2014-03-22 Thread Carlos H. Cantu
It depends on what kind of changes you plan to do. Some of them still
needs exclusive access, otherwise you may end up with an object is in
use error.

Carlos
Firebird Performance in Detail - http://videos.firebirddevelopersday.com
www.firebirdnews.org - www.FireBase.com.br

AC Hello,

ACI wonder if is it sure to perform changes to the database metadata 
AC while there are still users connected.
ACUp to now, I allways shut the database down, perform DDL changes, and
AC put it back on line.
ACIs it actually necessary to do that ?

AC Thanks for any help.
AC Aldo Caruso


AC 

AC ++

AC Visit http://www.firebirdsql.org and click the Resources item
AC on the main (top) menu.  Try Knowledgebase and FAQ links !

AC Also search the knowledgebases at http://www.ibphoenix.com 

AC ++
AC Yahoo Groups Links





Re: [firebird-support] Online DDL

2014-03-22 Thread Jesus Garcia

 El 23/03/2014, a las 00:44, Carlos H. Cantu lis...@warmboot.com.br 
 escribió:
 
 It depends on what kind of changes you plan to do. Some of them still
 needs exclusive access, otherwise you may end up with an object is in
 use error.
 
 
I think Aldo asks If it is sure, because there are comments, some recent, 
that changing metadata while users connected can cause database corruption.

Of course, If object in use raises, is not a problem, only if the database stay 
in the prior state after the error, but is a problem if trying to drop a table 
can cause database corruption.

Jesus Garcia
 


Re: [firebird-support] Online DDL

2014-03-22 Thread Aldo Caruso

Carlos,

Frequently I modify stored procedures and triggers.

If some user were connected before I started my transaction (the 
one which changes the stored procedure) he will still be using the 
unmodified version of the stored procedure. On the other hand, users who 
connects after I commit my transaction will be using the modified version.


In that case is there a risk that two different versions of the 
same stored procedure coexist (in different transactions) or, as you 
say, the object is in use error prevents this conflicts and only 
allows me to alter the stored procedure when no user is excecuting it ?


Thanks,
Aldo

El 22/03/14 20:44, Carlos H. Cantu escribió:


It depends on what kind of changes you plan to do. Some of them still
needs exclusive access, otherwise you may end up with an object is in
use error.

Carlos
Firebird Performance in Detail - http://videos.firebirddevelopersday.com
www.firebirdnews.org - www.FireBase.com.br

AC Hello,

AC I wonder if is it sure to perform changes to the database metadata
AC while there are still users connected.
AC Up to now, I allways shut the database down, perform DDL changes, and
AC put it back on line.
AC Is it actually necessary to do that ?

AC Thanks for any help.
AC Aldo Caruso

AC 

AC ++

AC Visit http://www.firebirdsql.org and click the Resources item
AC on the main (top) menu. Try Knowledgebase and FAQ links !

AC Also search the knowledgebases at http://www.ibphoenix.com

AC ++
AC Yahoo Groups Links






[firebird-support] Re: Online DDL

2014-03-22 Thread Dmitry Yemanov
23.03.2014 04:17, Aldo Caruso wrote:

 Frequently I modify stored procedures and triggers.

 If some user were connected before I started my transaction (the
 one which changes the stored procedure) he will still be using the
 unmodified version of the stored procedure. On the other hand, users who
 connects after I commit my transaction will be using the modified version.

True.

 In that case is there a risk that two different versions of the
 same stored procedure coexist (in different transactions)

Surely this may be undesired, but this risk is a documented behavior, 
AFAIK.


Dmitry




Re: [firebird-support] Online DDL

2014-03-22 Thread Aldo Caruso
My concern was about logical or business rules issues, not about 
database corruption, which I didn't know could happen.


Why does corruption happen mixing DDL and DML in the same transaction ?

Aldo

El 22/03/14 20:55, Carlos H. Cantu escribió:


No, corruption can happen if you mix DDL and DML in the same 
transaction. If you commit between them, you are safe.


Carlos
Firebird Performance in Detail - http://videos.firebirddevelopersday.com
www.firebirdnews.org http://www.firebirdnews.org- 
www.FireBase.com.br http://www.FireBase.com.br







El 23/03/2014, a las 00:44, Carlos H. Cantu lis...@warmboot.com.br 
mailto:lis...@warmboot.com.br escribió:



It depends on what kind of changes you plan to do. Some of them still
needs exclusive access, otherwise you may end up with an object is in
use error.

I think Aldo asks If it is sure, because there are comments, some 
recent, that changing metadata while users connected can cause 
database corruption.


Of course, If object in use raises, is not a problem, only if the 
database stay in the prior state after the error, but is a problem if 
trying to drop a table can cause database corruption.


Jesus Garcia







Re: [firebird-support] Re: Online DDL

2014-03-22 Thread Aldo Caruso
Does this risk implies a database corruption or the risk only 
implies the undesired behaviour, from the logical point of view, of 
having two versions of the same stored procedure in two different 
transactions ( situation that ends when the older transaction commits or 
rolls back ) ?


Aldo Caruso

El 22/03/14 22:18, Dmitry Yemanov escribió:


23.03.2014 04:17, Aldo Caruso wrote:

 Frequently I modify stored procedures and triggers.

 If some user were connected before I started my transaction (the
 one which changes the stored procedure) he will still be using the
 unmodified version of the stored procedure. On the other hand, users who
 connects after I commit my transaction will be using the modified 
version.


True.

 In that case is there a risk that two different versions of the
 same stored procedure coexist (in different transactions)

Surely this may be undesired, but this risk is a documented behavior,
AFAIK.

Dmitry