2013-07-27 2 views
0

Я получаю SybaseErrorProcess всякий раз, когда я запускаю следующую процедуру:Процедура завершается с ошибкой «SybaseErrorProcess»

журнала
CREATE PROC stdCont(@Cpty_Id INTEGER, @TradeDate DATETIME) AS 
BEGIN 
    CREATE TABLE Ktest..FwdCont 
    (Txn_No NUMERIC(10) IDENTITY, Deals_Id INTEGER NULL, Amount FLOAT NULL,OptionDate DATETIME NULL) 

    insert into Ktest..FwdCont (Deals_Id ,Amount ) (select Deals_Ids,amt from Ktest..trans) 
    Update Ktest..FwdCont Set OptionDate = @TradeDate Where Deals_Id = @Cpty_Id 

    select bk.tnxno,bk.bk.dealid ,fd.OptionDate ,fd.Amount from Ktest..bakwnd bk ,Ktest..FwdCont fd where bk.dealid=fd.Deals_Id and bk.op_date=fd.OptionDate 

    DROP TABLE Ktest..FwdCont 
end 

Ошибка гласит

number(2714) severity(16) state(1) line(9) 
Connection Id:920 [[email protected]] 
Server PLUS_ser 
Procedure stdCont 
Message string There is already an object named 'FwdCont' in the database. 


*** Error(Fri 26 Jul 2013 - 18:21:54): SybaseErrorProcess 

BEGIN SQL-REQUEST: 
Ktest..stdCont 71495, "07/25/2013" 
END SQL-REQUEST 


*** Error(Fri 26 Jul 2013 - 18:21:54): 
Cannot perform your action: 
Server Message: 
     number(12336) severity(16) state(1) line(40) 
     Connection Id:920 [[email protected]] 
Server PLUS_ser 
Procedure stdCont 
Message string Definition time object 'database 'Ktest' (5), object 'FwdCont' (1974935499)' found at run time as an attempt to drop the table had failed i 
n a previous query. Please drop the above mentioned table using the DROP TABLE c 
ommand. 

*** Error(Fri 26 Jul 2013 - 18:21:54): SybaseErrorProcess 

BEGIN SQL-REQUEST: 
Ktest..stdCont 71495, "07/25/2013" 
END SQL-REQUEST 

*** Error(Fri 26 Jul 2013 - 18:21:54): 
Cannot perform your action: 
Server Message: 
     number(12336) severity(16) state(1) line(40) 
     Connection Id:920 [[email protected]] 
Server PLUS_ser 
Procedure stdCont 
Message string Definition time object 'database 'Ktest' (5), object 'FwdCont' (1974935499)' found at run time as an attempt to drop the table had failed i 
n a previous query. Please drop the above mentioned table using the DROP TABLE c 
ommand. 


*** Error(Fri 26 Jul 2013 - 18:21:54): SybaseErrorProcess 

BEGIN SQL-REQUEST: 
Ktest..stdCont 71495, "07/25/2013" 
END SQL-REQUEST 

*** Error(Fri 26 Jul 2013 - 18:21:54): 
Cannot perform your action: 
Server Message: 
     number(12336) severity(16) state(1) line(40) 
     Connection Id:920 [[email protected]] 
Server PLUS_ser 
Procedure stdCont 
Message string Definition time object 'database 'Ktest' (5), object 'FwdCont' (1974935499)' found at run time as an attempt to drop the table had failed i 
n a previous query. Please drop the above mentioned table using the DROP TABLE c 
ommand. 

*** Error(Fri 26 Jul 2013 - 18:21:54): SybaseErrorProcess 

BEGIN SQL-REQUEST: 
Ktest..stdCont 71495, "07/25/2013" 
END SQL-REQUEST 


*** Error(Fri 26 Jul 2013 - 18:21:54): 
Cannot perform your action: 
Server Message: 
     number(12336) severity(16) state(1) line(40) 
     Connection Id:920 [[email protected]] 
Server PLUS_ser 
Procedure stdCont 
Message string Definition time object 'database 'Ktest' (5), object 'FwdCont' (1974935499)' found at run time as an attempt to drop the table had failed i 
n a previous query. Please drop the above mentioned table using the DROP TABLE c 
ommand. 

*** Error(Fri 26 Jul 2013 - 18:21:54): 
Cannot perform your action: 
Server Message: 
     number(11060) severity(16) state(1) line(40) 
     Connection Id:920 [[email protected]] 
Server PLUS_ser 
Procedure stdCont 
Message string This statement has exceeded the maximum number of recompilations 
(10). This indicates an internal error. Please note the error prior to this one 
and contact Sybase Technical Support. 

Может быть, это тупиковое?

ответ

0

Сообщение ясно!

У вас уже есть таблица FwdCont в вашей базе данных, возможно, из-за старого выполнения вашей хранимой процедуры.

+0

Thand для ответа, но конец процедуры i drop Таблица FwdCont. то зачем показывать ошибку –

+0

Может быть, последний прогон не был успешно выполнен, лучше добавить проверку, если таблица существует до ее создания. –

+0

Как избежать этой проблемы .. Если какое-либо решение pl. Сообщите мне –

Смежные вопросы