Getting Ready to split up a very large MOSS 2007 Content DB into multiple content DBs

by admin 16. July 2009 08:01

 Very Exciting. Getting ready to split up a large content DB on a large enterprise level moss farm deployment. The idea is to distribute data that has grown over time into multiple content databases for performance and reliability. The plan is to use stsadm -o mergecontentdbs. However this is known to have implications and issues - http://support.microsoft.com/kb/969242. We are taking all necessary steps to avoid any problems. I'll update this post later on how our operation does.

 Update - Sorry for the late update guys. heres how it went.

 We had 2 tasks ahead of us. One was to move a content db from one database server to another in the cluster. The other was to split up a large content db on one of the servers into multiple content dbs.

Splitting the large content db into multiple content DB's:

 Microsoft recommended that we do not run the merge content db command on databases larger that 10 GB in size. So instead of moving out the larger site collections into new content databses, we decided to move all of the smaller site collections out instead. This would take much longer, but would be safer so we went that route.

  1. Make sure we stop all search crawls. This is important. Not pause but completely stop the search crawls. Let the running crawls complete and remove the schedule for all future crawls. If we do not do this, we take the risk of corrupting our search indexes.
  2. Create the new content databses
  3. Run stsadm -o preparetomove on the content db to be split
  4. Create a sites.xml using stsadm -o enumsitecollections on the source content database
  5. split up the sites.xml into manageable chunks containing the site colllections that we which to split out
  6. run stsadm -o mergecontent dbs on the source and destination content databases using the site.xml files created in step 5 to move the site collections from source to destination database to the destination content databases
  7. run stsadm -o databaserepair command on the source and destination databses to remove any orphan records - we had none
  8. test

we moved approximately 150 GB of data from a large content database into 5 diffenet new content databases. It took us approximately 18 hours including testing. After the maintennance, we improved page response times for the site collections. We also reduced app pool recycles for our web applications due to processes hitting their virtual memory limits. These almost seemed to dissapear after the maintennance. Overall we were very happy with the results.

Moving a content db from one server to another:

We had multiple large content databases on one server and we wanted to balance it out by moving a large content database from one server to another in the cluster.

  1. Run stsadm -o preparetomove on the content db to move
  2. detach the content db by running stsadm -o deletecontentdb
  3. using sql management studio, detach the content database from the server instance
  4. move the databse files from the source server to the destination server
  5. using management studio, re-attach the content database on the new sql server
  6. add the content database by ising stsadm -o addcontentdb
  7. Test

that was pretty much it. After our maintennance, we started our search crawls and reset the schedule. balancing out the databases also increased performance on our web applications.

Tags: ,

MOSS | Sharepoint

Windows Vista Service Pack 2 (SP2) installation increases disk space

by admin 3. June 2009 01:25

So, here's a nice little effect of installing Windows Vista SP2... it increases free disk space!

I just did installed it today and my free disk space increased by 11 GB! 11 GB...! What did SP2 delete??

And I'm not the only one. Almost Everyoneone who has installed SP2 is seeing an increase in free space on their system from 5GB to even upto 130 GB.

We'll see what microsoft says about this but for now it was a nice surprise knowing vista to be such a disk space hog.

update: So was looking arround some more and one of the reasons for increased free space is that SP2 seems to clear the shadow volume copy cache which wasn't limited in vista earlier, and limits it. This led to big increases in free disk space.

see http://www.brightsideofnews.com/news/2009/6/2/vista-sp2-frees-up-disk-space-or-good-bye-svc.aspx - better explanation.

Tags: , ,

General | Windows | Vista

ssms tools pack - Auto Generate CRUD stored Procedures for your database and more

by admin 2. June 2009 00:53

Just found a great tool that will hopefuly save me tons of work...

It can auto-generate the CRUD stored Procedures for your tables - that was the most useful to me. Plus there are a lot of other useful features for the IDE.

  • Window Connection Coloring.
  • Query Execution History (Soft Source Control) and Current Window History.
  • Search Table or Database Data.
  • Uppercase/Lowercase keywords and proper case Database Object Names.
  • Run one script on multiple databases.
  • Copy execution plan bitmaps to clipboard.
  • Search Results in Grid Mode and Execution Plans.
  • Generate Insert statements for a single table, the whole database or current resultsets in grids.
  • Text document Regions and Debug sections.
  • Running custom scripts from Object explorer's Context menu.
  • CRUD (Create, Read, Update, Delete) stored procedure generation.
  • New query template.

