0

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?

4

1 回答 1

1
  1. 备份数据库(以防万一!)
  2. 重命名现有数据库
  3. 重新创建 aspnetdb
  4. 将重命名的数据库中的数据批量复制到新创建的数据库中。(可能与 BCP)

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

于 2009-03-22T11:38:55.630 回答