Subject | RE: [firebird-support] [firebird-support Problematic Upgrade Script - any solution |
---|---|
Author | Martin Dew |
Post date | 2006-07-04T16:56:36Z |
Franky, thanks for the suggestion, but we use SQL Explorer to run most
of these statements, and we actually commit after each one.
I have since found reference to the ALTER command which seems like it
might work, if I simply replace all of the below statement to;
alter table patient_triage_cons
alter ACTION_TYPE TYPE VARCHAR(10),
alter ACTION_NOTES TYPE VARCHAR(8192)
I think this will work.
Could any other guru's confirm that by using the above statement my
field sizes in the database will increase to the amounts specified,
without affecting the underlying data (both fields are currently smaller
in size than their new specification).
T.I.A
Martin
________________________________
From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] On Behalf Of Franky Brandt
Sent: 04 July 2006 17:51
To: firebird-support@yahoogroups.com
Subject: RE: [firebird-support] [firebird-support Problematic Upgrade
Script - any solution
Just an idea Martin but what if you add Commit; in between the
statements in
the script?
Does the table have before or afterupdate triggers?
Franky
From: firebird-support@yahoogroups.com
<mailto:firebird-support%40yahoogroups.com>
[mailto:firebird-support@yahoogroups.com
<mailto:firebird-support%40yahoogroups.com> ] On Behalf Of Martin Dew
Sent: dinsdag 4 juli 2006 18:14
To: firebird-support@yahoogroups.com
<mailto:firebird-support%40yahoogroups.com>
Subject: [firebird-support] [firebird-support Problematic Upgrade Script
-
any solution
Hi,
I needed to add more space into an already present varchar field.
alter table patient_triage_cons
add tmpACTIONTYPE VARCHAR(10),
add tmpACTIONNOTES VARCHAR(8192)
---
update patient_triage_cons set tmpACTIONTYPE = ACTION_TYPE,
tmpACTIONNOTES = ACTION_NOTES
---
alter table patient_triage_cons
drop ACTION_TYPE,
drop ACTION_NOTES
---
alter table patient_triage_cons
add ACTION_TYPE VARCHAR(10),
add ACTION_NOTES VARCHAR(8192)
---
update patient_triage_cons set ACTION_TYPE = tmpACTIONTYPE, ACTION_NOTES
= tmpACTIONNOTES
The above red line (or last line of script if this message does not show
in colour ) is where it fails. The memory usage just keeps going up by
small chunks continuously, but the cpu is hardly being touched. We have
cycled the machine, done a backup and restore but the problem still
occurs. The same script has been run at numerous other sites without a
problem. What I do not understand is that it really is just a
replication of the second statement in the script, and that always works
at this site.
Is there a way in Firebird 1.5.2 to alter the field size without doing
all the copying of data into temporary fields ?
T.I.A
Martin
[Non-text portions of this message have been removed]
[Non-text portions of this message have been removed]
[Non-text portions of this message have been removed]
of these statements, and we actually commit after each one.
I have since found reference to the ALTER command which seems like it
might work, if I simply replace all of the below statement to;
alter table patient_triage_cons
alter ACTION_TYPE TYPE VARCHAR(10),
alter ACTION_NOTES TYPE VARCHAR(8192)
I think this will work.
Could any other guru's confirm that by using the above statement my
field sizes in the database will increase to the amounts specified,
without affecting the underlying data (both fields are currently smaller
in size than their new specification).
T.I.A
Martin
________________________________
From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] On Behalf Of Franky Brandt
Sent: 04 July 2006 17:51
To: firebird-support@yahoogroups.com
Subject: RE: [firebird-support] [firebird-support Problematic Upgrade
Script - any solution
Just an idea Martin but what if you add Commit; in between the
statements in
the script?
Does the table have before or afterupdate triggers?
Franky
From: firebird-support@yahoogroups.com
<mailto:firebird-support%40yahoogroups.com>
[mailto:firebird-support@yahoogroups.com
<mailto:firebird-support%40yahoogroups.com> ] On Behalf Of Martin Dew
Sent: dinsdag 4 juli 2006 18:14
To: firebird-support@yahoogroups.com
<mailto:firebird-support%40yahoogroups.com>
Subject: [firebird-support] [firebird-support Problematic Upgrade Script
-
any solution
Hi,
I needed to add more space into an already present varchar field.
alter table patient_triage_cons
add tmpACTIONTYPE VARCHAR(10),
add tmpACTIONNOTES VARCHAR(8192)
---
update patient_triage_cons set tmpACTIONTYPE = ACTION_TYPE,
tmpACTIONNOTES = ACTION_NOTES
---
alter table patient_triage_cons
drop ACTION_TYPE,
drop ACTION_NOTES
---
alter table patient_triage_cons
add ACTION_TYPE VARCHAR(10),
add ACTION_NOTES VARCHAR(8192)
---
update patient_triage_cons set ACTION_TYPE = tmpACTIONTYPE, ACTION_NOTES
= tmpACTIONNOTES
The above red line (or last line of script if this message does not show
in colour ) is where it fails. The memory usage just keeps going up by
small chunks continuously, but the cpu is hardly being touched. We have
cycled the machine, done a backup and restore but the problem still
occurs. The same script has been run at numerous other sites without a
problem. What I do not understand is that it really is just a
replication of the second statement in the script, and that always works
at this site.
Is there a way in Firebird 1.5.2 to alter the field size without doing
all the copying of data into temporary fields ?
T.I.A
Martin
[Non-text portions of this message have been removed]
[Non-text portions of this message have been removed]
[Non-text portions of this message have been removed]