SharePoint database log file is getting large in Windows SBS 2008

Sharepoint Config Database logs are getting too big, how can i shrink them.

Resolution:

1. Start Notepad. To do this, click Start, point to All Programs, point to Accessories, and then click Notepad.

2. Copy and paste the following text into Notepad. Save the file as c:\logshrink.sql

declare @ConfigDB varchar(255);
declare @ConfigDBLog varchar(255);
declare @ConfigDBCmd varchar(255);
select @ConfigDB = name from sys.databases where name like ‘SharePoint_Config_%’;
set @ConfigDBCmd = ‘BACKUP database [' + RTRIM(@ConfigDB) + '] to disk=”C:\windows\temp\before.bkf”’;
execute(@ConfigDBCmd);
set @ConfigDBCmd = ‘use [' + RTRIM(@COnfigDB) + ']‘;
execute(@ConfigDBCmd);
set @ConfigDBCmd = ‘BACKUP LOG [' + RTRIM(@ConfigDB) + '] WITH TRUNCATE_ONLY’;
execute(@ConfigDBCmd);
set @ConfigDBCmd = ‘use [' + RTRIM(@COnfigDB) + ']‘;
execute(@ConfigDBCmd);
select @ConfigDBLog = name from sys.database_files where name like ‘SharePoint_Config%_log’;
set @ConfigDBCmd = ‘use [' + RTRIM(@ConfigDB) + '] DBCC SHRINKFILE([' + RTRIM(@ConfigDB) + '_log],1)’;
execute(@ConfigDBCmd);
set @ConfigDBCmd = ‘BACKUP database [' + RTRIM(@ConfigDB) + '] to disk=”C:\windows\temp\after.bkf”’;
execute(@ConfigDBCmd);
go

3. Open an elevated command prompt. To do this, follow these steps:
1.
Click Start, click All Programs, click Accessories, and then right-click Command Prompt.

2.
Click Run as administrator. Note If you are prompted for an administrator password or for confirmation, type the password or provide confirmation.

4. At the command prompt, copy and paste (or type) the following command, and then press Enter:

sqlcmd -S \\.\pipe\mssql$microsoft##ssee\sql\query -E -i c:\logshrink.sql

Note This script creates two backup files (before.bkf and after.bkf) in C:\windows\temp.

The Active Directory Schema is not up-to-date and Ldifde.exe is not installed on this computer. You must install Ldifde.exe

If you are updating to Excahnge 2010 service pack 2 and get the following error when exchange setup performs a pre-requiset check and fails with the following error. “The Active Directory Schema is not up-to-date and Ldifde.exe is not installed on this computer. You must install Ldifde.exe

On you Exchange Server, run the following command and reboot the Server.

Click Start, Run, and in the Open field run ‘ServerManagerCmd -i RSAT-ADDS

Run setup again.

 

event 3, source vmdebug

If you experience this error in the event log when running a VMware Server you can disable this in the registry as VMware does not require a debug driver .

Open the following location from the registry

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\vmdebug

Alter the Start key from 1 to 4.

This will disable it from occurring from the Event log.

 

 

 

Change NTP time server in Windows Server 2008

Before you change your current time source on any Windows server 2008 versions or SBS 2011, run the following command prompt to see wat the current time source is being used.

w32tm /query /status

Below you should see where the time source is being picked up by.

If you notice above that the source is being used by the Local CMOS Clock. If you wish to change this is a NTP Server, type in the following command

w32tm /config /manualpeerlist:au.pool.ntp.org

For instance, au.pool.ntp.org is the preferred NTP source that I have used, you may change this to your preferred NTP Server. You can do a Google search for NTP servers to give you a list of others that may be available.

After you have run the command with your preferred NTP source, type in the following command

net stop w32time

Then press enter. Type in

net start w32time

Then enter. Type in the following command again to see if it has changed.

w32tm /query /status

Above you can see that the source has changed to au.pool.ntp.org

If you still see CMOS clock, allow it some time to sync.

You can also run this command to rediscover the time server

w32tm /resync /rediscover

 

 

 

 

Calendar Sharing via Exchange Managment Shell

Set calendar sharing via the Excahnge server via Powershell.

Please note that you cannot do this via the Exchange Management Console.

Type the follwoing command, Please alter the appropriate fields in bold.

First user being the calendar sharing user, second user being theuser to gain access.

Set-MailboxFolderPermission -Identity user@domain name.com:\calendar -User user@domain name.com -AccessRights Reviewer

Citrix Receiver 3.1 to allow HTTP

You might come to an issue where Citrix Receiver 3.1 would not allow HTTP URL’s and will only accept HTTPS URL’s.

Below is registry tweak that would need to be done on the machine with the reciever installed.

  • Open Registry Edititor
  • For 32bit Machines, Navigate to HKLM\SOFTWARE\Citrix\AuthManager
  • For 64bitMmachines, Navigate to HKLM\SOFTWARE\Wow6432Node\Citrix\AuthManager 
  • Under AuthManager create a new String Value (Reg_SZ) and name this ConnectionSecurityMode in the Data field types Any

 

  • For 32bit Machines, Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Citrix\Dazzle
  • For 64bit Machines, Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Citrix\Dazzle
  • Under the Dazzle folder, modify the data of AllowAddStore to be A

  •  Restart Windows
  • Add the  HTTP URL

 

Renew SSL self-signed certificate in SBS 2008

With Small Business Server 2008, you have the option to use a third party SSL certificate or the default self-signed SSL certificate. By default the self-signed certificate is valid for two years, but how to you renew it without interrupting OWA, Outlook, and Exchange? When the certificate is expired, Outlook 2007/2010 will give you an error message when opening, that the certificate is not valid. Here are the steps to fix it. Continue reading

Page 1 of 212