Restore SQL Server 2008 R2 transaction logs to SQL Server 2005 - sql

If I have SQL Server 2008R2 compatibility 90 production database and a SQL Server 2005 dev database.
Can I restore transaction logs from production to dev? Transaction logs restore from SQL Server 2008 R2 compatibility 90 to SQL Server 2005?

No, you cannot restore from newer versions to olders versions of sql server. The compatibility level of the database doesn't affect the on-disk structures. For example, you can use page and row compression (sql 2008 features) in a database that is in 90 compat mode.

Related

Supported versions in SQL Server 2014?

Does SQL Server 2014 support lower versions of databases? Can I open and modify a database created by a lower version of SQL Server?
You can restore and/or attach a database from a lower version of SQL Server (2005 or newer - 2000 no longer supported) to SQL Server 2014 - yes, no problem.
But once it has been attached/restored, it becomes a SQL Server 2014 database - the internal file structures of the .mdf and other files are upgraded to SQL Server 2014 level, and you can never "go back" (e.g. you cannot backup from SQL Server 2014 and then restore in earlier versions)

Can you replicate from SQL Server 2012 to 2008 R2

Quick question: can you replicate a database from SQL Server 2012 to 2008 R2?
We currently have a push transactional replication setup from a SQL Server 2008 R2 database (publisher) to another 2008 R2 (subscriber). The publisher is controlled by a partner organisation that we work closely with, but we have little control over their infrastructure (other than the replication).
Our partner is upgrading their infrastructure to SQL Server 2012 - and as such we need to know if we will be forced to upgrade all or part of our solution to 2012 to follow suit.
Do we need to upgrade our subscriber SQL Server to 2012, or can we leave it as 2008 R2 and somehow configure it to subscribe to a 2012 replication?
Any information and/or references would be appreciated. We're in the process of coming up with a migration plan.
You can keep your 2008R2 subscriber, as long as the distributor and the publisher are one and the same instance (and it seems that they are, since you're running a push trans replication). Quote from here:
A Subscriber to a transactional publication can be any version within two versions of the Publisher version. For example: a SQL Server 2005 Publisher can have Subscribers running SQL Server 2005, SQL Server 2008 (including SQL Server 2008 R2), or SQL Server 2012; and a SQL Server 2012 Publisher can have Subscribers running SQL Server 2005, SQL Server 2008 (including SQL Server 2008 R2), or SQL Server 2012.
Probably you will have to reinitialize your subscription once the publisher upgrade is done. it would be preferable to not use any 2012 specific features or even to run the publisher database in 2008 compatibility mode.
2 versions back SQL replication:
8.0 for SQL Server 2000.
9.0 for SQL Server 2005.
10.0 for SQL Server 2008.
10.5 for SQL Server 2008 R2.
11.0 for SQL Server 2012.
12.0 for SQL Server 2014.
13.0 for SQL Server 2016

How to automatically restore a SQL Server 2008 R2 backup file

My team needs to update an automated content process running over SQL Server 2008 servers to include the content of a SQL Server 2008 R2 database delivered by a third-party vendor.
The request to third-party to deliver us on SQL Server 2008 is NOT an option.
My common sense indicates there is no way to downgrade from 2k8 R2 to 2k8 as in most of the software products I know. However, I'm wondering if I would be able to do something like this in a script:
Restore SQL Server 2008 R2 .bak file onto our SQL Server 2008 R2 instance
Update compatiblity level to SQL Server 2008 (100). Here is the bug in my plan: I've not found any compatiblity level distinctions between 2008 versions in internet. Any clue on this?
Backup the database.
Restore the database in SQL Server 2008
There may be some other ideas you may want to share with me.
Just recall there should not be manual intervention on this database conversion since this operation needs to be incorporated to an automated process.
Any help/suggestions/comments will be welcome!
No, you cannot restore a database backwards, regardless of compatibility level. Compatibility level affects certain database engine behaviors, but does not downgrade the database version. You will never be able to restore onto 2008 a database that ever existed in a 2008 R2 instance.
For workarounds, you can:
restore the database on R2, then use the import/export data wizard (or a third party tool) to transfer schema / data to the 2008 instance (and you should be able to automate this to some extent, e.g. Red-Gate's tools have command-line interfaces)
upgrade your 2008 servers to 2008 R2 or 2012
push back on the vendor
By design, you can only restore a DB backup to the same or newer version of SQL Server. A backup created with SQL Server 2008 R2 can only be restored with SQL Server 2008 R2 or SQL Server 2012. This is regardless of the compatibility level of the database. It's a limitation of the backup and restore procedures. This has been a limitation since prior to SQL Server 2000 (i.e., every version I've ever used).
Maybe you can script out the creation of new database, instead of backing up and restoring you basically just do a data dump with script.
Try looking at this How can I get a SQL dump of a SQL Server 2008 database?

SQL Server engine or stand-alone

I begin release my applications in the city. I have a question, :
Which is better and why, for a local target system database ?
SQL Server Engine or for ex. SQL Server Express Edition ?
Depends on your needs, the SQL Express doesn't support the SQL server engine to start with the MSSQL Server.
I'll Explain a bit, If you have SQL express 2008 or 2012 you cant run the SQL jobs for example the Automatic backup, cleanup or any other job that you would like to run on the SQL server automatically.
The SQL Server 2008 R2 Express Database Size Limit Increased to 10GB, if you have bigger then 10GB database then you need to think of having the SQL server enterprise or web edition.
SQL Server 2008 R2 Express is still limited to 1 CPU and 1 GB or RAM.
Mirroring is not supported on SQL Express, and you cant have the SQL Server Profiler.
If you think you need more then 10GB database and more then 1CPU parallelism with SQL scheduler jobs then you should consider moving to SQL server enterprise edition or Web edition.
Regards,
Gabriel

I have SQL Server 2008 R2 installed (shows that splash when I open Management Studio) but DB engine is 2005 express?

I am trying to restore a backup of a SQL Server 2008 database - but my engine is SQL Server 2005 Express. When I try and choose a different in the Management studio login, there is nothing BUT my SQL Server Express.
Now I am getting the RESTORE HEADERONLY is terminating abnormally on a 4+ GB DB that I need to restore.
Has anyone seen this? I am sure I installed SQL Server 2008 R2 (that's why I see it when I open the Management studio) ...so why do I only have SQL Server 2005 Express engine?
Thanks!
todd
It sounds like you only have the SQL Server 2008 R2 client tools installed. You will see the SQL Server 2008 R2 information on SSMS, but that doesn't indicate whether any server is installed.
I assume that SQL Server 2005 Express was installed already.
Of course, as you're seeing, the restore of a SQL Server 2008 backup will fail on the 2005 Express server.
You will probably have to install SQL Server 2008 R2 server again to get it installed. There are certain minimum requirements to install the server. I'm not positive, but I think if your computer doesn't meet the requirements, the install will automatically install client tools only.