将 MS sql server (aspnetdb) 表、存储过程等与我自己的数据库合并?
我正在使用在网站模板 (aspnetdb.mdf) 上创建的 asp.net 默认数据库和用户的会员级别。对于与我的网站相关的附加信息,我正在使用另一个数据库(mydata.mdf)。
我想要做的是将这些数据库合并为一个,并通过一个连接字符串访问它们。由于从 mydata.mdf 获取数据,然后根据它从 aspnetdb.mdf 选择用户信息是一件痛苦的事情。
考虑到两个数据库都有大量存储过程和 FK 关系,实现此目的的最佳方法是什么。
我发现一些文章告诉 aspnet_regsql.exe 是方法,但找不到任何教程以及如何执行它?
提前致谢!
I'm using asp.net default database created on website template (aspnetdb.mdf) and membership class for users. And for the additional information related to my website i'm using another database (mydata.mdf).
What i want to do is to combine these databases into one, and to access them via one connection string. Since getting the data from mydata.mdf then selecting the user info from aspnetdb.mdf according to it is a pain.
What is the best way to achieve this, considering both databases have lots of stored procedures and FK relationships.
I've found some articles telling aspnet_regsql.exe is the way but couldn't find any tutorial and how to execute it?
Thanks in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的,您需要针对数据库运行
aspnet_regsql.exe
来设置表和存储过程。它是一个向导,因此它可以很好地指导您完成整个过程。
有关详细信息,请参阅 MSDN 文档 。页面底部附近有一个图表,根据您使用的框架的版本提供文件的位置。
Yeah, you need to run
aspnet_regsql.exe
against your database to setup the tables and sprocs.Its a wizard, so it does a good job guiding you through the process.
See the MSDN Documentation for more information. There's a chart near the bottom of the page that gives location of the file depending on the version of the framework that you are using.