数据库表不会删除(或显示其输入的数据)

发布于 2024-08-05 11:06:36 字数 182 浏览 5 评论 0原文

如果我将 sql 查询语句应用于此表“select * from context.tablename”,我所看到的只是“正在执行查询..”消息,没有其他情况发生。 我也无法截断或删除该表。它甚至阻止我删除 vhole 数据库。

这个问题有可能是由向该表插入数据引起的吗???

我正在使用 MS Sql 服务器 2005

if i apply a sql query statement to this table "select * from context.tablename", all i see is the "Executing query.." message and nothing else hapens.
I also can not truncate or drop this table. It prevents me from even dropping vhole database.

Is it possible, that this problem is caused by inserted data into this table???

I'm using MS Sql server 2005

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

沧笙踏歌 2024-08-12 11:06:36

您是否尝试过重新启动 SQL Server 服务?

Have you tried restarting the SQL Server service?

南城旧梦 2024-08-12 11:06:36

尝试删除表时是否有任何打开的数据库连接?您是否尝试过在删除之前关闭所有连接?

Are there any open connections to the database while trying to drop the table? Have you tried closing all connections before dropping it?

逆夏时光 2024-08-12 11:06:36

使用 SSMS 分离数据库。手动删除 MDF 文件。

Use SSMS to detach the database. Delete the MDF files manually.

夕嗳→ 2024-08-12 11:06:36

对于只包含 3 条记录的表,我也遇到了同样的问题。我在 MS SQL Server Mgmt Studio 中打开了几个查询选项卡,每个选项卡都以某种方式引用了目标表,但没有一个选项卡执行任何查询。

从此表中进行选择只会无限执行,就像删除表一样。我可以运行 sp_spaceused 并看到它只使用了 86k 的空间,所以它并不大。

我断开了所有选项卡的连接,包括用于从表中选择和删除表的选项卡。然后我重新连接该窗口并运行“从我的表中选择*”,它起作用了。然后我也能够成功删除该表。

似乎有一个开放的连接以某种方式将表劫持并阻止我的“选择”和“删除”工作。

I had this same exact problem with a table that only contained 3 records. I had several query tabs open in MS SQL Server Mgmt Studio that each referenced the target table in some way, but none of which had any queries executing.

Selecting from this table would just execute endlessly as would Dropping the table. I could run sp_spaceused and see it was only using 86k of space so it wasn't huge.

I disconnected all of the tabs including the one I was using to Select from and to Drop the table. I then reconnected just that window and ran 'Select * from' my table and it worked. I was also able to then Drop the table successfully.

It seems there was an open connection holding the table hostage somehow and preventing my Select and Drop from working.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文