SBS 2008 and Sharepoint Log file
If using SBS 2008, one of the things you want to do is to install and run the SBS 2008 Best Practices Analyzer (BPA) on a regular basis. At my first SBS 2008 installation, BPA recenlty reported that my Sharepoint log file was larger than 1gb in size. Strange, I thought, since this customer had not even started using sharepoint. Beyond that, BPA did not offer any suggestions for resolving this issue.So, here are the instructions (from the SBS BPA team) on what to do:
Step 1: start up command prompt in administrator mode. You do this by clicking on Start, then right clicking on Command Prompt, then clicking 'run as Administrator'
Step 2: From the command prompt:
1. Type: sqlcmd –E –S \\.\pipe\MSSQL$MICROSOFT##SSEE\sql\query and press Enter
2. From the 1> prompt, type: select name from sys.databases and press Enter
3. From the 2> prompt, type: go and press Enter
This will display a list of all databases know to SQL server. One of them will look something like this:
SharePoint_Config_29c26fca….
Step 3: Now, with the actual name of the Sharepoint database, you will want to enter the following commands, replacing dbname with the actual name of the Sharepoint database. Be sure to leave the brackets [ ], parens ( ), and _log, as noted:
1> BACKUP LOG [dbname] WITH TRUNCATE_ONLY
2> Go
1> Use [dbname]
2> Go
1> DBCC SHRINKFILE([dbname_log],2)
2> Go
1> Exit
For example, if your Sharepoint database was named SharePoint_Config_12345, then you would type in:
1> BACKUP LOG [SharePoint_Config_12345] WITH TRUNCATE_ONLY
2> Go
1> Use [SharePoint_Config_12345]
2> Go
1> DBCC SHRINKFILE([SharePoint_Config_12345_log],2)
2> Go
1> Exit
Hope this helps!
Posted:
Wed, Dec 10 2008 23:04
by
kwsupport
| with 3 comment(s)
Filed under: Backups, Sharepoint, SBS2008
Comments
kwsupport
said:
If you are using the
Windows internal database, if the sqlcmd command errors, try adding np:
prior to the double backslashes. Like this:
sqlcmd –E –S np:\\.\pipe\MSSQL$MICROSOFT##SSEE\sql\query
Hope this helps!
sqlcmd –E –S np:\\.\pipe\MSSQL$MICROSOFT##SSEE\sql\query
Hope this helps!
Cordelta
said:
You can also use SQL
Server Management Studio to connect to an instance of Windows Internal
Database using \\.\pipe\mssql$microsoft##ssee\sql\query as server name.
Ashwin
said:
Thanks it's working for me, the ldf file was 5 GB and now it's 2,1 MB !Thank you
greetz Ashwin
src: http://msmvps.com/blogs/kwsupport/archive/2008/12/10/sbs-2008-and-sharepoint-log-file.aspx
No comments:
Post a Comment