Database mirroring is functionality in the SQL Server engine that reads from the transaction log and copies transactions from the principal server instance to the mirror server instance. Database mirroring can operate synchronously or asynchronously. If configured to operate synchronously, the transaction on the principal will not be committed until it is hardened to disk on the mirror. Database mirroring supports only one mirror for each principal database. Database mirroring also supports automatic failover if the principal database becomes unavailable. The mirror database is always offline in a recovering state, but you can create snapshots of the mirror database to provide read access for reporting, etc.
Log shipping is based on SQL Server Agent jobs that periodically take log backups of the primary database, copy the backup files to one or more secondary server instances, and restore the backups into the secondary database(s). Log shipping supports an unlimited number of secondary’s for each primary database.
In both cases the database is set to FULL recovery model. In regards to Database mirroring, with the Database set to this recovery mode it is recommended to take frequent log backups to truncate the size of the transaction log file. Otherwise this log files will grow very large. A Commvault SQL ida can be installed and scheduled to run such backups.
Database mirroring is preferable to log shipping in most cases, although log shipping does have the following advantages:
1. it provides backup files as part of the process
2. multiple secondary’s are supported
3. it is possible to introduce a fixed delay when applying logs to allow the secondary to be used for recovering from user error
More information about both technologies is available in SQL Server 2008 Books Online in the topics "Understanding Log Shipping" and "Overview of Database Mirroring".