How can I prevent log growth in SQL Server when in

2020-04-30 18:05发布

I have an insert query that needs to insert 50 million records, but when I execute this query, my database log file grows to 100GB and stops because of disk full.

How can I prevent log file from growing?

1条回答
乱世女痞
2楼-- · 2020-04-30 18:28

It seems that when useing "WITH (TABLOCK)" the query dont log. I solved it. Hope work for you. query would be like this : INSERT INTO TargetTable WITH (TABLOCK).

and recover model must be simple.

查看更多
登录 后发表回答