查看SQL Server 备份信息
1 RESTORE HEADERONLY FROM DISK = N'C:\Program Files\Microsoft SQL Server\MSSQL10_50.SQL2008\MSSQL\Backup\sqlnexus.bak' WITH NOUNLOAD;
BackupName BackupDescription BackupType ExpirationDate Compressed Position DeviceType UserName ServerName DatabaseName DatabaseVersion DatabaseCreationDate BackupSize FirstLSN LastLSN CheckpointLSN DatabaseBackupLSN BackupStartDate BackupFinishDate SortOrder CodePage UnicodeLocaleId UnicodeComparisonStyle CompatibilityLevel SoftwareVendorId SoftwareVersionMajor SoftwareVersionMinor SoftwareVersionBuild MachineName Flags BindingID RecoveryForkID Collation FamilyGUID HasBulkLoggedData IsSnapshot IsReadOnly IsSingleUser HasBackupChecksums IsDamaged BeginsLogChain HasIncompleteMetaData IsForceOffline IsCopyOnly FirstRecoveryForkID ForkPointLSN RecoveryModel DifferentialBaseLSN DifferentialBaseGUID BackupTypeDescription BackupSetGUID CompressedBackupSize sqlnexus-完整 数据库 备份 NULL 1 NULL 0 1 2 sa SQL2008\SQL2008 sqlnexus 661 2014-10-17 15:38:48.000 69431296 150000000090700037 150000000092500001 150000000090700037 0 2014-10-25 08:33:42.000 2014-10-25 08:33:43.000 0 0 2052 196609 100 4608 10 50 1600 SQL2008 512 75DCA85A-E60A-476D-9958-D613D288AB60 935310F3-34C5-45F1-8DE9-BC6493EBA329 Chinese_PRC_CI_AS 935310F3-34C5-45F1-8DE9-BC6493EBA329 0 0 0 0 0 0 0 0 0 0 935310F3-34C5-45F1-8DE9-BC6493EBA329 NULL SIMPLE NULL NULL Database 9F3C726B-02CF-4152-B6D8-CF2DF57F01E2 69431296
1 RESTORE filelistonly FROM DISK = N'C:\Program Files\Microsoft SQL Server\MSSQL10_50.SQL2008\MSSQL\Backup\sqlnexus.bak' WITH NOUNLOAD;
LogicalName PhysicalName Type FileGroupName Size MaxSize FileId CreateLSN DropLSN UniqueId ReadOnlyLSN ReadWriteLSN BackupSizeInBytes SourceBlockSize FileGroupId LogGroupGUID DifferentialBaseLSN DifferentialBaseGUID IsReadOnly IsPresent TDEThumbprint sqlnexus C:\Program Files\Microsoft SQL Server\MSSQL10_50.SQL2008\MSSQL\DATA\sqlnexus.mdf D PRIMARY 69206016 35184372080640 1 0 0 55E9EACD-1BE4-4FB9-8B60-AD70E71E84F6 0 0 68943872 512 1 NULL 0 00000000-0000-0000-0000-000000000000 0 1 NULL sqlnexus_log C:\Program Files\Microsoft SQL Server\MSSQL10_50.SQL2008\MSSQL\DATA\sqlnexus_log.LDF L NULL 156041216 2199023255552 2 0 0 303B3C84-6327-4836-91B2-E03D02AE97F0 0 0 0 512 0 NULL 0 00000000-0000-0000-0000-000000000000 0 1 NULL
RESTORE HEADERONLY (Transact-SQL)
http://msdn.microsoft.com/zh-cn/library/ms178536.aspx
RESTORE FILELISTONLY (Transact-SQL)
http://msdn.microsoft.com/zh-cn/library/ms173778.aspx
用于还原、恢复和管理备份的 RESTORE 语句 (Transact-SQL)