x

Visual Studio - DB solution Organizing

All,

I am trying to set up a database solution of an existing database into TFS.

One of the challenges i have is setting up synonyms. Since Synonyms vary for environment i wanted to set up it dynamically. I tried creating a synonym like the below , but it dint let me have if conditions. Can I create them as pre deployment scripts ? or how to best do it ?

Also I need suggestions on release management . How do i create incremental release from the solution ?

Thanks in advance ..

 If (  @@servername = 'dev' ) 
 BEGIN 
 
 CREATE SYNONYM x
 
 
 END 
 
 ELSE If (  @@servername = 'qa' ) 
 BEGIN 
 
 CREATE SYNONYM y
 
 
 END 
 
 ELSE If (  @@servername = 'prod' )  
 BEGIN 
 
 
 CREATE SYNONYM z
 
 
 END 
more ▼

asked Oct 11 at 09:44 PM in Default

avatar image

aRookieBIdev
2.8k 56 65 71

(comments are locked)
10|1200 characters needed characters left

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.

Topics:

x84
x10
x6
x5

asked: 5 days ago

Seen: 15 times

Last Updated: 5 days ago

Copyright 2017 Redgate Software. Privacy Policy