Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Yes, it is possible to keep objects in synch with a single button click from Visual Studio. This is done by calling the Red Gate SQL Compare command line from VS if you add an entry in Tools/External Tools</p> <p>Of course you'll need to install SQL Compare first.</p> <p>And then set up the following External Tool (this example copies a stored procedure from a dev database to a test database):</p> <ul> <li><strong>Title:</strong> Sync selected stored procedure</li> <li><strong>Command:</strong> c:\Program Files\Red Gate\SQL Compare 8\SQLCompare.exe</li> <li><strong>Arguments:</strong> /s1:.\sql2005 /db1:DevDB /s2:.\sql2005 /db2:TestDB /include:StoredProcedure:[$(CurText)] /synchronize </li> <li>Check the "Use Output window" so you can see what's going on.</li> </ul> <p>This will add an item under the Tools menu. You can also add this as a button in the toolbar.</p> <p>To use this, select the text of the stored procedure you wish to synchronize and go to Tools/Synch selected stored procedure. This will synchronize the selected procedure. The drawback is that the above example is a one-to-one synchronization. If you have a number of target servers, you'll have to wrap multiple statements in a batch file and call the sqlcompare.exe command line a number of times. An of course the above 'External Tool' would need to call the batch file and pass the parameter to the batch file.</p> <p>Of course this solution assumes that you've applied your stored procedure to a development database. Is this how you work? Or are you trying to synchronize from a script that belongs to your VS project?</p> <p>I'd be interested to discuss this further with you and see if we can get help you solve this problem. Feel free to email me at David.Atkinson at red-gate.com</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload