I have three servers with own databases, and database schemas are same. Let's call them servers A, B and C.  All three servers will be operational, which means that all three servers will serve for its region.  Data from servers B and C need to be replicated on server A, so that server A will contains data from all servers, but other two servers contain just own data.  I need to implement some replication solution to achieve this goal, and I am asking if it is possible to have two publishers (server B and C) and one server with two subscription (server A)? Is there any better solution? Which replication model will be the best?
123419
I have 8 individual SQL Server 2008 R2 machines, each hosting 1 database. Each database has an identical table structure and schema, and entirely unique data.  I would like to establish a reporting server (may be 2008 or 2012), that consolidates the rows  from selected tables across the 8 source servers into a single instance of those tables on the reporting server. This is one-way replication (no changes will be made to the reporting server). I will need to replicate changes from the source databases with relatively low latency (say 20-30 seconds).  Furthermore, I'd like to find methods to achieve this with as little impact to the source servers as is practical.  3rd-party agents, triggers, or schema mods to those servers are difficult in my environment.  My questions:   What are promising architectures and technologies for  achieving this goal?  I've looked at SQL Server Merge Replication, but I am concerned about latency. Is this an appropriate technology for this goal? Are there many-to-one architectures for transactional replication?   Should I be looking at 1-to-1 replication into 8 databases on my reporting server, followed by some custom merge function (a 2-step replication)?   Thanks, John
47739
SQL Server - What is the best method to run the same query over multiple databases on multiple instances? for example we have many application databases, with the same schema that need to have information aggregated.  I currently use a script that relies on linked servers already being setup and a table that identifies which instance and database to loop through.          /* declare some cursor variables and the dynamic sql string variable */     DECLARE @currentDB          nvarchar(64)     DECLARE @connectionstring   nvarchar(256)     DECLARE @sqlstring          nvarchar(max)  CREATE TABLE #TEMP1                 (                      currentDB      varchar(32)                     ,field1         varchar(128)                     ,field2         smallint                     ,field3         datetime                 )  /* Build and open the cursor */ DECLARE connectioncursor CURSOR FAST_FORWARD FOR     SELECT  currentDB, connectionstring     FROM    [admin].dbo.DatabaseList     WHERE   dbtype = 'PROD' OPEN    connectioncursor FETCH NEXT FROM connectioncursor INTO @currentDB, @connectionstring  /* Start the loop through db list */ WHILE @@FETCH_STATUS = 0     BEGIN         /* Build and set the sql string */         SET @sqlstring =             '                 select                          ''' + @currentDB + '''                         ,field1, field2, field3                         from ' + @connectionstring + '.dbo.table1             '          /* Insert the results from the iteration and fetch the next db */         INSERT INTO #TEMP1 exec sp_executesql @sqlstring         FETCH NEXT FROM connectioncursor INTO @currentDB, @connectionstring     END  /* Kill the cursor */ CLOSE connectioncursor DEALLOCATE connectioncursor   select * from #TEMP1  -- some output   Be gentle I'm a TSQL newbie!
107222
I have just asked a question on   I read from this meta answer  that suggested     From a desktop support perspective there are certainly cases where a   large(r) number of machines will be affected by something, in which   case it's appropriate for SF. There are then others that are isolated   to a single computer, these tend to be the ones I vote to move to SU.   Since my question is clearly not about a single computer and is external to a single computer, I turned to ServerFault. I thought the question is about how to replicate a network admin strategy on my own (home) network. My question is, however, marked as off-topic, and I did see that homenetwork questions are off-topic. But this is not a single computer issue either.  My question is:  Where should such home/small network questions be asked?  What's the real difference between "professional" networks and the smaller networks that I build for my home or lab with a handful computers?  -- UPDATE --  The question asked here is different from the said duplicate question  as that question is about the difference among computer science and programming SE sites. It has nothing to do with network administration, whether it's large or small networks. None of the two SE sites in question (Server Fault and Super User) is even mentioned in the question or in the 2 cited answers.  -- UPDATE2 --  This question is not a duplicate of , which was cited in the OP and was the cause of this question. That question does not cover the overlapping area of small networks, which could both be for work and for home network.
26567
How can I execute a query that connects to different databases?  I have the following query, and I need to rewrite it for Drupal.  SELECT a.empid, b.empname FROM db1..empidmaster a, db2..emplist b WHERE a.empid = b.empid   How can I rewrite the query using db_query(), or db_select()?
91260
I would like to set up a server which could support a data science team in the following way: be a central point for storing, versioning, sharing and possible also executing Jupyter notebooks.  Some desired properties:   Different users can access the server and open and execute notebooks that were stored by them or by other team members. The interesting question here is what would be the behavior if user X executes cells in a notebook authored by user Y. I guess the notebook should NOT be changed: Solution should be self-hosted. Notebooks should be stored either on the server or on Google drive or on self-hosted instance of owncloud. (Bonus) Notebooks will be under git versioning control (git may be self-hosted. Cannot be bounded to GitHub or something of that sort).   I looked into  and . With the former, I didn't understand how to allow cross users access. The latter seems to only support GitHub as the storage of the notebooks.  Do you have experience with either of the solutions?
122489
Throughout MS documentation for AlwaysOn Availability Groups (AG) and AlwaysOn Failover Cluster Instances (FCI) I see the following pattern:  FCI is for HA scenarios. An AG synchronous secondary replica, co-located with the primary, is for HA scenarios. An AG asynchronous secondary replica, in a different datacenter, is for DR scenarios.  Here is an . Since option #1 and #2 are both for HA scenarios, how do I decide between them? If MS published costs and RPO/RTO metrics for both #1 and #2, it would be fairly easy to decide which I want. Or perhaps there is a different way to understand the ROI differences between these options.  For example, perhaps option #2 is best suited for VLDB's and option #1 is best suited for very high transaction volumes.  I don't know. So again, what is the selection criteria a DBA uses to choose between options #1 and #2? To further complicate things, I know that options #1 and #2 can be combined!  When is it wise to combine the two options?  When is it pointless to combine the two options?  I know when these options are combined, the AG no longer supports automatic fail-over.  It's interesting trivia, but doesn't answer my question. Incidentally, I intend on provisioning my final solution into Azure IaaS.  If I use an Always On FCI, I will likely create the quasi-SAN using Storage Spaces Direct (S2D). Update I've found two articles that give a comparison.  The first is , and the other is .  Both have a chart like this: ╔═════════════════════════════╦══════════════════════════╗ ║ FCI                         ║ AG                       ║ ╠═════════════════════════════╬══════════════════════════╣ ║  * Server Level             ║  * Database Level        ║ ╠═════════════════════════════╬══════════════════════════╣ ║  * Requires shared storage  ║  * Uses direct           ║ ║     (SAN or Storage Spaces  ║     attached storage     ║ ║     Direct)                 ║                          ║ ╠═════════════════════════════╬══════════════════════════╣ ║  * RTO from 30              ║  * RTO typically less    ║ ║     seconds to 20 minutes.  ║     than 30 seconds      ║ ╠═════════════════════════════╬══════════════════════════╣ ║  * RPO: no data loss.       ║  * RPO: ???              ║ ╠═════════════════════════════╬══════════════════════════╣ ║  * Only Passive Secondaries ║  * Active or Passive     ║ ║                             ║     Secondaries          ║ ╠═════════════════════════════╬══════════════════════════╣ ║  * One SQL Server           ║  * Multiple SQL Server   ║ ║     instance/license        ║     instances / licenses ║ ╚═════════════════════════════╩══════════════════════════╝  The article didn't comment on AG RPO, but I read elsewhere that there is no data loss when recovering from a synchronous secondary replica.  I don't know if that is true and I don't know what the RPO of asynchronous secondary replica might be.  In Azure there is  are created with the AG (regardless if you have your own domain controllers).  I don't know if an Azure FCI has the same heavy-handed requirement. Most significantly - I still don't know why it is valuable to combine the two techniques.  I've only read that it  availability.  That is a vague claim IMO. More trivia: I also spotted a discussion suggesting that .
87139
Suppose I am running multiple column update on one row. Does the database engine physically write new data to the database if some of the columns contain the same values as existed previously in the database? If so, how can it be avoided?  I'm about to implement a job which will run an update on a large table and most of the values will be the same but still, it has to recalculate them all. I am wondering if the update will also rewrite each column even if there is no need to, because the storage media will degrade faster.
59131
I'm creating a user-based website. For each user, I'll need a few MySQL tables to store different types of information (that is, userInfo, quotesSubmitted, and ratesSubmitted).  Is it a better idea to:  a) Create one database for the site (that is, "mySite") and then hundreds or thousands of tables inside this (that is, "userInfo_bob", "quotessubmitted_bob", "userInfo_shelly", and"quotesSubmitted_shelly")  or  b) Create hundreds or thousands of databases (that is, "Bob", "Shelly", etc.) and only a couple tables per database (that is, Inside of "Bob": userInfo, quotesSubmitted, ratesSubmitted, etc.)  Should I use one database, and many tables in that database, or many databases and few tables per database?    Edit:  The problem is that I need to keep track of who has rated what.  That means if a user has rated 300 quotes, I need to be able to know exactly which quotes the user has rated.  Maybe I should do this?  One table for quotes. One table to list users. One table to document ALL ratings that have been made (that is, Three columns: User, Quote, rating).  That seems reasonable. Is there any problem with that?
17130
I have the need to synchronize the data in certain Salesforce tables (user, account, opportunity, lead, task, contact, etc.) to a local database. For reasons that I won't go into here, I can't use the streaming API. I want to kick off a local process every X minutes that will:   Go through each of the tables on my list Insert any new records Update any existing records that were updated Delete any records locally that were deleted on the server (either deleted directly or indirectly (e.g. through a foreign key relationship, like when an account is deleted its associated tasks are deleted as well).   Can you please offer advice on what API's might be good to use here, and whether one stands out more than the others? Are there any specific design recommendations that might be useful for achieving this goal? Or is there really no practical difference between what REST vs SOAP can do?  It comes down to what is the easiest to maintain/implement? Is there some other route that might be beneficial to use (example: bulk data load to start out followed by outbound messaging tied to all of the objects in question to get updates/inserts/deletes)?   I am using C#/.net.
38812
If I have a large number of SQLite databases, all with the same schema, what is the best way to merge them together in order to perform a query on all databases?   I know it is possible to use  to do this but it has  of 32 and 64 databases depending on the memory system on the machine.
35579
Current Configuration: I have two SQL Servers, which are connected by the failover mechanism, meaning one is primary and one is secondary. I restarted both services on both servers sequentially. On the secondary server, all the databases are in the &quot;Synchronizing&quot; state. AG replication mode is synchronous. It has been 12hr it's still showing &quot;Synchronizing&quot; state. What I did so far to resolve Drop the database from the secondary server and remove the database from AG group on the primary server and add it back. Any insight on this, I am using SQL Server 2017.
102864
I am looking for a module or a way where two different drupal distributions can share the same authentication or user database ? Is there a module that can help with that ?  possibilities-  if user A logged into site-1,  the user should be logged in automatically to site-2.  if thats not possible, if user 1 creates a login on site-1, he should also be able to use the same login credentials on site-2 or vice versa.
48821
I'm wondering about the downsides of each servers in respect to a production environment. Did anyone have big problems with one of the features? Performance, etc. I also quickly took a look at the new Glassfish, does it match up the simple servlet containers (it seems to have a good management interface at least)?
70884
I made many copies of an object, then I thought it would've been better if I made them to share the same Data (being an instance of the same original object), I know how to do it one by one, is there a way to do it for all of them at once? I tried Copy Attribute add-on but didn't find what option can do that, or even if this is possible in the first place.
28506
We have 2 servers in an AlwaysOn group.  While the user accounts within each synchronized database exist on both servers, the database instance level logins only exist on one of the servers. Ie DBINSTANCE->Security->Logins are missing on one server.  Therefore when there is a failover, I get login failures on the second server (which doesn't have the corresponding instance level logins).  How do I overcome this issue? Was I supposed to set up the user account in a special way?
119018
This is my first question, hope I do it right!  I am working on creating a process that will sync server objects between our AG nodes. We are using SQL Server 2016 with 4 nodes. Two nodes in one data center and two nodes in a different data center.  I am currently using PowerShell to copy my logins, jobs, SSIS catalog, operators, and linked servers. I want to automate deploying changes made to these objects across all four nodes. Is there a tool made for this already?
74570
I have to copy the entire database permissions from database A to database B which has  same objects in database B in same instance.   What are the things that I need to copy from database A to database B to get the same permission as in database A.  Environment: SQL Server 2012 , in same server with same logins.