有没有办法重建/修复 ASP.Net 个性化表而不丢失其中的数据?

发布于 2024-07-16 03:19:21 字数 189 浏览 4 评论 0原文

我继承了一个使用 ASP.Net 会员服务的 Asp.Net 应用程序。 我正在尝试向网站添加具有个性化的 Web 部件,但遇到了很多错误。 看起来 Aspnet_regsql.exe 生成的表已被更改 - 可能在过去的某个时刻使用“select into”进行复制,导致它们丢失所有索引和主键。

如何修复这些表而不丢失其中的所有数据?

I inherited an Asp.Net app that uses ASP.Net membership services. I am trying to add web parts with personalization to the site, and am getting a lot of errors. It looks like the tables generated by Aspnet_regsql.exe have been changed - probably copied at some point in the past using "select into" causing them to lose all their indexes and primary keys.

How can I repair these tables without losing all the data inside?

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

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

发布评论

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

评论(1

多孤肩上扛 2024-07-23 03:19:21
  1. 备份数据库(以防万一!)
  2. 重命名现有数据库
  3. 重新创建 aspnetdb
  4. 将数据从重命名的数据库批量复制到新重新创建的数据库中。 (可能与 BCP 一起)

我知道 BCP 是一个旧工具......但它仍然有效。 也许有一个更简单的方法来做到这一点,但这就是我会这样做的。

  1. Backup database (just in case!)
  2. Rename existing database
  3. Recreate aspnetdb
  4. Bulk copy data from renamed DB into newly recreated DB. (probably with BCP)

I know BCP is an old tool... but it still works. Maybe there is an easier way to do it, but this is how I would do it.

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