简体   繁体   English

如何从现有数据库创建SSDT项目?

[英]How to create SSDT project from existing database?

I have an existing SQL database and I need to add an SSDT project to the project I am working on. 我有一个现有的SQL数据库,需要将SSDT项目添加到我正在处理的项目中。 What would the correct way to add the tables and stored procs from the existing database to an SSDT project? 将表和存储的过程从现有数据库添加到SSDT项目的正确方法是什么?

Use Schema Compare with your existing database to populate your SSDT project. 将Schema Compare与现有数据库一起使用以填充SSDT项目。 I think you will find that it is really rather simple. 我认为您会发现它确实非常简单。

Schema Compare uses two connections (connection strings) to compare two different databases, or in your case one connection string to connect to the existing database (source) and then you choose your database project project as the other (target). 模式比较使用两个连接(连接字符串)来比较两个不同的数据库,或者使用一个连接字符串来连接到现有数据库(源),然后选择数据库项目作为另一个(目标)项目。

I think this covers all the options: 我认为这涵盖了所有选项:

https://the.agilesql.club/Blogs/Ed-Elliott/HOWTO-Get-An-Existing-Schema-Into-SSDT https://the.agilesql.club/Blogs/Ed-Elliott/HOWTO-Get-An-Existing-Schema-Into-SSDT

Good luck, common issues when you start are references and code that doesn't actually run (procs reference dropped table etc) - for references if you use anything in msdn or master or any sys.* objects add a reference to the dacpacs for non working code, check a baseline into source control and then delete it :) 祝您好运,启动时常见的问题是引用和实际上未运行的代码(procs引用已删除表等)-如果您在msdn或master或任何sys。*对象中使用任何内容,则为引用提供了对dacpacs的引用。工作代码,将基准检查到源代码管理中,然后将其删除:)

Ed 埃德

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 从SSDT项目部署SQL数据库更改 - Deploying SQL Database changes from a SSDT project 从 SSDT 项目以编程方式创建 dacpac 文件 - Create dacpac file programmatically from SSDT project 如何从命令行更新SSDT项目? - How to update an SSDT project from the command line? 如何在 Visual Studio 数据库项目 (SSDT) 上设置更改跟踪 - How to set change tracking on a Visual Studio database project (SSDT) 如何从代码中发布SSDT数据库 - How do I publish a SSDT Database from code SSDT 2013 新数据库项目缺失 - SSDT 2013 new database Project missing 使用SSDT的数据项目,如何引用另一个数据库而不将其填充到SS Obj Explorer中的同一项目文件夹中 - Data Project using SSDT, how to reference another database without it populating in same project folder in SS Obj Explorer 如何在没有任何数据的情况下从现有数据库创建数据库? - How to create a database from existing Database without any data? 如何从SQL Server中的现有数据库创建新数据库 - How to Create new Database from Existing Database in SQL Server 如何在VS2012中为数据库项目连接SSDT发布后命令 - How to wire up SSDT post-publish command in VS2012 for database project
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM