Skip to main content
added 8 characters in body
Source Link
marc_s
  • 9k
  • 6
  • 45
  • 52

I have 2 Remoteremote SQL Server 2014 Serversinstances: Server A with Versionversion 12.0.4100.1 and Server B with Versionversion 12.0.4213.0.

I have exported a DB from server B, copied and restored it to server A for tests. I have a Querryquery (really long) which I execute on both Serversservers. The Server B returns the results in 2 min and server A in 1-2 sec. I have tried to export back the DB from Server A to server B, the same DB and nothing changes.

I have noticed the folowingsfollowing on server B: if I export all the Tablestables of the DB into a TempDB, then delete all the Tablestables from DB and then import all the Tablestables from TempDB back into DB the Problemproblem is gone. This happens for both the old (original) DB and the new (exported back from server A) one as well.

My Problemproblem: what can cause this "Problem""problem" and how to prevent it?

I have 2 Remote SQL 2014 Servers: Server A with Version 12.0.4100.1 and Server B with Version 12.0.4213.0.

I have exported a DB from server B, copied and restored it to server A for tests. I have a Querry (really long) which I execute on both Servers. The Server B returns the results in 2 min and server A in 1-2 sec. I have tried to export back the DB from Server A to server B, the same DB and nothing changes.

I have noticed the folowings on server B: if I export all the Tables of the DB into a TempDB, then delete all the Tables from DB and then import all the Tables from TempDB back into DB the Problem is gone. This happens for both the old (original) DB and the new (exported back from server A) one as well.

My Problem: what can cause this "Problem" and how to prevent it?

I have 2 remote SQL Server 2014 instances: Server A with version 12.0.4100.1 and Server B with version 12.0.4213.0.

I have exported a DB from server B, copied and restored it to server A for tests. I have a query (really long) which I execute on both servers. The Server B returns the results in 2 min and server A in 1-2 sec. I have tried to export back the DB from Server A to server B, the same DB and nothing changes.

I have noticed the following on server B: if I export all the tables of the DB into a TempDB, then delete all the tables from DB and then import all the tables from TempDB back into DB the problem is gone. This happens for both the old (original) DB and the new (exported back from server A) one as well.

My problem: what can cause this "problem" and how to prevent it?

edited tags
Link
Paul White
  • 90.3k
  • 30
  • 424
  • 663
Source Link

Problem with Restored DB

I have 2 Remote SQL 2014 Servers: Server A with Version 12.0.4100.1 and Server B with Version 12.0.4213.0.

I have exported a DB from server B, copied and restored it to server A for tests. I have a Querry (really long) which I execute on both Servers. The Server B returns the results in 2 min and server A in 1-2 sec. I have tried to export back the DB from Server A to server B, the same DB and nothing changes.

I have noticed the folowings on server B: if I export all the Tables of the DB into a TempDB, then delete all the Tables from DB and then import all the Tables from TempDB back into DB the Problem is gone. This happens for both the old (original) DB and the new (exported back from server A) one as well.

My Problem: what can cause this "Problem" and how to prevent it?