> That said, I'm hoping to make another attempt at upgrading to CF
> 4.5.1 / Win2k.  My beloved baby (a *very* stable, *very* profitable
> server) must unfortunately be moved off-site for better bandwidth,
> and I'd REALLY like to have Win2k on that box so I can TermServe in
> if necessary, etc.  I'm more than a little apprehensive at trying
> this again seeing as last time cost us a week of downtime, but....
> It's a necessary evil I'm afraid.

I like Win2K a lot, but if you're only upgrading so you can use Terminal
Server to remotely manage the box, save yourself a lot of time, and buy any
one of the remote control packages (pcAnywhere, etc) or just use VNC! I'd be
extremely reluctant to rebuild a working production server unless there's a
required functionality upgrade; for example, you just can't live without the
new CFWHATEVER tag.

> 2a) Assuming that my nvarchar's are indeed the source of my trouble
> (o/~ Nobody knows the troubles I've seen... ~\o), then I'm stuck with
> several very large, very sensitive, very I'm-dead-if-I-screw-this-up
> kind of databases on my hands.  And of course, said databases have
> TONs of potentially ColdFusion offending Unicode fields.  Going
> through all of the DB's and changing nvarchar to varchar in
> Enterprise Manager doesn't sound like my idea of a fun or employment
> preserving task.  Especially since EM (in it's infinite wisdom)
> attempts to truncate the field length to 50 every time you change
> from nvarchar to varchar.  All I need to do is mess *one* of those up
> by saving the table without resetting the proper field length, and
> I'll only *wish* I was a dead man.
>
> 2b) So...  Are there any utilities, SQL scripts, scrolls of magical
> spells, etc. out there that can go through a database and change all
> fields from one datatype to another without changing the field
> length?  Has anyone else in my unfortunate position been compelled to
> write such a beast?  It sounds technically simple (look in sysobjects
> for all user tables, get their description w/ sp_help, then construct
> an ALTER TABLE statement to properly change the field types, rejoice
> and enjoy much cf_beer), but my brain is a little too.... fried (This
> is your brain on CF.  Any questions?) to produce such a miraculous
> bit of code at the moment.  So can anyone help me out?

This is a job for ERWin, or another database design front end. They let you
manage changes to database schemas without losing data, corrupting
databases, etc. These tools are expensive, but they're worth every penny
when you're faced with something like this.

Alternatively, since you sound like the do-it-yourself type, you could
generate an SQL script, do a search-and-replace across the script, create an
entirely new database, run the script to create your database objects, then
use DTS to copy from the old to the new database. Switch the app to the new
database, and pray!

Finally, if at all possible, DO THIS IN A NON-PRODUCTION ENVIRONMENT! Don't
screw with your working servers! It sounds like you might not have a choice
about this - if you don't, you should tell your boss exactly what kind of
mess he's getting into. You probably already know all this, but it's still
worth reiterating.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to