<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="pt-br">
		<id>http://wiki.mstech.com.br/index.php?action=history&amp;feed=atom&amp;title=Compare_BD</id>
		<title>Compare BD - Histórico de revisão</title>
		<link rel="self" type="application/atom+xml" href="http://wiki.mstech.com.br/index.php?action=history&amp;feed=atom&amp;title=Compare_BD"/>
		<link rel="alternate" type="text/html" href="http://wiki.mstech.com.br/index.php?title=Compare_BD&amp;action=history"/>
		<updated>2026-05-08T02:36:26Z</updated>
		<subtitle>Histórico de revisões para esta página neste wiki</subtitle>
		<generator>MediaWiki 1.26.2</generator>

	<entry>
		<id>http://wiki.mstech.com.br/index.php?title=Compare_BD&amp;diff=177&amp;oldid=prev</id>
		<title>Ruz em 17h51min de 20 de maio de 2016</title>
		<link rel="alternate" type="text/html" href="http://wiki.mstech.com.br/index.php?title=Compare_BD&amp;diff=177&amp;oldid=prev"/>
				<updated>2016-05-20T17:51:48Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;' lang='pt-BR'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Edição anterior&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Edição das 17h51min de 20 de maio de 2016&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l58&quot; &gt;Linha 58:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Linha 58:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;remover alguns trechos do schema compare do VS:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;remover alguns trechos do schema compare do VS:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;''&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;code&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;do início:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;do início:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;:setvar DatabaseName &amp;quot;dem_bluemonitor&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;:setvar DatabaseName &amp;quot;dem_bluemonitor&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l83&quot; &gt;Linha 83:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Linha 83:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;USE [$(DatabaseName)]; (também aparece no final. remover)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;USE [$(DatabaseName)]; (também aparece no final. remover)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;GO&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;GO&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;/code&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;''&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Ruz</name></author>	</entry>

	<entry>
		<id>http://wiki.mstech.com.br/index.php?title=Compare_BD&amp;diff=176&amp;oldid=prev</id>
		<title>Ruz: Criou página com 'Visual studio Schema Compare File -&gt; new project Templates -&gt; SQL Server -&gt; SQL Server Database Project  botão direito no projeto criado -&gt; Schema Compare  Clique na engrenag...'</title>
		<link rel="alternate" type="text/html" href="http://wiki.mstech.com.br/index.php?title=Compare_BD&amp;diff=176&amp;oldid=prev"/>
				<updated>2016-05-20T17:50:57Z</updated>
		
		<summary type="html">&lt;p&gt;Criou página com &amp;#039;Visual studio Schema Compare File -&amp;gt; new project Templates -&amp;gt; SQL Server -&amp;gt; SQL Server Database Project  botão direito no projeto criado -&amp;gt; Schema Compare  Clique na engrenag...&amp;#039;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Página nova&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Visual studio Schema Compare&lt;br /&gt;
File -&amp;gt; new project&lt;br /&gt;
Templates -&amp;gt; SQL Server -&amp;gt; SQL Server Database Project&lt;br /&gt;
&lt;br /&gt;
botão direito no projeto criado -&amp;gt; Schema Compare&lt;br /&gt;
&lt;br /&gt;
Clique na engrenagem, e siga:&lt;br /&gt;
&lt;br /&gt;
-----&lt;br /&gt;
&lt;br /&gt;
General (marcar):&lt;br /&gt;
    Include transactional scripts&lt;br /&gt;
&lt;br /&gt;
Object Types (desmarcar):&lt;br /&gt;
    Application Roles&lt;br /&gt;
    Database Roles&lt;br /&gt;
    Extended Properties&lt;br /&gt;
    Permissions&lt;br /&gt;
    Role Membership&lt;br /&gt;
    Rules&lt;br /&gt;
    Users&lt;br /&gt;
