question

Håkan Winther avatar image
Håkan Winther asked

Mirroring from SQL 2005 to SQL2008 R2

Are there any problem to take a backup from SQL 2005, restore the backup on both the principal and the secondary server running SQL2008R2 and activate mirroring between them. It feels like there can be problem as the SQL2005 database will be upgraded when the database is taken online (WITH RECOVER), but the mirror is not taken online. Do you have to take a backup from SQL2005, restore it on the principal, take backups from the principal and restore it on the mirror? It seems to work for most of the database, but we have got one database with inconsistency error and we suspect the issue is caused by this version differences.
sql-server-2005sql-server-2008-r2mirroring
2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Grant Fritchey avatar image Grant Fritchey ♦♦ commented ·
You guys know the drill, vote, mark, blah, blah, blah. Get it done.
0 Likes 0 ·
Håkan Winther avatar image Håkan Winther commented ·
It would have been nice to know if the corruption occured due to the different internal versions in the mirror or due to something else. It was awesome to see the page repair feature of the mirror in action.
0 Likes 0 ·
Kev Riley avatar image
Kev Riley answered
Interesting question. My understanding is that the version has to be the same, so given that the principal would be SQL2008R2, and the mirror still at SQL2005, then mirroring would fail to start. But I must admit, I'm tempted to test this, just have to try and dig out a copy of SQL2005 to install....
8 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

KenJ avatar image KenJ commented ·
Just tested it out and I had it wrong. The update of the database version does not happen as part of the restore, it happens as part of recovery after the restore. Never second guess @Håkan Winther :)
2 Likes 2 ·
Håkan Winther avatar image Håkan Winther commented ·
I doubted my experience after your comment @KenJ, so I had to try to restore a database with recovery and no recovery to make sure, and I still doubted as no one was telling you otherwise. :)
1 Like 1 ·
Håkan Winther avatar image Håkan Winther commented ·
The principal and the mirror are both SQL 2008R2, but the backup used to initialize the databases are from SQL server 2005.
0 Likes 0 ·
Kev Riley avatar image Kev Riley ♦♦ commented ·
Sorry yes, a wording issue. The server version is 2008R2, but the database version (the internal version) on the mirror will still be 2005. And when I say database version, I mean as in : http://sqlblog.com/blogs/jonathan_kehayias/archive/2009/07/28/database-version-vs-database-compatibility-level.aspx
0 Likes 0 ·
Håkan Winther avatar image Håkan Winther commented ·
You're right, as the database on the mirror is not "upgraded" in the SQL 2008R2 instance. Internally it's still sql 2005 on the mirror, but 2008 on the principal. Or will the changes in the principal be applied to the mirror?
0 Likes 0 ·
Show more comments
Håkan Winther avatar image
Håkan Winther answered
I have removed the mirroring and recreated the mirroring from the SQL 2008R2 backup to be sure that the internal version doesn't cause any issues with corruption.
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

ramesh 1 avatar image
ramesh 1 answered
To COnfigure mirroring it is adviced to have database with same edition
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.