Can SQL Server Project be used to compare differences ONLY in some stored procedures?

Let's say I have x the number of stored processes in my SQL Server project in Visual Studio 2015.

eg. 5 stored procedures.

I want to make a comparison between these 5 stored procedures and what is on my database server. I just want to compare what differences exist between the 5 stored procedures in my project and the fact that the database is similar to schema comparison.

This project is not tied to any database at the moment, because I am worried that it will ruin the existing database. The existing database has hundreds of stored procedures, but I'm interested in knowing the difference between these X or 5 stored procedures.

Is this possible using a SQL Server project?

+4
source share
2 answers

There are many ways to compare storage procedures in SQL Server.

  • compare scripts of two procedures

select a script procedure using the following query

 SELECT OBJECT_DEFINITION(p.object_id) FROM sys.procedures p

& then compare with the script of another procedure.

2:

 SELECT p.modify_date FROM sys.procedures p

Select the date the procedure was changed and compare them.

0
source

script , , , script , , . , PowerShell - . , script, - script , script , , .

0

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


All Articles