Eamon Barker's eb.NET

Not quite vb.NET, but getting close!

Filter by APML
RSS Feed

Search

Profiles/Groups

Google Ads

Top Posts

Tags

Categories

Archive

Calendar

<<  September 2010  >>
SuMoTuWeThFrSa
2930311234
567891011
12131415161718
19202122232425
262728293012
3456789

Blogroll

Disclaimer

All postings are provided AS IS with no warranties, and confer no rights.

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright Eamon Barker 2010

CC License

Visitor Map

Locations of visitors to this page
Welcome to eb.NET... a place that I can keep the things that help me in my day, that might help you in your's!

SharePoint Tip: Upgrading a SharePoint (SP0) Content Database to SP1

Moving a SharePoint content database from SP0 to a deployment with SP1

If you have installed SharePoint (SP0) and you want to move a content database to a deployment running SP1 without upgrading the whole farm, read on!

First off, create a blank team site (Central Administration > Application Management > Create or extend Web application) and then follow the steps below.

When you attempt to attach the database through the central admin web interface, you might get hit with the following error:

Attaching this database requires upgrade, which could time out the browser session.  You must use the STSADM command 'addcontentdb' to attach this database.

To get around this, do what the error says...

  1. RDP to your SharePoint server
  2. Open the Command Prompt (Start > Run >CMD)
  3. Paste the following line into the prompt "cd %COMMONPROGRAMFILES%\Microsoft Shared\web server extensions\12\bin", this will take you to the 12 Hive
  4. Type the following command:
    stsadm -o addcontentdb -url http://SiteName -databasename WSS_Content_DATABASENAME -databaseserver DOMAIN\DATABASESERVER
  5. Hit enter, and all going to plan you will get: Operation completed successfully

To make sure, go to Central Administration > Application Management > Content Databases and it should be there. Take the origional database (the one created when you created the site) offline and make sure this one is the only one online. Navigate to your site and again, make sure it is all there!

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


SharePoint Tip: Tidying up SQL Files in SharePoint

A post explaining how to save space by cleaning up log files for SharePoint SQL Databases

We have several staging SharePoint environments running on MSFT Hyper-V servers, this gives our BA's the environment to build up PoC sites for clients. I was doing the usual maintenance round and found that space was becoming an issue on one of the staging environments.

So... time to truncate and shrink some SQL Log files I think, and I was correct! A couple of the .LDF files has swelled to in excess of 500MB. First of all, back up the database, fully... I wouldn't be too popular if I lost all that work! Next I ran the the code below on the database (highlight one row at a time and run it):

   1: BACKUP LOG <Database Name> WITH TRUNCATE_ONLY 
   2: DBCC SHRINKDATABASE (<Database Name>)

After running the code, the LOG file went from >500MB to around 500KB!

Finally, I would suggest changing the autogrowth settings for the log file. To do this:

  1. Open MSFT SQL Server Manager
  2. Log into the SharePoint SQL server
  3. Right-click the database and select Properties
  4. In the Database Properties window, select Files from the left-hand pane
  5. In the Database Files box (on the right-hand side), click the "..." button in the Autogrowth column for the LOG file row (see the image below)

    image
  6. In the File Growth area, enter either the percentage or megabytes you want to limit the file growth to (I have set the one above to 2 percent)
  7. In the Maximum File Size area enter the max size you want from the file OR leave it Unrestricted (I have restricted the one above to 200MB)

Alternativly, if you don;t care about keeping your log files (if you have a sandbox or something?) you can change the Recovery Model of the database to simple... Follow steps 1, 2, 3 above and then select Options from the left-hand pane, in the Recovery Model drop-down list, select "Simple".

And that should be that!

Currently rated 4.5 by 2 people

  • Currently 4.5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5