I have been using a central MS SQL database located in the cloud to develop a web site project. I have recently found myself in situations, when I need to develop without the internet connection. I want to begin to use a locally available copy of the existing database, put it in App_Data folder.
我一直在使用位于云中的*MS SQL数据库来开发一个网站项目。我最近发现自己的情况,当我需要在没有互联网连接的情况下开发。我想开始使用现有数据库的本地可用副本,将其放在App_Data文件夹中。
What is the correct set of steps I need to undertake to get the project to work with local DB?
为了让项目与本地数据库一起工作,我需要采取哪些正确的步骤?
For example:
- Detach a db from an existing SQL instance.
- Copy to a development machine. etc.
从现有SQL实例中分离数据库。
复制到开发计算机。等等
4 个解决方案
#1
1
I would create an empty shell database locally, then use one of the many schema comparison solutions available to make the local database look exactly like the cloud database.
我将在本地创建一个空的shell数据库,然后使用许多可用的模式比较解决方案之一使本地数据库看起来与云数据库完全一样。
#2
2
Moving a SQL-Server DB is not that hard. Look here for some methods to do it.
移动SQL-Server数据库并不难。在这里寻找一些方法来做到这一点。
http://support.microsoft.com/kb/314546
I usually find the sp_detach + sp_attach method really easy.
我经常发现sp_detach + sp_attach方法非常简单。
#3
0
Correct way is to create and regularly update your standalone copy of database using import/export. In particular MS SQL Server provides Import/Export Wizard tool for such purpose.
正确的方法是使用导入/导出创建并定期更新数据库的独立副本。特别是MS SQL Server为此目的提供了导入/导出向导工具。
#4
0
- Make a backup
- Copy backup file
- Restore on your server
- Restore/organise users
做一个备份
复制备份文件
在服务器上还原
#1
1
I would create an empty shell database locally, then use one of the many schema comparison solutions available to make the local database look exactly like the cloud database.
我将在本地创建一个空的shell数据库,然后使用许多可用的模式比较解决方案之一使本地数据库看起来与云数据库完全一样。
#2
2
Moving a SQL-Server DB is not that hard. Look here for some methods to do it.
移动SQL-Server数据库并不难。在这里寻找一些方法来做到这一点。
http://support.microsoft.com/kb/314546
I usually find the sp_detach + sp_attach method really easy.
我经常发现sp_detach + sp_attach方法非常简单。
#3
0
Correct way is to create and regularly update your standalone copy of database using import/export. In particular MS SQL Server provides Import/Export Wizard tool for such purpose.
正确的方法是使用导入/导出创建并定期更新数据库的独立副本。特别是MS SQL Server为此目的提供了导入/导出向导工具。
#4
0
- Make a backup
- Copy backup file
- Restore on your server
- Restore/organise users
做一个备份
复制备份文件
在服务器上还原