Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
SQL Server 2008
»
SQL Server 2008 Administration
»
Upgrade Database from SQL Server 2005 to 2008...
Upgrade Database from SQL Server 2005 to 2008 R2 using Restore w/StandBy
Rate Topic
Display Mode
Topic Options
Author
Message
Welsh Corgi
Welsh Corgi
Posted Monday, November 12, 2012 1:23 PM
Hall of Fame
Group: General Forum Members
Last Login: Wednesday, May 22, 2013 6:19 AM
Points: 3,833,
Visits: 4,052
I tried to restore a SQL Server 2005 Database backup to a SQL Server 2008 R2 instance and place the Database in Standby mode using the following Code.
RESTORE DATABASE BISupport
FROM DISK = 'H:\Backups\Differential\BISupport_backup_201209101029.bak'
WITH REPLACE,
STANDBY = N'F:\MSSQL\DATA\ROLLBACK_UNDO_BISupport.BAK',
MOVE 'BISupport' TO 'F:\MSSQL\Data\BISupport.mdf',
MOVE 'BISupport_log' TO 'F:\MSSQL\Log\BISupport.ldf'
I get the following error:
Msg 3180, Level 16, State 1, Line 1
This backup cannot be restored using WITH STANDBY because a database upgrade is needed. Reissue the RESTORE without WITH STANDBY.
Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.
I ran into this about 8 months ago but I can't remember what I did to get around the problem?
I want the users to be able to test and prevent them from changing the data.
Any thoughts would be greatly appreciated.
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
Post #1383849
GilaMonster
GilaMonster
Posted Monday, November 12, 2012 1:25 PM
SSC-Dedicated
Group: General Forum Members
Last Login: Today @ 1:49 AM
Points: 38,069,
Visits: 30,362
Can't be done.
In an upgrade setup, the database can only be restored with NORECOVERY or WITH RECOVERY (which ends the restore sequence)
Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild
: Discussions on DB performance with occasional diversions into recoverability
We walk in the dark places no others will enter
We stand on the bridge and no one may pass
Post #1383850
Welsh Corgi
Welsh Corgi
Posted Monday, November 12, 2012 1:29 PM
Hall of Fame
Group: General Forum Members
Last Login: Wednesday, May 22, 2013 6:19 AM
Points: 3,833,
Visits: 4,052
ok, thanks Gail.
After I restore with recovery what steps are required to upgrade other then setting the Compatibility Level?
Thanks again.
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
Post #1383852
Richard Moore-400646
Richard Moore-400646
Posted Monday, November 12, 2012 1:29 PM
SSC-Enthusiastic
Group: General Forum Members
Last Login: Yesterday @ 2:39 PM
Points: 154,
Visits: 1,252
You have to recover the database to allow the upgrade to complete. You could however immediately set the database to read-only.
Post #1383853
GilaMonster
GilaMonster
Posted Monday, November 12, 2012 1:32 PM
SSC-Dedicated
Group: General Forum Members
Last Login: Today @ 1:49 AM
Points: 38,069,
Visits: 30,362
Welsh Corgi (11/12/2012)
After I restore with recovery what steps are required to upgrade other then setting the Compatibility Level?
None are required, not even setting the compat mode is required.
You probbaly want to run a checkDB, update stats.
Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild
: Discussions on DB performance with occasional diversions into recoverability
We walk in the dark places no others will enter
We stand on the bridge and no one may pass
Post #1383854
Welsh Corgi
Welsh Corgi
Posted Monday, November 12, 2012 1:40 PM
Hall of Fame
Group: General Forum Members
Last Login: Wednesday, May 22, 2013 6:19 AM
Points: 3,833,
Visits: 4,052
ok, thanks again.
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
Post #1383860
bez7-793740
bez7-793740
Posted Thursday, November 15, 2012 3:20 PM
Forum Newbie
Group: General Forum Members
Last Login: Thursday, June 13, 2013 12:02 PM
Points: 3,
Visits: 13
So does this mean that I don't need to change compatibility to 100? I restore a 2005 db on 2008 R2 and still see compatibility is 90 in sysdatabases. Maybe I'm missing something here. I was able to run sp_dbcmptlevel 'db', '100' and the change took but now just shows blank as the Compatibility Level in the UI (db options) but shows 100 in sysdatabases.
Post #1385379
GilaMonster
GilaMonster
Posted Thursday, November 15, 2012 4:13 PM
SSC-Dedicated
Group: General Forum Members
Last Login: Today @ 1:49 AM
Points: 38,069,
Visits: 30,362
You don't have to change it. You probably want to change it to get access to all the new language options, but you don't have to if there's a reason to stay in compat mode 90.
Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild
: Discussions on DB performance with occasional diversions into recoverability
We walk in the dark places no others will enter
We stand on the bridge and no one may pass
Post #1385392
bez7-793740
bez7-793740
Posted Thursday, November 15, 2012 4:17 PM
Forum Newbie
Group: General Forum Members
Last Login: Thursday, June 13, 2013 12:02 PM
Points: 3,
Visits: 13
thanks for your reply
So is the fact that in the UI it's not showing as 2008 compatibility a problem? I'm guessing that since sysdatabases shows it correctly then it's fine?
I do want to change them all, migrating from a 2005 box to a new box with 2008. First upgrading some VMs by restoring backups, my prod change will be to detach and reattach dbs.
Post #1385395
GilaMonster
GilaMonster
Posted Friday, November 16, 2012 1:41 AM
SSC-Dedicated
Group: General Forum Members
Last Login: Today @ 1:49 AM
Points: 38,069,
Visits: 30,362
Well, sp_dbcmptlevel is deprecated, so is sysdatabases.
ALTER DATABASE ... SET COMPATIBILITY LEVEL and sys.databases.
If you're using 2005 management studio to connect, it's not able to show compat mode 100, because that's newer than the tool is.
Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild
: Discussions on DB performance with occasional diversions into recoverability
We walk in the dark places no others will enter
We stand on the bridge and no one may pass
Post #1385534
« Prev Topic
|
Next Topic »
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.