Azure Blob 存储运行一段时间后会触发丢失权限吗?

发布于 01-14 06:40 字数 228 浏览 4 评论 0原文

我运行了一个天蓝色函数大约一个半小时,然后当它尝试删除表时开始收到这些错误:

无法删除表“TABLE_NAME”,因为它不存在或您没有权限。

我检查了这些表,它们存在,但我的函数似乎以某种方式失去了权限,或者发生了我不知道的其他事情。有人对如何解决这个问题有任何建议吗?

编辑:我注意到这些错误与我的数据库达到 100% CPU 使用率同时发生。

I ran an azure function for about an hour and a half and then started receiving these errors when it tried to drop tables:

Cannot drop the table 'TABLE_NAME', because it does not exist or you do not have permission.

I've checked the tables, they exist, but my function has somehow lost its permissions it seems, or something else is happening that I'm unaware of. Anyone have any suggestions as to how to fix this?

EDIT: I've noticed the errors coincide with my DB reaching 100% CPU utilization.

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

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

发布评论

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

评论(1

猫弦2025-01-21 06:40:21

我注意到这些错误与我的数据库达到 100% CPU 使用率同时发生。

尝试扩展数据库或尝试解决高 cpu 使用率问题

您必须检查以下条件才能克服该错误

无法删除表“TABLE_NAME”,因为它不存在或您没有权限。

我希望您以正确的方式删除表并创建表(如果不存在)。通过使用以下代码

.to_sql(_name_, _con_, _schema=None_, _if_exists='replace'_, _index=True_, _index_label=None_, _chunksize=None_, _dtype=None_, _method=None_)

if_exists='replace' - 删除表格在插入新值之前。

如果您使用上述相同的方法,则必须检查其他可能性。

  • 使用截断删除.to_sql()之前的表
engine = sqlalchemy.create_engine('mssql+pyodbc://<Your SQL SERVER>/<DB NAMEE>')
conn = engine.connect()
conn.execute("TRUNCATE TABLE <TABLE NAME>")
.to_sql(_name_, _con_, _schema=None_, _if_exists='replace'_, _index=True_, _index_label=None_, _chunksize=None_, _dtype=None_, _method=None_)
  • 确保用户拥有访问/删除的所有权限> 表。
  • 在我们实际运行 .to_sql() 之前检查表是否已已经 Drop

I've noticed the errors coincide with my DB reaching 100% CPU utilization.

Try to scale up the Database or try to Troubleshoot high cpu usage issues

You have to check the below conditions to overcome the Error

Cannot drop the table 'TABLE_NAME', because it does not exist or you do not have permission.

I hope you are doing the right way to drop a table and create the table if it does not exist. By using the below code

.to_sql(_name_, _con_, _schema=None_, _if_exists='replace'_, _index=True_, _index_label=None_, _chunksize=None_, _dtype=None_, _method=None_)

if_exists='replace' - Drop the table before inserting new values.

If you are using the same above you have to check the other possibilities.

  • Use Truncate to drop the table before the .to_sql()
engine = sqlalchemy.create_engine('mssql+pyodbc://<Your SQL SERVER>/<DB NAMEE>')
conn = engine.connect()
conn.execute("TRUNCATE TABLE <TABLE NAME>")
.to_sql(_name_, _con_, _schema=None_, _if_exists='replace'_, _index=True_, _index_label=None_, _chunksize=None_, _dtype=None_, _method=None_)
  • Make sure The User has all permissions to Access/Drop table.
  • Check if the Table is already Drop before we actually run the .to_sql()
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文