Commands to truncate a SQL Server log file?

In management studio:

  • Right-click the database, choose properties, then options.
  • Make sure “Recovery model” is set to “Simple”, not “Full”
  • Click Ok
  • Right-click the database again, choose tasks -> shrink files
  • Change file type to “log”
  • Click ok.

Alternatively, the SQL to do it:

 DBCC SHRINKFILE (mydatabase_Log, 1)

An error while installing SQL Server (express) 2008 R2

Error text:

“************** Exception Text **************
System.Configuration.ConfigurationErrorsException: An error occurred creating the configuration section handler for userSettings/Microsoft.SqlServer.Configuration.LandingPage.Properties.Settings: Could not load file or assembly ‘System, Version=, Culture=neutral, PublicKeyToken=……”

Caused by a LandingPage.exe error. It couldn’t bind to System assembly. Delete files from (users_profile)\AppData\Local\Microsoft_Corporation directory.


Forefront TMG: Included SQL Express (logging instance) is fail

When it gets to the step of installing additional software, however, things go wrong:

Microsoft SQL Express 2008 (logging instance) could not be installed. As a result, Forefront TMG installation cannot be completed.

To be not entirely correct solution:

Browse to the FPC folder on media. Run MS_FPC_Server.msi.
Once you’ve got TMG installed, open it up, and select the Logs & Reports list item.
Change your selection from the embedded SQL database to a local file destination, or a standalone SQL instance if you’re into that sort of thing.


Installing Operations Manager 2007 R2 on SQL 2008 R2

Microsoft released a knowledge base article  (KB2425714) with the following steps to perform the installation.

In short:

  • Use the DBCreateWizard tool to install the OperationsManager database
  • Install the first management server
  • Use the DBCreateWizard tool to install the OperationsManagerDW database
  • On the SQL Server Reporting Services server, rename the local group SQLServerReportServerUser$<hostname>$MSSRS10_50.<SQLInstanceName> to SQLServerReportServerUser$<hostname>$MSSRS10.<SQLInstanceName>
  • Install System Center Operations Manager 2007 R2 Reporting
  • Rename the local group SQLServerReportServerUser$<hostname>$MSSRS10.<SQLInstanceName> back to original name SQLServerReportServerUser$<hostname>$MSSRS10_50.<SQLInstanceName>

Operations Manager 2007 R2 does not show the active alerts, and error is sometimes the console Microsoft.EnterpriseManagement.Common.ServerDisconnectedException

The info file is not appropriate and thoughtful reading: CU5 after the patch, you must manually run two SQL scripts.

Manual operations that must be performed after you update the root management server and Data Warehouse.

This update contains fixes that must be manually applied. These fixes are applied by running the \SQLUpdate\CU5_DataWarehouse.sql file against the Operations Manager data warehouse (OperationsManagerDW) and by running the \SQLUpdate\CU5_Database.sql file against the Operations Manager database (OperationsManager).

To do this, follow these steps:

  1. Log on to the computer that hosts the Operations Manager 2007 database by using a user account that has database system administrator (SA) rightsto the Operations Manager 2007 database instance. To perform the database update remotely, log on to a computer that hosts SQL ServerManagement Studio by using a user account that has the appropriate SA rights to the Operations Manager 2007 database.
  2. Run SQL Server Management Studio.
  3. In the Connect to Server dialog box, connect to the instance of SQL Server that hosts the Operations Manager database. The default database name is OperationsManager.
  4. Click New Query on the toolbar.
  5. From the SQL Editor toolbar, use the Available databases option to select the Operations Manager database.
  6. On the File menu, click Open, select the \SQLUpdate\CU5_Database.sql file that was extracted by the Windows installer (.msi file), and then click Open.
  7. When the file is loaded, click Execute in the SQL Editor toolbar.
  8. For the Operations Manager data warehouse, repeat steps.However, connect to the instance of SQL Server that hosts the Operations Manager data warehouse, and then run the \SQLUpdate\CU5_DataWarehouse.sql file.

Sharepoint Foundation or Server 2010 error: 2137 (event ID)

If you are installing a new organ Sharepoint 2010 farm, be sure to update the other server patch level (preferably in exactly that way!). However, even if you get an error (Event ID: 2137), that need some update.
Unlike the description, is not always sufficient to psconfigui.exe running. In this case, issue the following command:

PSConfig.exe -cmd upgrade -inplace b2b -force -cmd applicationcontent -install -cmd installfeatures

You should specify C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\BIN directory issue 😉

Farm Passphrase reset in SharePoint 2010

Enter at the PowerShell prompt (Start > All Programs > Microsoft SharePoint 2010 Products > SharePoint 2010 Management Shell):

$passphrase = ConvertTo-SecureString -asPlainText -Force
Set-SPPassPhrase -PassPhrase $passphrase -Confirm

(Of course, the password immediately after you close the PowerShell I found … 🙂 )