Skip to main content

How to reduce LDF file in sql for sharepoint


Here is the script for job that you need to run for decrease the LDF file

/***** Script start***

USE [DB_NAME];



ALTER DATABASE [DB_NAME] SET RECOVERY SIMPLE;



CHECKPOINT;



DBCC SHRINKFILE ([LOG_FileName], 1);

ALTER DATABASE [DB_NAME] SET RECOVERY FULL;

/***** Script End***

The above script reduce the log file up to 1,024 KB



Note: before doing any activity kindly make the back of each database.



Regards
3art Technology Experts
http://www.3art.tech

Comments

Popular posts from this blog

Content Query Webpart Template In SharePoint 2013 and add new column in it

Dear All, Here is the easiest way to make add custom column under your content query web part and then you can format it as you want. Step 1:  Open Sharepoint design Step 2:  Open site for sharepoint parent site collection Step 3:  Locate the following folder Style Library > XLS Style Sheets Step 4:  Open "ItemStyle.xsl"  file Add the custom style sheet as you want <xsl:template name="[Your Style Name]" match="Row[@Style='[Your Style Name]']" mode="itemstyle">                                                   <xsl:param name="CurPos" />                                                     <xsl:variable name="SafeLinkUrl">                                                       <xsl:call-template name="OuterTemplate.GetSafeLink">                                                         <xsl:with-param name="UrlColumnName" select="'LinkU

Updatepanel or Enable Ajax in SharePoint webpart

Dear All It is really giving me a hard to get this techniques if you want to run the update panel in sharepoint 2013 webpart then you need to initialize the script manage by code   protected override void OnInit(EventArgs e)         {             base.OnInit(e);             InitializeControl();             // Register the ScriptManager             ScriptManager scriptManager = ScriptManager.GetCurrent(this.Page);             if (scriptManager == null)             {                 scriptManager = new ScriptManager();                 scriptManager.ID = "ScriptManager1";                 scriptManager.EnablePartialRendering = true;                 Controls.AddAt(0, scriptManager);             }         } In ascx page you need to add the following  <asp:UpdateProgress ID="UpdateProgress1" runat="server">     <ProgressTemplate>         <h1>Your progress value</h1>     </ProgressTemplate> </asp:U

Open and Close SharePoint Dialog Box or dlg and Refresh Parent Page

Dear All,  If you are looking for close the ISDGL=1 Sharepoint dialog box on button click on C# here is the code for it Add following script files in to ascx file for open popup! <Sharepoint:ScriptLink runat="server" Name="SP.UI.Dialog.js" Localizable="false"  ID="s4" LoadAfterUI="true"/> This script will set the properties of popup window <script>     function openPop_up(pageURL, title, dlgwidth, dlgHeight) {         var options = {               url: pageURL,               title: title,             allowMaximize: false,           showClose: true,           width: dlgwidth,         height: dlgHeight,         dialogReturnValueCallback: Function.createDelegate(null, function(result, returnValue) {               if (result == SP.UI.DialogResult.OK) {                   if (returnValue == null) {                       SP.UI.Notify.addNotification('Operation successful');                       SP.UI