title: How to continually synchronize two SQL Server databases?
body: <p>I have a SQL Server database that contains a lot of data, with many tables, views, triggers, stored procedures etc. Some of the tables are: 'users', 'cart', 'stores' etc.</p>
  <p>In the same time, I need to have a copy of this database, which should be synchronized from the main table, on certain time. So the changes in my primary database should be reflected in the copy of my database a few times per day. Additionally, if there is a change in the 'users' table, this update should trigger the synchronization immediately.</p>
  <p>In the copy of the database, I have a few more tables 'managers', 'schools' etc, which are not present in the primary database. While synchronizing, these additional tables should not be changed at all, since were not present in the main database.</p>
  <p>So let's take a look at these databases independently from the solutions that are using them. What I wonder is: what is the best way to set up such a synchronization? The database is huge, and querying the data for each database tables from one location to another does not seems as a good option. Is there any generic way of how to do this synchronization? And should this be done within a code, or maybe there is some trigger on the server where the database is placed (under control panel) or maybe via SQL Server itself? I am not sure what's the best option here, so please advise.</p>
  <p>I am using the version</p>
  <pre><code>Microsoft SQL Server 2017 (RTM-CU9-GDR) (KB4293805) - 14.0.3035.2 (X64) Jul  6 2018 18:24:36   
  Web Edition (64-bit) on Windows Server 2012 R2 Standard 6.3 &lt;X64&gt; (Build 9600: ) (Hypervisor) 
  </code></pre>