&lt;br /&gt;
--------- caso o banco tenha muitas mudanças (como o blue monitor), é preciso desmarcar tudo e ir marcando apenas um tipo de schema por vez ------&lt;br /&gt;
Aggregate&lt;br /&gt;
Inline functions&lt;br /&gt;
partiction functions&lt;br /&gt;
Scalar-valued functions&lt;br /&gt;
Table-valued functions&lt;br /&gt;
&lt;br /&gt;
Stored procedures&lt;br /&gt;
&lt;br /&gt;
Synonyms&lt;br /&gt;
&lt;br /&gt;
User-defined Data Types&lt;br /&gt;
User-defined Table Types&lt;br /&gt;
User-defined Types (CLR)&lt;br /&gt;
&lt;br /&gt;
gerar scripts na ordem:&lt;br /&gt;
1 - Tabelas&lt;br /&gt;
2 - Functions&lt;br /&gt;
3 - Types&lt;br /&gt;
4 - Storeds&lt;br /&gt;
&lt;br /&gt;
----------------------------&lt;br /&gt;
&lt;br /&gt;
Selecione no Dropdown &amp;quot;Select Source&amp;quot; o banco Origem (ou seja, o banco que servirá de modelo, como o banco de dev)&lt;br /&gt;
marque Database, e encontre o banco, clique em Connect&lt;br /&gt;
&lt;br /&gt;
Selecione no Dropdown &amp;quot;Select Target&amp;quot;, o banco Destino (ou seja, o banco em que serão feitas as alterações, como um banco de homologação)&lt;br /&gt;
marque Database, e encontre o banco, Connect&lt;br /&gt;
&lt;br /&gt;
clique em Compare&lt;br /&gt;
&lt;br /&gt;
Verifique se é necessário retirar alguma coisa, como sinônimos, alterações sem necessidade, etc&lt;br /&gt;
Clique no pergaminho ao lado do botão Update, chamado Generate Script&lt;br /&gt;
De preferência, cole este script no sql server, pois pode dar problemas com encoding se colar no bloco de notas, por exemplo.&lt;br /&gt;
&lt;br /&gt;
remover alguns trechos do schema compare do VS:&lt;br /&gt;
&lt;br /&gt;
''&lt;br /&gt;
do início:&lt;br /&gt;
:setvar DatabaseName &amp;quot;dem_bluemonitor&amp;quot;&lt;br /&gt;
:setvar DefaultFilePrefix &amp;quot;dem_bluemonitor&amp;quot;&lt;br /&gt;
:setvar DefaultDataPath &amp;quot;E:\SQL\BDs\&amp;quot;&lt;br /&gt;
:setvar DefaultLogPath &amp;quot;E:\SQL\Logs\&amp;quot;&lt;br /&gt;
&lt;br /&gt;
GO&lt;br /&gt;
:on error exit&lt;br /&gt;
GO&lt;br /&gt;
/*&lt;br /&gt;
Detect SQLCMD mode and disable script execution if SQLCMD mode is not supported.&lt;br /&gt;
To re-enable the script after enabling SQLCMD mode, execute the following:&lt;br /&gt;
SET NOEXEC OFF;&lt;br /&gt;
*/&lt;br /&gt;
:setvar __IsSqlCmdEnabled &amp;quot;True&amp;quot;&lt;br /&gt;
GO&lt;br /&gt;
IF N'$(__IsSqlCmdEnabled)' NOT LIKE N'True'&lt;br /&gt;
    BEGIN&lt;br /&gt;
        PRINT N'SQLCMD mode must be enabled to successfully execute this script.' ;&lt;br /&gt;
        SET NOEXEC ON;&lt;br /&gt;
    END&lt;br /&gt;
GO&lt;br /&gt;
USE [$(DatabaseName)]; (também aparece no final. remover)&lt;br /&gt;
GO&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''&lt;/div&gt;</summary>
		<author><name>Ruz</name></author>	</entry>

	</feed>