找不到Sybase ASE临时表

时间:2013-09-30 10:26:03

标签: sql database sybase sybase-ase

我有一个名为table1的临时表,如下所示:

create table tempdb..table1 (id int)

该表不是由tempdb数据库的所有者创建的。

当我之前尝试使用此查询访问该表时,在存储过程中(仅用于测试):

select top 10 * from tempdb..table1

我收到了这个错误:

Msg 208, Level 16, State 1:
 Server 'SERVER', Procedure 'storedProcedure', Line 30:
 tempdb..table1 not found. Specify owner.objectname or use sp_help to check whether the object
 exists (sp_help may produce lots of output).

然而,大约一个小时后,相同的存储过程运行没有任何问题。

在那个小时内没有丢弃并再次创建表,我找不到任何这种奇怪行为的原因。我可以通过应用某种命名攻击来解决这个问题,但是我不想将hack插入到一个非常敏感的流程中,这意味着许多用户可以删除并创建表。

我在问是否有人可以解释这种行为,所以我可以从现在开始避免这种行为。

0 个答案:

没有答案