Monday, June 20, 2011

SBS 2008 - Cleanup Large Sharepoint Log files

http://smartbserver.net/2011/01/wss-db-large/
http://support.microsoft.com/kb/2000544



1. Connect to windows internal database by using SQL Management Studio Express. Use \\.\pipe\MSSQL$MICROSOFT##SSEE\sql\query as the database name.

2. Right click on sharepoint database > Properties. If you get an error message saying insufficient rights, run the query below to set the owner

Use [SharePoint_Config_*********]
go
exec sp_changedbowner 'domain\administrator'

3. In properties > options, change database recovery model from full to simple.

4. Right click on the database and click on new query. paste the commands below and execute.

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

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


Thursday, March 24, 2011

SBS on HyperV and BackupExec

I have been doing some research on running virtual SBS 2008/2011 Premium (SBS + SQL ) for small clients and still have backups to tape – Single server solution. SCSI tape device pass-through is known to cause a few issues on VMWare.

 

Traditionally you cannot install backup exec for SBS on a standard windows server. Symantec have fixed this issue starting with Backupexec 2010 R2 as long as you have SBS on a guest VM. You can install backupexec on the HyperV parent partition (Windows 2008 R2 Server) and configure backups to tape.

 

 

 

 

http://technet.microsoft.com/en-us/library/dd239200%28WS.10%29.aspx

 

http://www.symantec.com/business/support/index?page=content&id=TECH125965

 

 

Thursday, February 3, 2011

Install MSDE 2000

1. Download MSDE 2000 SP4 from Microsoft Downloads

2. Unpack and install using the command line

a. Setup.exe SAPWD=password DISABLENETWORKPROTOCOLS=0 SECURITYMODE=sql INSTANCENAME=SQL

b. Note: instance name is optional