Thursday, February 13, 2014

What to do with a Large SharePoint Content Database

hmmm... Wondering  what to do with  the content database size that has already exceeded supported size limit (200 GB) and you want to create a new site collection. There are multiple choices available, you can give it a shot:-

Choice#1 :


Choice#2
  • Shrinking the data base in SQL server, it may have a lot of unoccupied space.
DBCC SHRINKFILE (, )
Or
DBCC SHRINKDATABASE

Run sp_filestream_force_garbage_collection (Transact-SQL) to force the garbage collector to delete any files that are no longer needed in File streaming container.


Choice#3
Move existing site collection to other database and this will reduce size.

Run below command to get the site info along with content database sizes :-
stsadm -o enumsites -url http://sitecollectionURL >> d:\siteinfo.xml

Or

To create the list of all site collection in that Content database then use this,
Get-SPSite -ContentDatabase "WSS_Content_"| foreach($site in $_.sites)


Now from the Site info file created in d drive you can identify the site collection that you
want to move to a separate database.

Move-SPSite <http://ServerName/Sites/SiteName> -DestinationDatabase

  • is the name of the destination content database.

Stsadm -o mergecontentdbs -url -sourcedatabasename -destinationdatabasename -operation 3 -filename


Choice#4  Keep the old large databases as it is and create new site collections in a separate database:-
stsadm -o createsiteinnewdb -url  http://sitecollectionURL 
                                          -ownerlogin domain\username 
                                          -owneremail emailid     
                                          -lcid 1033 
                                          -sitetemplate STS#0  
                                          -title sitecollectiontitle 
                                          -description sitecollectiondescription
                                          -databasename DBname


Note: We cannot split a site collection  into  multiple databases.

Monday, January 6, 2014

Powershell script to Install SharePoint 2013

Ohhhhh Yessssss! I am back ....don't ask me after how long I am active on this SharePoint blog (sigh :(  its been almost 3 yrs... )....and the reason for this about - turn is my new year resolution (a deep secret, wouldn't tell you now ;) )... Yes , I am happy that I have straightened my back to continue with my skills and to catch up with the world. So here is my Powershell script that I used to successfully install SharePoint 2013 in POC environment:-

This script can be safely used to create a brand new SharePoint farm:-

PS C:\Users\ Spadmin > Add-PSSnapin Microsoft.SharePoint.Powershell -EA 0 

# Settings
PS C:\Users\ Spadmin  >$databaseServer = " "
PS C:\Users\ Spadmin  >$configDatabase = " "
PS C:\Users\ Spadmin >$adminContentDB = ""
PS C:\Users\ Spadmin  >$passphrase = " "
PS C:\Users\ Spadmin  >$farmAccountName = " "
PS C:\Users\ Spadmin >$farmAccount = Get-Credential $ S_SP2013_Dev_FARM
PS C:\Users\ Spadmin  >$passphrase = (ConvertTo-SecureString $passphrase -AsPlainText -force)

PS C:\Users\Spadmin > New-SPConfigurationDatabase -DatabaseServer $databaseServer -DatabaseName $configDatabase -AdministrationContentDatabaseName $adminContentDB  -Passphrase $passphrase -FarmCredentials $farmAccount

Please run the below command in SQL management studio to set the MAXDOP to 1 for parallel queries before creating a SharePoint farm:-
EXEC sp_configure 'show advanced options', 1;
RECONFIGURE WITH OVERRIDE;
GO

EXEC sp_configure 'max degree of parallelism', 1;
RECONFIGURE WITH OVERRIDE;
GO

EXEC sp_configure;
GO

So, Apply the above recipe to create your very own SharePoint farm, and do let me know if this post was helpful.

Signing off..

Take care!!!!!!!!

Monday, March 29, 2010

Vandana's blog: Vandana's blog: How to install Cumulative update or Hotfix on SharePoint Server:-

Vandana's blog: Vandana's blog: How to install Cumulative update or Hotfix on SharePoint Server:-

The Immediate Alerts Job is keep hanging even after restarting the Timer Services

"The Immediate Alerts Job is keep hanging even after restarting the Timer Services. "

So Guys, we can flush out the Timer Cache --> this will flush out the bad entry in the event cache table.
Below are the steps to flush out the Timer Cache and regenerate it again

1. Stop the OWSTIMER service on ALL of the MOSS servers in the farm.

2. On the Index server, navigate to:

Server 2003 location: Drive:\Documents and Settings\All Users\Application Data\Microsoft\SharePoint\Config\GUID and delete all the XML files from the directory. Server 2008 location: Drive:\ProgramData\Microsoft\SharePoint\Config\GUID and delete all the XML files from the directory.

3. Delete all the XML file in the directory.

NOTE: ONLY THE XML FILES, NOT THE .INI FILE.

4. Open the cache.ini with Notepad and reset the number to 1. Save and close the file.

5. Start the OWSTIMER service on the Index server and wait for XML files to begin to reappear in the directory.

6. After you see XML files appearing on the Index server, repeat steps 2, 3 & 4 on each query server, waiting for XML files to appear before moving to subsequent servers.

7. After all of the query servers have all been cleared and new .xml files have been generated, proceed to the WFE and Application servers in the farm, following steps 2, 3, 4 and 5 for each remaining server.

Friday, March 5, 2010

Vandana's blog

Vandana's blog

Vandana's blog: How to install Cumulative update or Hotfix on SharePoint Server:-

Vandana's blog: How to install Cumulative update or Hotfix on SharePoint Server:-

How to install Cumulative update or Hotfix on SharePoint Server:-

SharePoint Server Cumulative :_
Prep your Farm for the Upgrade
Pre-requsite Steps for installing SharePoint Cummulative Updates
Make sure SharePoint version is sp2 or sp1 (atleast)
Backup SharePoint Farm
Quiesce farm the SharePoint Farm from Central Admin --> Operations - Quiesce farm Stop the world wide web Publishing service from services.msc
--------------------------------------------------------------------------------------------------
Package Installation
Run update packages on servers in the Farm in following order :-
(A) Web Application Server – Excel Services, SSRS, BDC – Services Server
(B) Index Server
(C) WFE
Repeat both packages Install on all servers in the farm in the order specified above.
WSS Package
Run the following package - A Reboot is required (be prepared as Microsoft is not correct on Reboot)
wss-kb974989-fullfile-x64-glb.exe
REBOOT
MOSS Package
Run the following package - A Reboot is required (be prepared)
office-kb974988-fullfile-x64-glb.exe
REBOOT


--------------------------------------------------------------------------------------------------
Run the SharePoint Product & Services Technology - psconfig (Wizard) on all the SharePoint Servers in following order
1. WFE which host the Central Admin
2. SharePoint Application Services Server
3. SharePoint Index Server
4. Other WFE's
---------------------------------------------------------------------------------------------------
Central Admin --> Operations – Stop Quiesce farm
Check the version of the SharePoint Server from Operations Tab
Central Admin - Operations - Servers in the Farm
Farm Information will list the version as - 12.0.0.6520
Also
Version on each server in the Farm - will be displayed next to Servers name