14.3. Performing the Migration: Can I Get My Hands Dirty Now?
Stsadm.exe, Osql.exe, and Sqlcmd.exe: are you friends
If you haven't become familiar with these three command-line executables, you should. They have a lot of options and capabilities that involve managing SharePoint, and there are situations where they are the only means of performing necessary tasks (for example, when migrating databases that need to be upgraded into new SharePoint instances).
Stsadm.exe is your SharePoint administration command-line utility. It will be used to merge databases and perform certain administrative tasks that cannot be handled from the GUI. This utility is covered in Chapter 13, "STSADM: A Look at the SharePoint Command-Line Tool."
Osql.exe is the ...