I have a sequence of 3 operations, and its repeated many times by an
aplication (timer loop)
1) Open a transaction
2) Execute 1 (ONE) insert in a "simple" table. This table has only an
auto-increment identificator and some fields numbers and chars.
3) Comitt the transaction
This proccess is executed normaly during many days, but many times this
command returns "0 rows affected" to the application, but with no exception,
just returns "0 rows affected".
The version is 2000 with all SP.
Thanks
RaphaelPlease post insert statement and create table. Does this table have a
trigger (instead off or something like that)? How do you insert? Through
stored procedure or not?
MC
"Raphael Rodrigues" <rrodrigues@.cmsolucoes.com.br> wrote in message
news:uD$ygZq7FHA.736@.TK2MSFTNGP09.phx.gbl...
>I have a sequence of 3 operations, and its repeated many times by an
>aplication (timer loop)
> 1) Open a transaction
> 2) Execute 1 (ONE) insert in a "simple" table. This table has only an
> auto-increment identificator and some fields numbers and chars.
> 3) Comitt the transaction
> This proccess is executed normaly during many days, but many times this
> command returns "0 rows affected" to the application, but with no
> exception, just returns "0 rows affected".
> The version is 2000 with all SP.
> Thanks
> Raphael
>
>|||1) Create TABLE COMMAND
CREATE TABLE [cm].[BILHETE] (
[IDBILHETE] [numeric](18, 0) IDENTITY (1, 1) NOT NULL ,
[BILHETE] [varchar] (500) COLLATE Latin1_General_CI_AS NULL ,
[IDHOTEL] [numeric](18, 0) NULL ,
[DATACAPTURA] [datetime] NULL ) ON [PRIMARY]
2) Insert COMMAND executed by the application. Only an example, the error is
intermittent and random.
INSERT INTO BILHETE (BILHETE, IDHOTEL, DATACAPTURA) VALUES
('1450290000001010022161313', 1, getDate());
3) I've already tried with a Stored Procedure, but accurs the same problem.
After many times the SP returns "0 (zero) rows affected". Do not insert
nothing and no exceptions are generated.
CREATE PROCEDURE CM.SP_BILHETE(@.Bilhete AS Varchar(220),@.IdHotel AS
Numeric ) AS
INSERT INTO BILHETE (BILHETE,IDHOTEL,DATACAPTURA) VALUES
(@.Bilhete,@.IdHotel,getdate());
3) The table has the follow DELETE TRIGGER, that saves the deleteds records
in another table _BILHETE with the same structure:
CREATE TRIGGER tdBilhete
ON BILHETE
FOR DELETE AS
DECLARE @.STRBILHETE VARCHAR(120)
DECLARE @.IDHOTEL NUMERIC
SELECT @.STRBILHETE = D.BILHETE FROM DELETED D
SELECT @.IDHOTEL = D.IDHOTEL FROM DELETED D
INSERT INTO _BILHETE (BILHETE,IDHOTEL,DATACAPTURA) VALUES
(@.STRBILHETE,@.IDHOTEL,getdate());
"MC" <marko_culo#@.#yahoo#.#com#> escreveu na mensagem
news:OuB80cq7FHA.444@.TK2MSFTNGP11.phx.gbl...
> Please post insert statement and create table. Does this table have a
> trigger (instead off or something like that)? How do you insert? Through
> stored procedure or not?
> MC
>
> "Raphael Rodrigues" <rrodrigues@.cmsolucoes.com.br> wrote in message
> news:uD$ygZq7FHA.736@.TK2MSFTNGP09.phx.gbl...
>>I have a sequence of 3 operations, and its repeated many times by an
>>aplication (timer loop)
>> 1) Open a transaction
>> 2) Execute 1 (ONE) insert in a "simple" table. This table has only an
>> auto-increment identificator and some fields numbers and chars.
>> 3) Comitt the transaction
>> This proccess is executed normaly during many days, but many times this
>> command returns "0 rows affected" to the application, but with no
>> exception, just returns "0 rows affected".
>> The version is 2000 with all SP.
>> Thanks
>> Raphael
>>
>
Wednesday, March 28, 2012
Intermittent Error! Help!
Labels:
aplication,
database,
error,
execute,
insert,
intermittent,
loop,
microsoft,
mysql,
operations,
oracle,
repeated,
sequence,
server,
sql,
timer,
transaction
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment