free geoip Community Server Migration Script -- Round 3 - Jayson's Blog - jaysonKnight.com
jaysonKnight.com
A conduit to the voices inside my head.
Community Server Migration Script -- Round 3

Exciting news on the .Text to Community Server migration script; Robert McLaws came across my previous post and tapped me on the shoulder to beef up the engine for multi-blog migration scenarios so he could wrap a slick WinForms GUI wizard around it, so I’ve done just that.  From the prototypes he’s sent me, it looks very promising…who doesn’t like a sexy GUI over a command line interface, right?  The architecture of the migration engine itself is quite simple; pass it an array of .Text BlogID’s (from the blog_Config table), and it dynamically builds a corresponding DTS package for each of the BlogID’s.  The packages can either be saved to the server, or executed directly from the engine itself. 

There is only one thing that can be said about DTS…it’s f’ing fast.  I’m also equally impressed with how easy it is to dynamically generate DTS packages from code (though figuring out all the table/column mappings was the bulk of the work, and another story altogether).  I’ve posted my bits for the migration engine here (core engine is in DotTextCS.Engine.dll), though the frontend is a console app, connection properties need to be set via a standard .config file, and each user + blog needs to be manually configured via the CS admin pages before executing the utility.  See my comments here for further instructions.  Robert’s wizard will alleviate all of the manual-ness, so unless you’re feeling industrious (or have a trivial number of blogs to migrate), wait for the 1.0 release, hopefully to be posted within a couple of days, so stay tuned.


Posted Tue, Feb 15 2005 12:32 AM by Jayson Knight
comments powered by Disqus

Comments

TrackBack wrote Community Server Migration Script -- Round 2
on Tue, Feb 15 2005 9:27 AM
Robert McLaws wrote re: Community Server Migration Script -- Round 3
on Wed, Feb 16 2005 8:06 AM
Just so you guys know, I'll be changing Jayson's engine just a tad to support the wizard. I wanted to minimize the amount of database roundtrips, so I'm passing in a DataRow instead of an array of BlogIDs, and I'll be eliminating the data access code for accessing configuration values. The DotTextCS.Engine.dll file will be versioned differently and be included in the wizard package, so you won't be able to use the modified version for Jayson's console app.

BTW, the engine's code is really cool, you should pop it open in Reflector and check it out if you want to learn about how to use SQLDTS in .NET code.
Martin wrote re: Community Server Migration Script -- Round 3
on Wed, Feb 16 2005 6:01 PM
Jayson

Tried this against RC3 - it transferred 3 blogs with a few hundred entries in total and did it VERY quickly.

Thanks for all your work on this - it's enabling me to adopt CS much sooner than I expected.

Martin
jayson knight wrote re: Community Server Migration Script -- Round 3
on Thu, Feb 17 2005 12:33 AM
Not a problem :-).

There is still one outstanding issue that I'm working w/ the folks from Telligent on, but it doesn't affect the engine per se...the Web Views column in the blog admin section isn't displaying correctly, even though the correct column in CS is populated with values. It's the 2nd query mentioned in my previous post. I scoured the CS schema one more time thinking I had the wrong column, finally gave in and asked Telligent what's going on. Once I have an answer/fix, I'll work with Robery to get this incorporated into the wizard, for now it will be a seperate (simple) query you'll need to run post-migration. Thanks for your feedback, and spread the word!
jayson knight wrote re: Community Server Migration Script -- Round 3
on Thu, Feb 17 2005 1:41 AM
@All

Ken over at Telligent helped me track down the issue w/ web views in the blog admin section; it's actually getting this value from the cs_Threads.TotalViews column. So, here are the 3 queries that should be run to update these stats:

UPDATE cs_Posts
SET TotalViews = [your_db]..blog_EntryViewCount.WebCount
FROM [your_db]..blog_EntryViewCount
WHERE cs_Posts.PostID = [your_db]..blog_EntryViewCount.EntryID

UPDATE cs_Posts
SET AggViews = [your_db]..blog_EntryViewCount.AggCount
FROM [your_db]..blog_EntryViewCount
WHERE cs_Posts.PostID = [your_db]..blog_EntryViewCount.EntryID

UPDATE cs_Threads
SET TotalViews = [your_db]..blog_EntryViewCount.WebCount
FROM [your_db]..blog_EntryViewCount
WHERE cs_Threads.ThreadID = [your_db]..blog_EntryViewCount.EntryID

I'll ping Robert to see if we can get this into the wizard.
Martin wrote re: Community Server Migration Script -- Round 3
on Sat, Feb 19 2005 10:49 PM
Just download CS 1.0 and tried to run the tool to transfer my blogs over again but it doesn't seem to be working - takes virtually 0 seconds and says package has been built but it hasn't

Have there been database changes between RC3 and the final 1.0 release - has anyone got this working?
jayson knight wrote re: Community Server Migration Script -- Round 3
on Sun, Feb 20 2005 1:34 AM
@Martin

Thanks for the feedback. My first guess is that they've made a schema change to the database (i.e. my tool is looking for a column that no longer exists (!!!). I'll have to look into this later on tonight or tomorrow after I talk to the folks over at Telligent, or I might just have to figure it out on my own. I will keep you posted.
Martin wrote re: Community Server Migration Script -- Round 3
on Sun, Feb 20 2005 1:10 PM
Jayson

I tried switching release 1.0 to look at my RC3 database full of posts (thanks to your work!) and that worked fine which makes me think they've not changed the database but not certain.

Perhaps it would be good to build a bit of logging into the app so we can tell where it's falling over? - just a simple text file would help a lot.

Look forward to testing the next release

Thanks again.

Martin
jayson knight wrote re: Community Server Migration Script -- Round 3
on Mon, Feb 21 2005 7:15 AM
@ Martin

Man I hate saying this, but it works on my machine for the 1.0 release (always frustrates me as a developer to say that). That being said, I haven't scoured the DB's for changes. You're not the only one running into this problem, and I'm stumped as to why.

As far as the logging you mentioned, another fellow blogger (and dev), Robert McLaws, is working on a GUI frontend for my engine, and it'll include full logging/error reporting/etc (along with status indicators and progress bars...lotsa eye candy :-). The impression I've gotten from Robert is that he's pretty close to wrapping it up, hopefully we'll have a 1.0 release this week. I'm still shocked that Telligent hasn't written a migration tool, looks like we're gonna beat them to it. I'll contact you directly when we have the 1.0 release. Thanks for your feedback!!!
TrackBack wrote Telligent Systems -- Community Server 1.0 Released
on Mon, Feb 21 2005 11:52 AM
Michael Greth wrote re: Community Server Migration Script -- Round 3
on Tue, Feb 22 2005 4:14 PM
Hi,

unfortunately I can't get the DotTextCS app running - I get this error message

Welcome to the .Text to Community Server RC2 migration tool ALPHA.

--------------------------------------------------------------------------------
Do you want to execute the DotText to CS DTS package directly from this application or save it directly to the server?
Type 'y' to execute directly from this utility, 'n' to save the package to the server, or 'h' for help on this. y

Type 'y' to build the DotText to CS DTS package, anything else to exit: y
Now building the DotText to CS DTS packages, this may take a few minutes ...
Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
at DotTextCS.Engine.User.BuildPackages()
at DotTextCS.Engine.Main.Process()
Try building packages again? 'y', 'n'
n
--------------------------------------------------------------------
I'ts running on a German W2003 Server does this cause the issue ?
jayson knight wrote re: Community Server Migration Script -- Round 3
on Wed, Feb 23 2005 1:14 AM
@ Michael

My German is a little rusty, but is the exception basically "object not set to a reference..."? If so, double check your .config file for correct settings. Also, try answering 'n' to the first question and see if it correctly saves the packages to the server. Let me know how that goes. It's worth mentioning that Robert and I will have v 1.0 of this tool out within the next day or 2...I've played around with the betas, and the GUI he's written is pretty slick. Thanks for the feedback!
Yaheya Quazi wrote re: Community Server Migration Script -- Round 3
on Thu, Feb 24 2005 8:42 PM
I get the same error and I am running it in "English" version of Windows 2003 :)
jayson knight wrote re: Community Server Migration Script -- Round 3
on Fri, Feb 25 2005 12:04 AM
I'm unable to repro on my machines over here; double check your .config file, and make sure you are running the utility from a machine that has the SQL Server Client Tools installed on it (though the destination machine can be either local or remote)...it could be that interop is not finding the correct dll (in this case, dtspkg.dll). Let me know how it goes.
Yaheya Quazi wrote re: Community Server Migration Script -- Round 3
on Fri, Feb 25 2005 3:14 AM
I am sorry I tried several things it does not work :(
Curtis wrote re: Community Server Migration Script -- Round 3
on Sun, Feb 27 2005 2:39 AM
I'm experiencing the object reference error as well. I even tried copying the files into the Sql Server Binn directory just for kicks. Still nothing.

I can't get the GUI frontend to work either, been trying to get one of these packages to work for a couple hours. Maybe I'll try the original DTS package.
jayson knight wrote re: Community Server Migration Script -- Round 3
on Sun, Feb 27 2005 7:16 AM
Hi Curtis

I attempted to contact you directly via your blog, but it errored out.

Here's a list of quick steps to make sure you're doing for the .Text to CS migration (and sorry if I'm rehashing information you've already attempted):

- Make sure you have the SQL Server Client Tools installed on the machine you're running the utility from
- The utility was compiled against SP3 of SQL Server
- In the 'Blog URL Address' field of the wizard, make sure you're using a fully qualified web address (namely that the http:// is part of the address)

When you said that you couldn't get the GUI to work, what exactly did you mean by that?

Sorry for the troubles...this utility is working for most people, but there are a good number out there that see the same behavior. Robert and myself have been unable to repro this in our environments, which of course makes it very dificult to track down. We will be releasing a new build shortly with improved logging to attemmpt to figure out what's going on. Keep me posted, and thanks for the feedback!
jayson knight wrote re: Community Server Migration Script -- Round 3
on Sun, Feb 27 2005 7:22 AM

Copyright © :: JaysonKnight.com
External Content © :: Respective Authors

Terms of Service/Privacy Policy