insert sales..ta default values
go
以上这段代码可以正常执行
如果将insert sales..ta default values这句话的注释掉,会返回这个错误
Msg 8653, Level 16, State 1, Line 1
The query processor is unable to produce a plan for the table or view 'TA' because the table resides in a filegroup which is not online.
如果我们单独执行restore database和restore log语句。会发现两条警告信息
The roll forward start point is now at log sequence number (LSN) 25000000019700001. Additional roll forward past LSN 25000000020400001 is required to complete the restore sequence.
RESTORE DATABASE ... FILE=<name> successfully processed 8 pages in 0.036 seconds (1.736 MB/sec).
Processed 0 pages for database 'sales', file 'SGrp1Fi1_dat' on file 1.
The roll forward start point is now at log sequence number (LSN) 25000000019900001. Additional roll forward past LSN 25000000020400001 is required to complete the restore sequence.
RESTORE LOG successfully processed 0 pages in 0.003 seconds (0.000 MB/sec).
restore database时显示仍然需要roll forward到25000000020400001 ,但是log备份中的日志并没有达到/超过预期的lsn,而是在25000000019900001就结束了。
我们通过restore head对比
Log包含的最大的lsn没有办法满足之前restore database所需要的lsn...
此问题可以在SQL SERVER 2008 R2 RTM中重现