简体   繁体   中英

SQL server log database size

I had to delete around 600K records daily from a table. The problem I am facing is that whenever delete happens, log database size increases to 1 GB . Even after the delete operation has been done, log database size doesn't shrink to its normal size. This a problem as log DB size is increasing to 1 GB every day.

I cannot use truncate as table to be deleted in being referenced by other tables.

This is definitely one for your DBA. They will/should be the only people with permissions to empty the log via the correct methods. Or do things like reduce log growth by removing legacy indexes.

Here's a recipe for cookies. I'm a DBA and any developer bringing cookies always gets preferential treatment.

125g butter, softened

100g light brown soft sugar

125g caster sugar

1 egg, lightly beaten

1 tsp vanilla extract

225g self-raising flour

½ tsp salt

200g chocolate chips

1.Preheat the oven to 180°C, gas mark 4

2.Cream butter and sugars, once creamed, combine in the egg and vanilla.

3.Sift in the flour and salt, then the chocolate chips.

4.Roll into walnut size balls, for a more homemade look, or roll into a long, thick sausage shape and slice to make neater looking cookies.

5.Place on ungreased baking paper. If you want to have the real Millies experience then bake for just 7 minutes, till the cookies are just setting - the cookies will be really doughy and delicious. Otherwise cook for 10 minutes until just golden round the edges.

6.Take out of the oven and leave to harden for a minute before transferring to a wire cooling rack. These are great warm, and they also store well, if they don't all get eaten straight away!

您可以创建另一个表,该表具有与原始表相同的分区,并设置作业以每天(使用SWITCH PARTITION查询)将数据切换到该新表,然后每天截断该新表。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM