I currently have the following situation to which I require to give immediate solution.
I have a SQL Server 2008 R2 (Microsoft SQL Server Enterprise Edition (64-bit) Version 10.50.1617.0, which is installed on a Windows 2008R2 (Microsoft Windows NT 6.1 (7601)) NT x64 server.
at the request of the CIO, replication is enabled for each transaction of the database on another server (physical) distant from the original server.
Once this feature of SQL enabled, the LDF file database grows unusually, with the feature to reach more than 250Gb stopping the SQL and generating a latency connections to the SQL server.
The manager of the database (DBA) is an external officer in the company, and it was he who set up the SQL server to perform this Copy (Mirror System or Replica).
My questions are:
1.) I can shrink the LDF file with a procedure performed by a scheduled task database, which takes place in the early morning hours when there is no connection?
2.) What risks arise with this alternative?
3.) I use the command:
BACKUP LOG WITH TRUNCATE_ONLY Xxxxxxxx;
DBCC SHRINKFILE (N'Xxxxxxxxx_log ', 1)
4.) How could undo a failure of this procedure on the LDF file, what if this file is corrupted or damaged? I lose my original BD of my system?
I thank all those experts on similar issues in SQLSERVER and those with experience, with some indication of the best mechanism to effect the reduction in the size of the LDF file.
I have little knowledge on this subject and I regret not being more explicit.