删除模式的内容,而无需删除模式

发布于 2025-02-10 10:13:25 字数 278 浏览 1 评论 0原文

在db2中,有此admin_drop_schema过程,用于删除特定的模式和其中包含的所有对象。

虽然它将所有内容都放在模式中,但不幸的是,它也丢弃了模式。

是否可以替代admin_drop_schema过程,该过程只会删除模式的内容,而不是架构本身?

我问的原因是我们正在测试特定模式的脚本,该脚本将创建表,视图和触发器。我需要能够快速放下模式的内容,但不能删除模式本身,因为我没有特权掉落和重新创建模式,但是我可以在模式中执行任何操作。

In DB2, there is this ADMIN_DROP_SCHEMA procedure which is used to drop a specific schema and all objects contained in it.

While it drops everything within the schema, it also unfortunately drops the schema.

Is there an alternative to ADMIN_DROP_SCHEMA procedure which will only drop the contents of the schema but not the schema itself?

The reason I'm asking is we are testing a script on a particular schema which will create tables, views and triggers. I need to be able to drop the contents of the schema quickly but not the schema itself because I don't have privileges to drop and recreate the schema but I can do anything within the schema..

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文