I am investigating the impact of upgrading from SQL Server 2008 R2 to SQL Server 2012. To reduce the immediate impact of migration, I am planning to set the database compatibility to SQL Server 2008.
Does anyone know if there is an impact on performance of queries and other DML operations compared to setting the database to SQL Server 2012?
Related
We recently moved from the following server: Windows Server 2008 R2 + MSSQL 2008 R2 STD to Windows Server 2012 R2 +MSSQL 2016 STD. In terms of hardware, the old server was 1271v3 with 24 GB memory and the new server is 1271v6 with 32GB of memory. The rest of the hardware of the two servers is the same. The db was transferred using db backup and restore.
Although everything is working on the new server with no errors, it is significantly slower than the original server and we are even seeing some deadlocks.
If everything is the same or newer/better, how can this be?
The problem was not SQL server at all. The new server was using the default Windows power plan which is "Balanced". Switching the plan to "High Performance" mode caused a performance increase of up to 300% on more complex and long running queries.
I need to dump a software to a clients server. The problem is that my software is using SQL server 2008 and the client is using SQL Server 2000. So could anyone please suggest how I can make the clients SQL server 2000 compatible with my queries of SQL server 2008?
Thanks for the suggestion
But my concern is that software is already developed with SQL server 2008, then is there any way to use it with SQL server 2000?
You should have developed your software against SQL 2000, or demanded your client upgrade to at least 2005. Did
you ask the client which version you would deploy to before starting development? That is part of standard requirements gathering.
SQL 2008 queries may or may not be compatible with SQL 2000 due to
many new features in 2005 and 2008. There is no shortcut.
At best, make sure to use SQL 2000 documentation from MSDN when writing queries. Use the lowest common denominator.
If you are supporting a product that must deploy to multiple SQL Server versions, you may consider using an ORM that supports SQL 2000. Checkout the Nuget gallery of ORMs: http://staging.nuget.org/packages?q=Tags%3A%22ORM%22 - I believe something simple like Dapper supports 2000.
At minimum you should set your SQL 2008 compatibility level down to 2000 during development.
http://msdn.microsoft.com/en-us/library/bb510680.aspx
ALTER DATABASE database_name SET COMPATIBILITY_LEVEL = 80
I recommend you setup a virtual machine, install the older OS that your client uses as well as SQL Server 2000. Otherwise there are unforeseeable differences.
Does the current iteration of fluentmigrator work with SQL Server 2012? Its not listed under the supported databases.
There is no official support for Sql Server 2012 yet. But it should work if you specify SqlServer2008 as the database type. The differences between Sql Server 2005, 2008 and 2012 are not so significant when using FluentMigrator (Sql Server 2000 is a different story). Some features like the new sequence object have no support so in the meantime will have to be run using Execute.Sql.
UPDATE: I tested FluentMigrator against Sql Server 2012 Express with database type specified as SqlServer2008 and it worked fine.
UPDATE: FluentMigrator now officially supports Sql Server 2012 and Sequences.
I have a database currently in SQL Server 2008 to be moved to SQL Server 2005. I would like to backup the 2008 db to a bak file and import it to 2005, but couldn't find any options in SSMS 2008 while taking backup. Has anyone had a similar need in the past? How did you manage this through?
To restore the backup to an older version of SQL Server you can use third party tools, ApexSQL Diff and ApexSQL Data Diff.
You can read detailed explanation of the process in this article: Restoring SQL Server database backup to an older version of SQL Server
Hope this helps
Disclaimer: I work for ApexSQL as a Support Engineer
You could try the Publish Database Wizard.
From the link:
The source database must be on an instance of SQL Server 2005, SQL Server 2005 Express Edition, or SQL Server 2008. The target database must be on an instance of SQL Server 2000, SQL Server 2005, SQL Server 2005 Express Edition, or SQL Server 2008.
I don't think you can restore 2008 backup on 2005 server. Try 3rd party schema/data migration tool, like SQL Examiner Suite or RedGate's SQL Compare
You cannot do this. You never could restore a more recent SQL Server database to an older version.
Your only option is to script out the data you need to insert, or use a data comparison tool like Red-Gate SQL Data Compare to compare the two databases (and update your older one from the newer). SQL Data Compare will also work comparing a backup (any version) to a live database on a server.
It's easier than that, since (assuming your db isn't using any 2008-only features) they use the same format (*.mdf). Simply detach your database from your 2008 server, copy the mdf file to the 2005 server, and attach the copy to the 2005 server. Look for the Attach/Detach option when you right click on a database in sql server management studio.
Can you import (or migrate) SQL Server 2005 databases to SQL Server 2008?
Is it possible to have the same 2005 and 2008 running on the same machine without complications?
Yes. You can restore a backup from SQL 2005 in SQL 2008. You can also have instances of both on the same machine.
Edit: This question has been asked before (more or less). See here
Yes, and Yes.
The fastest way to move from one to the other that I have found is just to do a backup from SQL 2005 and a restore to SQL 2008.
I have both running side-by-side on my dev box without issue.