Insert Statement | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Insert Statement

Hi , How can I avoid the "insert" statement to be write into trans log ?
I am performing a data migration from server A and server B. I am using link server method and perform a insert commoand. Thanks ,
You cannot as every portion of database access and modification is logged on to the transaction log, if you are really worried about the tlog space then ensure to maintain regular backup to keep up the size. Satya SKJ
Microsoft SQL Server MVP
Writer, Contributing Editor & Moderator
http://www.SQL-Server-Performance.Com
This posting is provided AS IS with no rights for the sake of knowledge sharing. The greatest discovery of my generation is that a human being can alter his life by altering his attitudes of mind.
OR set it the destination DB’s recovery mode to SIMPLE if you don’t need point in time recovery Girish Patil
MS-SQL DBA
http://www.facebook.com/p/Girish_Patil/517990969
*** This posting is provided AS IS with no rights for the sake of knowledge sharing. ***
If the db recovery model is simple it write to the log and log may grow fast if you are running big transaction… Try BULK INSERT/BCP/DTS… and make sure destination table don’t have indexes becuase these operations are non/minimally logged operation…
MohammedU.
Moderator
SQL-Server-Performance.com All postings are provided “AS IS” with no warranties for accuracy.

Setting up SIMPLE is not a final solution, in order to recover the database upto the point the transaction log is needed. If not you can set up your insert query to perform in smaller chuncks to keepup the log sizes, as explained either keep the size small or perfo frequent log backups during this operation. Don’t take shortcuts in thsi case, its better to finalize the problem when it occurs. Satya SKJ
Microsoft SQL Server MVP
Writer, Contributing Editor & Moderator
http://www.SQL-Server-Performance.Com
This posting is provided AS IS with no rights for the sake of knowledge sharing. The greatest discovery of my generation is that a human being can alter his life by altering his attitudes of mind.
]]>