我使用SQL Server 2008R2
和2012
并拥有完全恢复模式的多数据库(用于支持cdc和复制)。我有这些数据库的备份计划。
我的日志文件增加到20GB。我想缩小我的日志文件。
缩小计划日志数据库文件的最佳做法是什么。
修改
我使用DBCC LogInfo命令访问虚拟日志文件。 该命令的结果如下:
FileId FileSize StartOffset FSeqNo Status Parity CreateLSN
2 2031616 8192 153091 0 128 0
2 2031616 2039808 152944 0 128 0
2 262144 4071424 152915 0 64 146379000000337400143
2 262144 4333568 152916 0 64 146379000000337400143
2 262144 4595712 152917 0 64 146379000000337400143
2 516096 4857856 152918 0 64 146379000000337400143
2 393216 5373952 152903 0 128 146384000000338800478
2 393216 5767168 152904 0 128 146384000000338800478
2 393216 6160384 152905 0 128 146384000000338800478
2 458752 6553600 152906 0 128 146384000000338800478
2 524288 7012352 152907 0 128 146388000000028800472
2 524288 7536640 152908 0 128 146388000000028800472
2 524288 8060928 152909 0 128 146388000000028800472
2 524288 8585216 152910 0 128 146388000000028800472
2 655360 9109504 152911 0 128 146392000000047200118
2 655360 9764864 152912 0 128 146392000000047200118
2 655360 10420224 152913 0 128 146392000000047200118
2 786432 11075584 152914 0 128 146392000000047200118
2 851968 11862016 152919 0 64 146419000000023700103
2 851968 12713984 152920 0 64 146419000000023700103
2 851968 13565952 152921 0 64 146419000000023700103
2 1048576 14417920 152922 0 64 146419000000023700103
2 1114112 15466496 152923 0 64 146423000000167600012
2 1114112 16580608 152924 0 64 146423000000167600012
2 1114112 17694720 152925 0 64 146423000000167600012
2 1310720 18808832 152926 0 64 146423000000167600012
2 1507328 20119552 152927 0 64 146427000000209100022
2 1507328 21626880 152929 0 64 146427000000209100022
2 1507328 23134208 152930 0 64 146427000000209100022
2 1507328 24641536 152931 0 64 146427000000209100022
2 1966080 26148864 152932 0 64 146431000000257900016
2 1966080 28114944 152933 0 64 146431000000257900016
2 1966080 30081024 152934 0 64 146431000000257900016
2 1966080 32047104 152935 0 64 146431000000257900016
2 2555904 34013184 152898 0 128 146435000000336700424
2 2555904 36569088 152899 0 128 146435000000336700424
2 2555904 39124992 152901 0 128 146435000000336700424
2 2555904 41680896 152902 0 128 146435000000336700424
2 3276800 44236800 152936 0 128 146473000000341700024
2 3276800 47513600 152937 0 128 146473000000341700024
2 3276800 50790400 152938 0 128 146473000000341700024
2 3473408 54067200 152897 0 64 146473000000341700024
2 4325376 57540608 152939 0 64 146518000000553000011
2 4325376 61865984 152940 0 64 146518000000553000011
2 4325376 66191360 152941 0 64 146518000000553000011
2 4325376 70516736 152942 0 64 146518000000553000011
2 5570560 74842112 152943 0 64 146522000000736300005
2 5570560 80412672 152945 0 64 146522000000736300005
2 5570560 85983232 152946 0 64 146522000000736300005
2 5767168 91553792 152947 0 64 146522000000736300005
2 7274496 97320960 152948 0 64 146526000001000500002
2 7274496 104595456 152949 0 64 146526000001000500002
2 7274496 111869952 152950 0 64 146526000001000500002
2 7405568 119144448 152952 0 64 146526000001000500002
2 9502720 126550016 152953 0 64 146530000001289300001
2 9502720 136052736 152954 0 64 146530000001289300001
2 9502720 145555456 152888 0 128 146530000001289300001
2 9502720 155058176 152889 0 128 146530000001289300001
2 12320768 164560896 152890 0 128 146534000001656400002
2 12320768 176881664 152891 0 128 146534000001656400002
2 12320768 189202432 152892 0 128 146534000001656400002
2 12451840 201523200 152894 0 128 146534000001656400002
2 16056320 213975040 152895 0 128 146538000002183200001
2 8585216 230031360 152955 0 128 152524000000193600502
2 8585216 238616576 152956 0 128 152524000000193600502
2 8585216 247201792 152957 0 128 152524000000193600502
2 8585216 255787008 152872 0 64 152524000000193600502
2 8585216 264372224 152873 0 64 152524000000193600502
2 8585216 272957440 152874 0 64 152524000000193600502
2 8585216 281542656 152875 0 64 152524000000193600502
2 8912896 290127872 152876 0 64 152524000000193600502
2 11206656 299040768 152877 0 64 152526000001333600502
2 11206656 310247424 152878 0 64 152526000001333600502
2 11206656 321454080 152879 0 64 152526000001333600502
2 11206656 332660736 152881 0 64 152526000001333600502
2 11206656 343867392 152882 0 64 152526000001333600502
2 11206656 355074048 152884 0 64 152526000001333600502
2 11206656 366280704 152885 0 64 152526000001333600502
2 11272192 377487360 152886 0 64 152526000001333600502
2 14548992 388759552 152958 0 64 152608000001573600502
2 14548992 403308544 152959 0 64 152608000001573600502
2 14548992 417857536 152960 0 64 152608000001573600502
2 14548992 432406528 152961 0 64 152608000001573600502
2 14548992 446955520 152962 0 64 152608000001573600502
2 14548992 461504512 152963 0 64 152608000001573600502
2 14548992 476053504 152964 0 64 152608000001573600502
2 14811136 490602496 152965 0 64 152608000001573600502
2 18939904 505413632 152967 0 64 152611000002149600502
2 18939904 524353536 152968 0 64 152611000002149600502
2 18939904 543293440 152970 0 64 152611000002149600502
2 18939904 562233344 152971 0 64 152611000002149600502
2 18939904 581173248 152972 0 64 152611000002149600502
2 18939904 600113152 152973 0 64 152611000002149600502
2 18939904 619053056 152974 0 64 152611000002149600502
2 19070976 637992960 152975 0 64 152611000002149600502
2 24641536 657063936 152976 0 64 152615000001117600502
2 24641536 681705472 152978 0 64 152615000001117600502
2 24641536 706347008 152979 0 64 152615000001117600502
2 24641536 730988544 152980 0 64 152615000001117600502
2 24641536 755630080 152981 0 64 152615000001117600502
2 24641536 780271616 152982 0 64 152615000001117600502
2 24641536 804913152 152852 0 128 152615000001117600502
2 24641536 829554688 152853 0 128 152615000001117600502
2 31981568 854196224 152854 0 128 152619000001417600502
2 31981568 886177792 152855 0 128 152619000001417600502
2 31981568 918159360 152856 0 128 152619000001417600502
2 31981568 950140928 152857 0 128 152619000001417600502
2 31981568 982122496 152859 0 128 152619000001417600502
2 31981568 1014104064 152860 0 128 152619000001417600502
2 31981568 1046085632 152861 0 128 152619000001417600502
2 32440320 1078067200 152862 0 128 152619000001417600502
2 41615360 1110507520 152863 0 128 152624000000385600502
2 41615360 1152122880 152864 0 128 152624000000385600502
2 41615360 1193738240 152865 0 128 152624000000385600502
2 41615360 1235353600 152867 0 128 152624000000385600502
2 41615360 1276968960 152868 0 128 152624000000385600502
2 41615360 1318584320 152869 0 128 152624000000385600502
2 41615360 1360199680 152870 0 128 152624000000385600502
2 41877504 1401815040 152871 0 128 152624000000385600502
2 54132736 1443692544 152983 0 128 152752000004775600060
2 54132736 1497825280 152985 0 128 152752000004775600060
2 54132736 1551958016 152987 0 128 152752000004775600060
2 54132736 1606090752 152988 0 128 152752000004775600060
2 54132736 1660223488 152989 0 128 152752000004775600060
2 54132736 1714356224 152990 0 128 152752000004775600060
2 54132736 1768488960 152992 0 128 152752000004775600060
2 54198272 1822621696 152994 0 128 152752000004775600060
2 70385664 1876819968 152995 0 128 152760000010400600001
2 70385664 1947205632 152997 0 128 152760000010400600001
2 70385664 2017591296 152998 0 128 152760000010400600001
2 70385664 2087976960 152999 0 128 152760000010400600001
2 70385664 2158362624 153000 0 128 152760000010400600001
2 70385664 2228748288 153001 0 128 152760000010400600001
2 70385664 2299133952 153003 0 128 152760000010400600001
2 70385664 2369519616 153005 0 128 152760000010400600001
2 91488256 2439905280 153007 0 128 152768000012875400005
2 91488256 2531393536 153009 0 128 152768000012875400005
2 91488256 2622881792 153011 0 128 152768000012875400005
2 91488256 2714370048 153013 0 128 152768000012875400005
2 91488256 2805858304 153015 0 128 152768000012875400005
2 91488256 2897346560 153016 0 128 152768000012875400005
2 91488256 2988834816 153017 0 128 152768000012875400005
2 91553792 3080323072 153018 0 128 152768000012875400005
2 118947840 3171876864 153019 0 128 152776000017490400003
2 118947840 3290824704 153020 0 128 152776000017490400003
2 118947840 3409772544 153021 0 128 152776000017490400003
2 118947840 3528720384 153022 0 128 152776000017490400003
2 118947840 3647668224 153023 0 128 152776000017490400003
2 118947840 3766616064 153024 0 128 152776000017490400003
2 118947840 3885563904 153025 0 128 152776000017490400003
2 118947840 4004511744 153026 0 128 152776000017490400003
2 77266944 4123459584 153027 0 128 152784000022608500002
2 77266944 4200726528 153028 0 128 152784000022608500002
2 77266944 4277993472 153029 0 128 152784000022608500002
2 77266944 4355260416 153030 0 128 152784000022608500002
2 77266944 4432527360 153031 0 128 152784000022608500002
2 77266944 4509794304 153032 0 128 152784000022608500002
2 77266944 4587061248 153033 0 128 152784000022608500002
2 77266944 4664328192 153034 0 128 152784000022608500002
2 77266944 4741595136 153035 0 128 152784000022608500002
2 77266944 4818862080 153036 0 128 152784000022608500002
2 77266944 4896129024 153037 0 128 152784000022608500002
2 77266944 4973395968 153038 0 128 152784000022608500002
2 77266944 5050662912 153039 0 128 152784000022608500002
2 77266944 5127929856 153040 0 128 152784000022608500002
2 77266944 5205196800 153041 0 128 152784000022608500002
2 78053376 5282463744 153042 0 128 152784000022608500002
2 100466688 5360517120 153043 0 128 152800000015038900006
2 100466688 5460983808 153044 0 128 152800000015038900006
2 100466688 5561450496 153045 0 128 152800000015038900006
2 100466688 5661917184 153046 0 128 152800000015038900006
2 100466688 5762383872 153047 0 128 152800000015038900006
2 100466688 5862850560 153048 0 128 152800000015038900006
2 100466688 5963317248 153049 0 128 152800000015038900006
2 100466688 6063783936 153050 0 128 152800000015038900006
2 100466688 6164250624 153051 0 128 152800000015038900006
2 100466688 6264717312 153052 0 128 152800000015038900006
2 100466688 6365184000 153053 0 128 152800000015038900006
2 100466688 6465650688 153054 0 128 152800000015038900006
2 100466688 6566117376 153055 0 128 152800000015038900006
2 100466688 6666584064 153056 0 128 152800000015038900006
2 100466688 6767050752 153057 0 128 152800000015038900006
2 101187584 6867517440 153058 0 128 152800000015038900006
2 130613248 6968705024 153059 0 128 152816000019449900004
2 130613248 7099318272 153060 0 128 152816000019449900004
2 130613248 7229931520 153061 0 128 152816000019449900004
2 130613248 7360544768 153062 0 128 152816000019449900004
2 130613248 7491158016 153063 0 128 152816000019449900004
2 130613248 7621771264 153064 0 128 152816000019449900004
2 130613248 7752384512 153065 0 128 152816000019449900004
2 130613248 7882997760 153066 0 128 152816000019449900004
2 130613248 8013611008 153068 0 128 152816000019449900004
2 130613248 8144224256 153069 0 128 152816000019449900004
2 130613248 8274837504 153070 0 128 152816000019449900004
2 130613248 8405450752 153071 0 128 152816000019449900004
2 130613248 8536064000 153072 0 128 152816000019449900004
2 130613248 8666677248 153073 0 128 152816000019449900004
2 130613248 8797290496 153074 0 128 152816000019449900004
2 131465216 8927903744 153076 0 128 152816000019449900004
2 169803776 9059368960 153077 0 128 152832000025629200065
2 169803776 9229172736 153078 0 128 152832000025629200065
2 169803776 9398976512 153079 0 128 152832000025629200065
2 169803776 9568780288 153080 0 128 152832000025629200065
2 169803776 9738584064 153081 0 128 152832000025629200065
2 169803776 9908387840 153082 0 128 152832000025629200065
2 169803776 10078191616 153084 0 128 152832000025629200065
2 169803776 10247995392 153086 0 128 152832000025629200065
2 169803776 10417799168 153088 0 128 152832000025629200065
2 169803776 10587602944 153090 0 128 152832000025629200065
2 169803776 10757406720 153092 2 128 152832000025629200065
2 169803776 10927210496 152845 0 64 152832000025629200065
2 169803776 11097014272 152846 0 64 152832000025629200065
2 169803776 11266818048 152847 0 64 152832000025629200065
2 169803776 11436621824 152848 0 64 152832000025629200065
2 170786816 11606425600 152850 0 64 152832000025629200065
大多数虚拟文件的状态为0.我希望SQL Server使用状态为0的虚拟文件而不是创建新的虚拟文件。
编辑2
我将数据库的自动增长更改为250MB,初始大小更改为2000MB。但我的数据库大小在12小时内增长到5000MB。 DBCC Loginfo
命令的结果如下。
如何控制数据库日志文件的大小。
FileId FileSize StartOffset FSeqNo Status Parity CreateLSN
2 2031616 8192 154016 0 128 0
2 2031616 2039808 154017 0 128 0
2 262144 4071424 153848 0 128 146379000000337400143
2 262144 4333568 153849 0 128 146379000000337400143
2 262144 4595712 153850 0 128 146379000000337400143
2 516096 4857856 153851 0 128 146379000000337400143
2 393216 5373952 153836 0 64 146384000000338800478
2 393216 5767168 153837 0 64 146384000000338800478
2 393216 6160384 153838 0 64 146384000000338800478
2 458752 6553600 153839 0 64 146384000000338800478
2 524288 7012352 153840 0 64 146388000000028800472
2 524288 7536640 153841 0 64 146388000000028800472
2 524288 8060928 153842 0 64 146388000000028800472
2 524288 8585216 153843 0 64 146388000000028800472
2 655360 9109504 153844 0 64 146392000000047200118
2 655360 9764864 153845 0 64 146392000000047200118
2 655360 10420224 153846 0 64 146392000000047200118
2 786432 11075584 153847 0 64 146392000000047200118
2 851968 11862016 153852 0 128 146419000000023700103
2 851968 12713984 153853 0 128 146419000000023700103
2 851968 13565952 153854 0 128 146419000000023700103
2 1048576 14417920 153855 0 128 146419000000023700103
2 1114112 15466496 153856 0 128 146423000000167600012
2 1114112 16580608 153857 0 128 146423000000167600012
2 1114112 17694720 153858 0 128 146423000000167600012
2 1310720 18808832 153859 0 128 146423000000167600012
2 1507328 20119552 153860 0 128 146427000000209100022
2 1507328 21626880 153861 0 128 146427000000209100022
2 1507328 23134208 153862 0 128 146427000000209100022
2 1507328 24641536 153863 0 128 146427000000209100022
2 1966080 26148864 153864 0 128 146431000000257900016
2 1966080 28114944 153865 0 128 146431000000257900016
2 1966080 30081024 153866 0 128 146431000000257900016
2 1966080 32047104 153867 0 128 146431000000257900016
2 2555904 34013184 153832 0 64 146435000000336700424
2 2555904 36569088 153833 0 64 146435000000336700424
2 2555904 39124992 153834 0 64 146435000000336700424
2 2555904 41680896 153835 0 64 146435000000336700424
2 3276800 44236800 153868 0 64 146473000000341700024
2 3276800 47513600 153869 0 64 146473000000341700024
2 3276800 50790400 153870 0 64 146473000000341700024
2 3473408 54067200 153831 0 128 146473000000341700024
2 4325376 57540608 153871 0 128 146518000000553000011
2 4325376 61865984 153872 0 128 146518000000553000011
2 4325376 66191360 153873 0 128 146518000000553000011
2 4325376 70516736 153874 0 128 146518000000553000011
2 5570560 74842112 153875 0 128 146522000000736300005
2 5570560 80412672 153876 0 128 146522000000736300005
2 5570560 85983232 153877 0 128 146522000000736300005
2 5767168 91553792 153878 0 128 146522000000736300005
2 7274496 97320960 153879 0 128 146526000001000500002
2 7274496 104595456 153880 0 128 146526000001000500002
2 7274496 111869952 153881 0 128 146526000001000500002
2 7405568 119144448 153882 0 128 146526000001000500002
2 9502720 126550016 153883 0 128 146530000001289300001
2 9502720 136052736 153884 0 128 146530000001289300001
2 9502720 145555456 153824 0 64 146530000001289300001
2 9502720 155058176 153825 0 64 146530000001289300001
2 12320768 164560896 153826 0 64 146534000001656400002
2 12320768 176881664 153827 0 64 146534000001656400002
2 12320768 189202432 153828 0 64 146534000001656400002
2 12451840 201523200 153829 0 64 146534000001656400002
2 16056320 213975040 153830 0 64 146538000002183200001
2 8585216 230031360 153885 0 64 152524000000193600502
2 8585216 238616576 153886 0 64 152524000000193600502
2 8585216 247201792 153887 0 64 152524000000193600502
2 8585216 255787008 154003 0 64 152524000000193600502
2 8585216 264372224 154004 0 64 152524000000193600502
2 8585216 272957440 154005 0 64 152524000000193600502
2 8585216 281542656 154006 0 64 152524000000193600502
2 8912896 290127872 154007 0 64 152524000000193600502
2 11206656 299040768 153816 0 128 152526000001333600502
2 11206656 310247424 153817 0 128 152526000001333600502
2 11206656 321454080 153818 0 128 152526000001333600502
2 11206656 332660736 153819 0 128 152526000001333600502
2 11206656 343867392 153820 0 128 152526000001333600502
2 11206656 355074048 153821 0 128 152526000001333600502
2 11206656 366280704 153822 0 128 152526000001333600502
2 11272192 377487360 153823 0 128 152526000001333600502
2 14548992 388759552 153888 0 128 152608000001573600502
2 14548992 403308544 153889 0 128 152608000001573600502
2 14548992 417857536 153890 0 128 152608000001573600502
2 14548992 432406528 153891 0 128 152608000001573600502
2 14548992 446955520 153892 0 128 152608000001573600502
2 14548992 461504512 153893 0 128 152608000001573600502
2 14548992 476053504 153894 0 128 152608000001573600502
2 14811136 490602496 153895 0 128 152608000001573600502
2 18939904 505413632 153896 0 128 152611000002149600502
2 18939904 524353536 153897 0 128 152611000002149600502
2 18939904 543293440 153988 0 128 152611000002149600502
2 18939904 562233344 153989 0 128 152611000002149600502
2 18939904 581173248 153990 0 128 152611000002149600502
2 18939904 600113152 153991 0 128 152611000002149600502
2 18939904 619053056 153992 0 128 152611000002149600502
2 19070976 637992960 153993 0 128 152611000002149600502
2 24641536 657063936 153994 0 128 152615000001117600502
2 24641536 681705472 153995 0 128 152615000001117600502
2 24641536 706347008 153996 0 128 152615000001117600502
2 24641536 730988544 153997 0 128 152615000001117600502
2 24641536 755630080 153998 0 128 152615000001117600502
2 24641536 780271616 153999 0 128 152615000001117600502
2 24641536 804913152 154000 0 128 152615000001117600502
2 24641536 829554688 154001 0 128 152615000001117600502
2 31981568 854196224 154002 0 128 152619000001417600502
2 75628544 886177792 154008 0 64 153324000000173800025
2 75628544 961806336 154009 0 64 153324000000173800025
2 75628544 1037434880 154010 0 64 153324000000173800025
2 75628544 1113063424 154011 0 64 153324000000173800025
2 75628544 1188691968 154012 0 64 153324000000173800025
2 75628544 1264320512 154013 0 64 153324000000173800025
2 75628544 1339949056 154014 0 64 153324000000173800025
2 75628544 1415577600 154015 0 64 153324000000173800025
2 75628544 1491206144 154018 2 64 153324000000173800025
2 75628544 1566834688 153809 0 128 153324000000173800025
2 75628544 1642463232 153810 0 128 153324000000173800025
2 75628544 1718091776 153811 0 128 153324000000173800025
2 75628544 1793720320 153812 0 128 153324000000173800025
2 75628544 1869348864 153813 0 128 153324000000173800025
2 75628544 1944977408 153814 0 128 153324000000173800025
2 76546048 2020605952 153815 0 128 153324000000173800025
2 32768000 2097152000 153898 0 64 153897000003656100039
2 32768000 2129920000 153899 0 64 153897000003656100039
2 32768000 2162688000 153900 0 64 153897000003656100039
2 32768000 2195456000 153901 0 64 153897000003656100039
2 32768000 2228224000 153902 0 64 153897000003656100039
2 32768000 2260992000 153903 0 64 153897000003656100039
2 32768000 2293760000 153904 0 64 153897000003656100039
2 32768000 2326528000 153905 0 64 153897000003656100039
2 32768000 2359296000 153906 0 64 153905000006350900482
2 32768000 2392064000 153907 0 64 153905000006350900482
2 32768000 2424832000 153908 0 64 153905000006350900482
2 32768000 2457600000 153909 0 64 153905000006350900482
2 32768000 2490368000 153910 0 64 153905000006350900482
2 32768000 2523136000 153911 0 64 153905000006350900482
2 32768000 2555904000 153912 0 64 153905000006350900482
2 32768000 2588672000 153913 0 64 153905000006350900482
2 32768000 2621440000 153914 0 64 153913000006355000052
2 32768000 2654208000 153915 0 64 153913000006355000052
2 32768000 2686976000 153916 0 64 153913000006355000052
2 32768000 2719744000 153917 0 64 153913000006355000052
2 32768000 2752512000 153918 0 64 153913000006355000052
2 32768000 2785280000 153919 0 64 153913000006355000052
2 32768000 2818048000 153920 0 64 153913000006355000052
2 32768000 2850816000 153921 0 64 153913000006355000052
2 32768000 2883584000 153922 0 64 153921000006354400052
2 32768000 2916352000 153923 0 64 153921000006354400052
2 32768000 2949120000 153924 0 64 153921000006354400052
2 32768000 2981888000 153925 0 64 153921000006354400052
2 32768000 3014656000 153926 0 64 153921000006354400052
2 32768000 3047424000 153927 0 64 153921000006354400052
2 32768000 3080192000 153928 0 64 153921000006354400052
2 32768000 3112960000 153929 0 64 153921000006354400052
2 32768000 3145728000 153930 0 64 153929000006352000078
2 32768000 3178496000 153931 0 64 153929000006352000078
2 32768000 3211264000 153932 0 64 153929000006352000078
2 32768000 3244032000 153933 0 64 153929000006352000078
2 32768000 3276800000 153934 0 64 153929000006352000078
2 32768000 3309568000 153935 0 64 153929000006352000078
2 32768000 3342336000 153936 0 64 153929000006352000078
2 32768000 3375104000 153937 0 64 153929000006352000078
2 32768000 3407872000 153938 0 64 153937000006357700039
2 32768000 3440640000 153939 0 64 153937000006357700039
2 32768000 3473408000 153940 0 64 153937000006357700039
2 32768000 3506176000 153941 0 64 153937000006357700039
2 32768000 3538944000 153942 0 64 153937000006357700039
2 32768000 3571712000 153943 0 64 153937000006357700039
2 32768000 3604480000 153944 0 64 153937000006357700039
2 32768000 3637248000 153945 0 64 153937000006357700039
2 32768000 3670016000 153946 0 64 153945000006355900052
2 32768000 3702784000 153947 0 64 153945000006355900052
2 32768000 3735552000 153948 0 64 153945000006355900052
2 32768000 3768320000 153949 0 64 153945000006355900052
2 32768000 3801088000 153950 0 64 153945000006355900052
2 32768000 3833856000 153951 0 64 153945000006355900052
2 32768000 3866624000 153952 0 64 153945000006355900052
2 32768000 3899392000 153953 0 64 153945000006355900052
2 32768000 3932160000 153954 0 64 153953000006355700039
2 32768000 3964928000 153955 0 64 153953000006355700039
2 32768000 3997696000 153956 0 64 153953000006355700039
2 32768000 4030464000 153957 0 64 153953000006355700039
2 32768000 4063232000 153958 0 64 153953000006355700039
2 32768000 4096000000 153959 0 64 153953000006355700039
2 32768000 4128768000 153960 0 64 153953000006355700039
2 32768000 4161536000 153961 0 64 153953000006355700039
2 32768000 4194304000 153962 0 64 153961000006355800049
2 32768000 4227072000 153963 0 64 153961000006355800049
2 32768000 4259840000 153964 0 64 153961000006355800049
2 32768000 4292608000 153965 0 64 153961000006355800049
2 32768000 4325376000 153966 0 64 153961000006355800049
2 32768000 4358144000 153967 0 64 153961000006355800049
2 32768000 4390912000 153968 0 64 153961000006355800049
2 32768000 4423680000 153969 0 64 153961000006355800049
2 32768000 4456448000 153970 0 64 153969000006355300063
2 32768000 4489216000 153971 0 64 153969000006355300063
2 32768000 4521984000 153972 0 64 153969000006355300063
2 32768000 4554752000 153973 0 64 153969000006355300063
2 32768000 4587520000 153974 0 64 153969000006355300063
2 32768000 4620288000 153975 0 64 153969000006355300063
2 32768000 4653056000 153976 0 64 153969000006355300063
2 32768000 4685824000 153977 0 64 153969000006355300063
2 32768000 4718592000 153978 0 64 153977000006350000039
2 32768000 4751360000 153979 0 64 153977000006350000039
2 32768000 4784128000 153980 0 64 153977000006350000039
2 32768000 4816896000 153981 0 64 153977000006350000039
2 32768000 4849664000 153982 0 64 153977000006350000039
2 32768000 4882432000 153985 0 64 153977000006350000039
2 32768000 4915200000 153986 0 64 153977000006350000039
2 32768000 4947968000 153987 0 64 153977000006350000039
提前致谢
答案 0 :(得分:3)
最佳做法是不缩小日志。
日志增长有一个原因,它可能会再次发生,那么为什么冒着自动增长的风险呢?它们需要时间(BTW确保自动增长是以MB为单位,而不是百分比)。
日志为20 GB;自动增长30%意味着它增长的时间是5 GB。要分配5 GB并用0覆盖它,它必须花费一些时间。
监视日志的大小和内部使用情况,以查看日志大小的大小,然后如果需要缩小,请使用DBCC SHRINKFILE
相应地调整大小。总是留一些额外的空间。