Need a great way to look at the history, contents and changes in a Subversion (SVN) Repository? Try Atlassian FishEye!
Development blog discussing configuring, building, and managing software. Including coverage of Debian Linux, .NET development projects, Perl and development tools
Thursday, March 27, 2008
Optimizing BizTalk2006 Server -- The Saga
XmlReader Objects With No Root Element and Converting them to XmlDocument Objects
I had this problem this week where I had an XmlReader object coming back from an SQL stored procedure using "FOR XML AUTO, ELEMENTS" but that XML returned was a record set and could not be converted into a XmlDocument using the '.Load(XmlReader reader)' method because of the missing root element.
Or you could just use, as I found out later, FOR XML AUTO, ELEMENTS, ROOT('ElementName') which works even better and then no messing around with C#.
SqlCommand cmd = new SqlCommand(); | |
cmd.CommandText = sQuery; | |
cmd.Connection = oConn; | |
cmd.CommandType = CommandType.Text; | |
XmlReader xmlRead = cmd.ExecuteXmlReader(); | |
| |
XPathDocument xp = new XPathDocument(xmlRead); | |
XPathNavigator xn = xp.CreateNavigator(); | |
XmlDocument xd = new XmlDocument(); | |
XmlNode root = xd.CreateElement(sRootName); | |
root.InnerXml = xn.OuterXml; | |
xd.AppendChild(root); | |
oConn.Close(); | |
return xd; |
Or you could just use, as I found out later, FOR XML AUTO, ELEMENTS, ROOT('ElementName') which works even better and then no messing around with C#.
Upgrading to Bugzilla 3.0.2 from 2.x Release
[[ Editor's Note: This post was substaintially updated on 10/08/2008 in response to much discussion with other users reading this post and performing Bugzilla upgrades under Windows. Some comments on the post have been deleted as they were refering to the old post.]]
Upgrading Bugzilla to 3.0.2 is not all that difficult with the right approach, even with Windows 2003 and ActiveState Perl.
This blog post is about upgrading customized (in some cases, extreamly customized) versions of Bugzilla from 2.x to 3.x
If you are upgrading a vanilla release of 2.x to vanilla 3.x, you should use the vanilla instructions, standard Bugzilla upgrading instructions.
The short answer is:
For my customized upgrades, I still use the "Tarball" upgrade and a copy of my MySQL database and the process is similar.
Setup
The majority of the changes to the Bugzilla database will be performed by checksetup.pl
If you have made changes to the database, for example:
These changes will break your customized Bugzilla code, reporting systems, hook scripts or whatever else -- but they will unbreak the wonderful checksetup.pl
Upgrading Bugzilla to 3.0.2 is not all that difficult with the right approach, even with Windows 2003 and ActiveState Perl.
This blog post is about upgrading customized (in some cases, extreamly customized) versions of Bugzilla from 2.x to 3.x
If you are upgrading a vanilla release of 2.x to vanilla 3.x, you should use the vanilla instructions, standard Bugzilla upgrading instructions.
The short answer is:
- Backup your installation folder,
- Replace it with the new download
- Backup your database and run checksetup.pl.
For my customized upgrades, I still use the "Tarball" upgrade and a copy of my MySQL database and the process is similar.
Setup
- Back Up Your Database
- mysqldump --opt -u bugs -p bugs > bugs.sql
- Replace Bugzilla 2.x with 3.x
- Copy your localconfig file
- Copy your data directory
- Delete 'templates'
- Run checksetup.pl
- Install all required modules
- Allow checksetup to create tables
- Cntr+C Before it does UTF-8
- Run contrib/recode.pl
- I used --charset=latin1 in Windows
- Windows does not support Encode::Detect (sad!)
- Run checksetup.pl again
- Allow UTF-8 Scripts
- Allow other database changes
The majority of the changes to the Bugzilla database will be performed by checksetup.pl
If you have made changes to the database, for example:
- Adding New Tables
- Adding New Columns To Bugzilla Tables
- Adding Relationships Between Bugzilla Tables and New Tables
- Changed Column Types on Bugzilla Tables
- Written Stored Procedures Referencing Bugzilla Tables
- Review the Bugzilla Schema changes for your upgrade
- Bugzilla Upgrade Schema Differencing Tool to see what fields and columns have changed
- I find that having a clean copy of the Bugzilla 3.x database around is helpful for some reason, so for my upgrades I use the following databases:
- 'bugs' -- Bugzilla 2.1.16 Database
- 'bugs3' -- Clean Install of Bugzilla 3.0.2
- 'bugs3up' -- My Bugzilla 2.1.16 Copy, Upgrading to Bugzilla 3.0.2
- Sometimes, I dropped the 'attachments' table from my 'bugs3up' database for testing, to speed things up
- Backing Up (With MySQLDump -- be careful!) your custom tables and dropping them before running checksetup.pl
- Remove any non-standard referential integrity constraints that you have added. These are also backed up with MySQLDump
- Use the referenced Bugzilla Upgrade Schema differencing tool to try to restore your Bugzilla 2.x database to as much of a vanilla 2.x state as possible. In some cases, I was able to restore my column types or original relationships to 2.x standards and the checksetup.pl was able to finish.
These changes will break your customized Bugzilla code, reporting systems, hook scripts or whatever else -- but they will unbreak the wonderful checksetup.pl
How To Issue A Self-Signed SSL Certificate for Microsoft IIS
Here is the Microsoft KB article with the step-by-step (mostly) instructions on how to install a self-signed SSL Certificate.
If you need a cert that will work for public access, you will need to buy a SSL Certificate from a trusted CA. Check out this SSL FAQ for more details.
If you need a cert that will work for public access, you will need to buy a SSL Certificate from a trusted CA. Check out this SSL FAQ for more details.
Monday, March 03, 2008
Windows Vista (In)Capable?
Saw a good story on ZDNet about the Windows Vista Capable branding fiasco that is currently sucking the life from Microsoft.
Another good blog post about inadequate executes in the CEO and CTO positions at big companies (all too common an issue) called "Time To Go" by the same guy about Steve Ballmer.
I could not agree more with both of these posts. Vista sucks even on good hardware. Microsoft has grossly over estimated sales, launch date and performance of the OS for customers.
I, for one, have gone back to XP -- at least all my devices have drivers and my machine is stable again.
What went wrong? I'll tell you what went wrong: Microsoft execs - starting with Steve Ballmer - don't care enough about their customers. Which is too bad for the thousands of smart, hard working 'softies who do.
Another good blog post about inadequate executes in the CEO and CTO positions at big companies (all too common an issue) called "Time To Go" by the same guy about Steve Ballmer.
Steve Ballmer may be the worst CEO among large tech companies - now that Kevin Rollins got booted from Dell and Sanjay Kumar of CA is in jail. Put him in a room with Steve Jobs of Apple, John Chambers of Cisco and Mark Hurd of HP and he'd look like the bouncer, not a peer. He just isn't in their league and Microsoft is suffering for it.
I could not agree more with both of these posts. Vista sucks even on good hardware. Microsoft has grossly over estimated sales, launch date and performance of the OS for customers.
I, for one, have gone back to XP -- at least all my devices have drivers and my machine is stable again.
Subscribe to:
Posts (Atom)