Wednesday 29 September 2010

SharePoint 2010 Upgrade - SQL 2008 DB attach error

Yes, finally I was ready to move some of my MOSS 2007 SharePoint sites to the SharePOint 2010 test environment after days of playing on the new ground. I choose the Database attach method. As a first step I made sure that I have SP 2 and October 2009 CU on my MOSS 2007 and ran the

stsadm.exe -o preupgradecheck

This step is very important don't skip it. After making sure all components of my MOSS 2007 will get migrated to SP 2010 farm. I detached the database from MOSS 2007 Database server and moved it over to SP 2010 database server, the database server is SQL 2008. Everything was smooth till this point. The moment I tried to attach the MOSS 2007 content database, I received an error  as shown below. I checked my permissions on the database server and found nothing wrong.


Later I realized that this is a bug with SQL management studio and I need to use TSQL to attach the database


USE [master]
GO
CREATE DATABASE [WSS_Content_Databasename] ON
( FILENAME = N'E:\MSSQL\MSSQLSERVER.DB\Data01\WSS_Content_databasename.mdf' ),
( FILENAME = N'E:\MSSQL\MSSQLSERVER.DB\Data01\WSS_Content_databasename_log.LDF' )
 FOR ATTACH
GO
if exists (select name from master.sys.databases sd where name = N'WSS_Content_databasename' and SUSER_SNAME(sd.owner_sid) = SUSER_SNAME() ) EXEC [WSS_Content_databasename].dbo.sp_changedbowner @loginame=N'sa', @map=false
GO

Database attach went through fine after this and I had my first site migrated to SharePoint 2010 :-)

14 comments:

Anonymous said...

Отличная статья! большое спасибо автору за интересный материал. Удачи в развитии!!! :)
--
http://www.miriadafilms.ru/
[url=http://mpeg4.com.ru/index.shtml]Детективы скачать[/url]

Anonymous said...

You forgot Andrew Jackson’s Big Block of Cheese with nary a macaroni in sight.

Anonymous said...

What do you think about adding some more images? I’m not trying to offend anyone, blog is really great. Just as I know people acquire info much more efficient when there are certain useful images.

Stacy Drawledge
jamming cell

Anonymous said...

Почему регистрация не работает ?

Anonymous said...

Damn, rather cool post. How will I find this subscription?

Mary Stepman
new york city escorts

Anonymous said...

Il semble que vous soyez un expert dans ce domaine, vos remarques sont tres interessantes, merci.

- Daniel

Anonymous said...

A single-lens reflex [url=http://www.digitalslrcamerabuyingguide.com/](SLR)[/url] camera is a camera that typically uses a semi-automatic moving mirror system that permits the photographer to see exactly what will be captured by the film or digital imaging system (after a very small delay),
as opposed to pre- [url=http://www.digitalslrcamerabuyingguide.com/]digital SLR cameras[/url] where the view through the viewfinder could be significantly different from what was captured on film.
(The Canon Pellix film camera was an exception wherein the mirror was a fixed beamsplitting pellicle.)

Anonymous said...

not so sure about that..

Anonymous said...

This design is incrеԁіble! You obviously knοω hoω to keep а гeader аmused.
Betweеn youг wіt and your videos, I was almoѕt moved
to stаrt my own blog (ωell, аlmost.
..HaHа!) Fantastic job. I rеаlly lovеd what you had to say, and morе than that, how you рresented іt.
Toο cool!

Μy blog :: best form of acne treatment

Anonymous said...

Whаt a matеriаl of un-ambiguіty and preservenesѕ of valuаblе κnow-how οn the topic of unexpected
еmotions.

Mу web-site rdsocial.com

Anonymous said...

Τhank you foг the аuѕpіciοus
writeuρ. It іn fаct used tο
be a amusement acсount it. Glance advanсеd tο far introduced agreeable fгom you!
Bу the way, hоω сan wе
cοmmunіcаte?

Аlso viѕіt my websіtе personal Chat rooms

Anonymous said...

Hi thегe to every single one, it's actually a nice for me to go to see this web site, it consists of useful Information.

my blog - Premature Ejaculation Techniques

Anonymous said...

oZzy moved away earlier, I miss his cock, that i'm always hungry for sex.
FUCK MY PUSSY!

My webpage ... hcg injections

Anonymous said...

There aren't many web sites with information like this man! Bookmarked!

My web site - why am i not getting pregnant