http://www.ssmstoolspack.com/

Tags: , , ,

.NET | C# | SQL | SQL Server Management Studio

Sharepoint Dev Wiki

by admin 26. May 2009 03:47

I think this was long needed. A must have link for sharepoint admins and developers. Also great for business wanting to gain more insight and understanding into customization and development on sharepoint. I usually get a lot of different views when it comes to specific topics on sharepoint development. I think a wiki is a great idea to get all of those views in one place and create open discussion.

 check it out! http://www.sharepointdevwiki.com

 

Tags: ,

MOSS | Sharepoint

Adding Color Columns to Sharepoint lists

by admin 3. November 2008 02:02

I was working on a project that used a sharepoint list with a column called "Urgency" that was a choice column with values "Low", "Medium", "High". The client wanted to show the co0lumn in the list view but instead of the text, show a corresponding color - Green for Low, Orange for medium and Red for High. Also I needed to have this configured without downtime or custom code.

I found a great post online here that helped me do exactly that using a calculated column and a content editor webpart, out of the box!

Steps:

  • Create a column in the list called "Urgency Level" for example. Its a choice column with values "(1) Low", "(2) Medium", "(3) High"
  • Create s column in the list called "Urgency" which will display the color. This is a calculated column. The formula for this column is

          =”<DIV style=’font-weight:bold; font-size:24px; color:”&CHOOSE(RIGHT(LEFT(Urgency Level,2),1),”red”,”orange”,”green”)&”;’>&bull;</DIV>”

  • Add a content editor web part to the bottom of the page and copy the below script into it.


<script type="text/javascript">
var theTDs = document.getElementsByTagName("TD");
var i=0;
var TDContent = " ";
while (i < theTDs.length)
{
try
{
TDContent = theTDs[i].innerText || theTDs[i].textContent;
if ((TDContent.indexOf("<DIV") == 0) && (TDContent.indexOf("</DIV>") >= 0)) {
theTDs[i].innerHTML = TDContent;
}
}
catch(err){}
i=i+1;
}
//
// ExpGroupRenderData overwrites the default SharePoint function
// This part is needed for collapsed groupings
//
function ExpGroupRenderData(htmlToRender, groupName, isLoaded)
{
var tbody=document.getElementById("tbod"+groupName+"_");
var wrapDiv=document.createElement("DIV");
wrapDiv.innerHTML="<TABLE><TBODY id=\"tbod"+ groupName+"_\" isLoaded=\""+isLoaded+ "\">"+htmlToRender+"</TBODY></TABLE>";
var theTBODYTDs = wrapDiv.getElementsByTagName("TD");
var j=0;
var TDContent = " ";
while (j < theTBODYTDs.length)
{
try
{
TDContent = theTBODYTDs[j].innerText || theTBODYTDs[j].textContent;
if ((TDContent.indexOf("<DIV") == 0) && (TDContent.indexOf("</DIV>") >= 0)) {
theTBODYTDs[j].innerHTML = TDContent;
}
}
catch(err){}
j=j+1;
}
tbody.parentNode.replaceChild(wrapDiv.firstChild.firstChild,tbody);
}
</script>

Thats it! Here was the result:

 

 Also, you would have realised that you can do a lot more than add just colors, you can add any html to be rendered including scripts, mouse overs, colors, images...

Tags: , ,

e-commerce | MOSS | Sharepoint

Tool to build WSP solutions for MOSS/Sharepoint Projects

by admin 10. September 2008 23:46

The tool is called STSDEV. I found it on codeplex. The tool allows you to generate Visual Studio Projects & Solutions to facilitate building of MOSS deployement solutions. Its a simple command line utility that allows you to select the kind of deployment you are trying to do. The hoices include, empty solutions, features, webparts etc. By simply selecting the type of solution and clicking a button, it creates the visual studio project templates for building the WSP. You can drag and drop all of your deployment files into a predefined 12 hive structure. Hitting build on your solution, atomatically create sthe manifest file and builds the wsp. Till now I was building the mannifests and wsps by hand and that is a pain.

