How to handle stored procedure code changes from multiple applications using the same database?

The database in our environment is shared by two different environments / applications. Of the 2 applications, first one -let says A, it is often updated, and the second application B is often not updated.

So, the situation arises when application A is updated with new code, mainly stored procedures, it can sometimes affect and interrupt the second application B, which is updated by another command and is not updated too often. I understand that this should not be the right way to handle this, and not updating both environments together can be disastrous. This is because applications A and B are processed by different teams.

How would you handle this situation elegantly?

From application To the precautions I could take, Retrieving data in code - The best way to retrieve data would be to check for empty / null columns, so if new columns are added to Appendix A, they can be ignored by Appendix B. Retrieving data in SQL - Inside a procedure, it can be processed using optional parameters.

But when the C # code calls the procedure, we must skip the parameter values, and if new parameters are added, then it is interrupted. Is there a way to make sure that if the call parameter is missing, then it should be ignored (from C # or SQL Server)?

My research shows -

  • sproc, , , , . , A , B. , DeriveParameters # SQL-, .

  • SPROC, CSV. SPROC . sprocs.

, , , , ? , , ?

- ASP.NET/C# 4.0, SQL Server 2008 R2

. .

  • / A , # , . . DB .

  • / B , - .

+5
3

, , , ... escenario, SP .

db . A, , SP, , B.

, , .

+4

, ? .

CREATE PROCEDURE xxx

   @OldParam   int
  ,@NewParam   int  = 0

AS

   <etc>

"A" .

"B" , proc , . , 0... . (NULL "" .)


[]

- , .

  • ,
  • , , ,

    < 3 proc 1

    proc

, (A, B ) , .

+2

Perhaps each application may have its own set of stored procedures, a son that they do not bother with each other.

+2
source

All Articles