将 ASPNETDB.MDF 导出到外部数据库
ASP.Net 4.0/C#/MSSQL/Microsoft SQL Server Management Studio
嘿,我现在正处于要将项目移动到实时服务器的阶段
现在我想将表从 App_Data 文件夹中的 ASPNETDB 文件移动 到服务器。
我已经使用 Aspnet_regsql.exe
工具成功生成了下表 在我的共享托管服务器上
dbo.aspnet_Applications
dbo.aspnet_Membership
dbo.aspnet_Paths
dbo.aspnet_PersonalizationAllUsers
dbo.aspnet_PersonalizationPerUser dbo.aspnet_Profile
dbo.aspnet_Roles
dbo.aspnet_SchemaVersions dbo.aspnet_SchemaVersions dbo.aspnet_Users
dbo.aspnet_UsersInRoles dbo.aspnet_WebEvent_Events
现在下一步是从 ASPNETDB.MDF 复制表 服务器上的这些表?
非常感谢=)
ASP.Net 4.0/C#/MSSQL/Microsoft SQL Server Management Studio
Hey I am now at the stage where I want to move a project to a live server
Now I want to move the tables from the ASPNETDB file in the App_Data folder
to the server.
I have used the Aspnet_regsql.exe
tool to successfully generate the following tables
on my shared hosted server
dbo.aspnet_Applications
dbo.aspnet_Membership
dbo.aspnet_Paths
dbo.aspnet_PersonalizationAllUsers
dbo.aspnet_PersonalizationPerUser
dbo.aspnet_Profile
dbo.aspnet_Roles
dbo.aspnet_SchemaVersions
dbo.aspnet_Users
dbo.aspnet_UsersInRoles
dbo.aspnet_WebEvent_Events
Now what is the next step to essentially copy the tables from ASPNETDB.MDF
to these tables on the server?
Many thanks =)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
您拥有什么版本的 SQL Server?
如果您可以在 SQL Management Studio 中本地打开数据库,您只需使用
生成脚本
,然后您就可以在您的计算机上打开并运行该脚本。生产服务器。它可以选择复制因此您可以从生产上的空数据库开始,然后使用单个 .sql 文件立即复制数据和架构,然后就可以开始了。
What version of SQL server have you got?
If you can open the database locally in SQL Management Studio you can just use
Generate Scripts
that you can then simply open and run on your production server. It has the option to copySo you can start with an empty database on Production and copy both the data and schema at once with a single .sql file and you'll be good to go.
您可以使用 Management Studio 中的导出数据功能将数据从 msf 文件迁移到实时 dtabse。
You can use the export data feature from the management studio to migrate the data from the msf file to the live dtabse.
您最好将所有成员资格等表、视图和存储过程放入生产应用程序的主数据库中。您可以使用数据库发布向导来执行此操作,该向导将创建一个脚本来重新创建包括所有数据在内的所有内容。无需使用两个单独的数据库。
You are really better off putting all the membership etc. tables, views and stored procs into the main database for your production application. You can do this with the Database Publishing Wizard, which will create a script to recreate everything including all the data. No need to use two separate databases.
或者,可以运行此 exe 将空表从 ASPNETDB.mdf 复制到外部 SQL 服务器。
驱动器:\WINDOWS\Microsoft.NET\Framework\版本号\aspnet_regsql.exe
Alternatively, one can run this exe to copy empty tables from ASPNETDB.mdf to external SQL server.
drive:\WINDOWS\Microsoft.NET\Framework\versionNumber\aspnet_regsql.exe