Visual Studio 2010: Is there a way to deploy a single database object that stores the object in regular assemblies?

The developers expressed a desire to deploy a single database object from a Sql Server 2008 project, such as a stored procedure, without using assembly / deployment comparison features or schemas.

To enable this, developers created their scripts for database objects, including "if exists .. drop" checked at the top of the script and included grant statements for objects in their scripts.

This leads to build errors, which then interfere with the build / deploy or schema comparison functions. Thus, developers mark the object as “not in the assembly”, but then the object cannot be expanded at all using assembly / deployment matching or schema.

Has anyone found a way to quickly deploy a single database object from visual studio that does not include schema comparison or assembly / deployment that does not remove the object from the normal assembly process? Manual copy / paste is not an option, but scripts / macros that effectively do the same will be viable.

+3
source share
2 answers

SQL Server Data Tools (SSDT) ​​ . , , . , , , , . , , , . 32- Vista 3 VS 2010. .

+1

, , , .

  • - [1],
  • / [2] .
  • [delta] [2] [3],
  • , [3] - [1], script , [delta] - , .

, .
. , , ; .

, , .

, . .
"" , ..drop .
, script .

, , , "" :

/*SINGLE_OBJECT_DEPLOYMENT
if exists (...)
  DROP ...
--*/

--/*SINGLE_OBJECT_DEPLOYMENT
if exists (...)
  DROP ...
--*/

, /*SINGLE_OBJECT_DEPLOYMENT --/*SINGLE_OBJECT_DEPLOYMENT , .

0

Source: https://habr.com/ru/post/1759138/


All Articles