on 02-10-2009 8:04 PM
Hi,
the installation is a MaxDB 7.6.03.15 Linux 64bit
dbmcli version command outputs:
version,os,dbroot,logon,code,swap
"7.6.03","UNIX","/opt/sdb/7603",False,ASCII,2
if i drop the follow view declared as:
CREATE VIEW viewMovProduto2 AS
SELECT DECODE(nf.tipo,'E',nf.my_destinatario,'S',nf.my_emitente) my_empresa,
DECODE(nf.tipo,'E',nf.my_emitente,'S',nf.my_destinatario) my_cliForn,
nf.data_es data,
nf.tipo tipo,
nf.numero numero,
tpmov.gera_estoque gera_estoque,
itnf.*
FROM NotaFiscal nf, ItemNotaFiscal itnf, TipoMovimento tpmov
WHERE nf.my_tipo_movimento = tpmov.oid AND
itnf.my_nota_fiscal = nf.oid
and after the drop i try to run:
ALTER TABLE ITEMNOTA ADD MY_EMPRESA VARCHAR(8)
i get the error message:
[-9404]: System error: AK System error: VAK15 3
this error occurs too if try for example:
ALTER TABLE ITEMNOTA ADD MY_TEST_COLUMN VARCHAR(8)
if i add the column MY_TEST_COLUMN before to drop the view viewMovProduto2, that add works, if i try to add the column MY_EMPRESA i get the message:
[-7057]: View definition contradicts new table definition:VIEWMOVPRODUTO2
then the problem just occurs if i remove the View, anyone know what happens?
thanks
Clóvis
Hi,
the vtrace was nice, but did not show the wanted commands. May I assume that you did your drop view ... and afterwards started the dbm to handle the trace? This is not the best idea. Start dbm (which does several things with the kernel which may cause overwriting the trace-area), then do those things you want to trace, then use dbm.
The other option is to increase the trace-area (increase TRACE_PAGES_US), restart the system and do things as you did before.
But in your case no further try of vtrace is needed for the moment. Internally we talked about your topic and think, that in online-mode the statement
check catalog with update
should be done. We have to assume that in your catalog a reference to a table is stored. But this table does not exist any more. In those cases where we had the chance to check in detail we had to find out, that some versions of MaxDB did not throw away all references they should have done (in some cases only, of course). With normal handling of MaxDB this does not hurt. But if you want to throw away that object where the wrong reference is stored in, then such error like yours occurs.
==> please execute that statement and re-try your sequence.
Another question:
You are able to reproduce the problem starting with a really new created database?
Would you mind changing to a newer version (>= 7.6.05) and try again?
If this problem remains (create new database, do some DDL causing this problem) we would be VERY interested in this sequence of commands. But only, if it can be found in 7.6.05 or higher version.
Regards,
Elke
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hallo,
mhm, there are several topics concerned.
For the error -9404 VAK15, 3 I do not have an answer.
Therefore, you should follow the idea of Lars.
For the adding-problem: here my two cents:
If we assume, that ItemNotaFiscal (used in your join-view) is a view on top
of the table ITEMNOTA, you want to alter, then the adding of My_test_column
will cause a re-creation (internally done) of the joinview causing the number
of output-columns in this join-view to increase.
If you want to add MY_EMPRESA, the same procedure starts, the column is added
into the table, then (if my assumption is correct) added to the view ItemNotaFiscal
and then added (because of the itnf.*) into this join-view.
BUT !! this joinview now would contain TWO columns of the same name.
Your first column has this explicit naming and your last column out of this itnf.*
has it, too. And no table, no view is allowed to contain two or more columns with the same
name. Therefore the internally done re-creation of the join-view fails and causes the alter
table add my_empresa to fail.
Ok, the error-code is not the best for explaining this context, but I am quite sure, that
an alter table add my_empresa2 (for example) would do as adding my_test_column did.
Elke
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Elke,
You note that the errors occurs only after i DROP the View ViewMovProdutos2, when i try to add myEmpresa without dropping the View, i get the right message from MaxDB, the big problem occurs if i just DROP the View ViewMovProdutos2, maybe the DROP dont clean right the catalog?
regards
Clóvis
HI Clovis,
I tried that on a 7.6.04 Build 11 but I could not reproduce this behavior.
Please perform a database trace of this issue and provide a download link to the generated protocol file.
See for details on this.
Have you tried if this occurs with the current 7.6.05 patch as well?
regards,
Lars
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, Lars,
i generated the trace only for the session that i execute the ALTER TABLE command, its at http://www.supridatta.com.br/downloads/192.168.101.5-SPDT-KNLTRCPRT.sdblog
no i dont tried because i leave my test system, like the production system, but if you tell me that is this the solution i do, but i dont think that this is because, i have other instance with same tables, but with different data in those tables, and doing that in this another instance works, just this instance dont works.
note: that the errors occurs only after i DROP the View ViewMovProdutos2
regards
Clóvis
User | Count |
---|---|
78 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.