There are a number of build configurations generated for you that allow you to retract, deploy, redeploy, install the solutions directly to MOSS without needing to use stsadm. Its a great little tool for development and debugging.

 The project can be found at http://www.codeplex.com/stsdev.

 Here are some sceen casts that are very helpful in getting you started: http://www.codeplex.com/Release/ProjectReleases.aspx?ProjectName=stsdev&ReleaseId=10119

 

 

Tags: , ,

.NET | Sharepoint | MOSS

Another iPhone App - Guitar Chords on the iPhone - iChords - http://www.ichords.vishalseth.com

by admin 29. July 2008 08:47

Ok, I added another one. This one is a great app that allows you to find almost any guitar chords by name. Not only that, it allows for finding many variations of the same chord, left handed and right handed chords, different tuning scales etc. the url is http://www.iphone.vishalseth.com. I just submitted it on Apple's website and will post a link to the listing when it shows up.

Tags: , , ,

.NET | C# | iPhone | iPod

Adding AdSense on an Office Live Site

by admin 23. July 2008 09:10

I recently tried to add google adsense ads on my office live page at http://www.vishalseth.net. It wasn't straightforward but you can do it. Initially, I saw the HTML module available in the site designer and thought I could just use that; but if you've tried it that doesnt work either... or atleast did not work for me. I had to use an iframe... This is what I finally did to make it work:

  1. Create an empty html file e.g. AdSense.htm on my computer
  2. paste the AdSense code from google including the script tags into the htm file using notepad. The html file at this point only contains the code in the script tags and nothing else (no <html>, <head> or <body> tags either.)
  3. save and close the file
  4. upload the file to to your documents folder in your office live account. when logged into site builder, the link to the document library should be available on the left. Clicking on it should alloow you to upload any files into the library.
  5. in the site builder, open the page onto which you wish to add the adsense ads. add a html module onto the page.
  6. for the html, insert the following: <iframe  frameborder="0" scrolling="no" src="http://yoursite.com/Documents/adsense.htm" width="770" height="110"></iframe>. Save.
    1. yoursite.com is the base url of your site
    2. height, width can be set to suit the dimensions of the ads you're displaying.

The ads should now be visible on your site...

Tags: , ,

.NET | General | office live

iPhone App - iNGPOD - National Geographic Magazine's photo of the day.

by admin 22. July 2008 00:24

This iPhone development thing is addictive. seriously. It's hard for me to have a little time on my hands and not want to write another fun app that shows up on my home screen. This one just pulls and displays the Photo of the day from National Geographic Magazine's website. It's something I have on my google home screen and just like to look at daily and thought it would be fun if I could have it on my phone as well. The url is http://www.iNGPOD.vishalseth.com. You can see it published in Apple's web application directory by clicking here 

 Update: The application is offline for now due to problems with making httprequests in my medium trust hosting environment.

Tags: , , , ,

.NET | C# | General | iPhone | iPod

Another new iPhone App - iSigns - Mobile Horoscopes from astrology.com

by admin 20. July 2008 23:18

I created a new app this weekend because I had a little bit of time. My wife likes to check her daily horoscope on astrology.com and I thought it would be cool if I could make an app that shows the daily horoscope. Whats even better is that they have daily horoscopes in many different categories like for example, general, health, couples, singles, home & garden, work and even a baby, dog and cat horoscope! Now I can just pull up the daily horosocopes anytime; kind of fun. I just submitted the app on apple's iPhone webapps directory so I'll post a link to the listing when it appears. Meanwhile, the link to the app, if you want it on your phone is, http://www.iSigns.vishalseth.com. For now its only customized to the apple mobile safari browser.

Update: See the application published in apple's web app directory by clicking here.

 

 Update: The application is offline for now due to problems with making httprequests in my medium trust hosting environment.

Tags: , , , , , ,

C# | .NET | iPhone | C# | iPod | iPhone | iPod