Search This Blog

Friday 28 June 2013

SP2010: Move a sub site to it's own Site Collection

Hi,

This is something that gets done allot once your DB's start growing...

Here are the steps.

Do a full backup of your farm!!

Then you need to export to site:
Export-SPWeb -Identity "http://SiteURL/SubSite/…/" -Path "C:\Backups\SiteName.cmp" -IncludeUserSecurity -IncludeVersions all


Now you need to delete rename the site you want to import...(If you are using the same path)
(Why did i not think of this....my SharePoint team lead said just rename it...)

Now you can add a explicit inclusion that is called what the path must be.



Now you need to create your new Database.


You need to make sure your new Site Collection is added to the specific database.

In Central Admin go to Manage Content Databases


Click on the database name, you need to edit the amounts under Site Collection Level Warning to one less that the amount under the "Current Number of Sites Collections"
In My case i will make Warning level "0" since there is only 1 web application.
Then the next value you need to make the same as number of site collections so i will set Max number of site collections to "1"
This will prevent the database allowing more site collections to be added under it.


Now you need to add the new Database
Just click on "Add Content Database" at the top of the previous Screenshot.
Here it is important to name your database to something that makes sense. i Like to include the port number if you have multiple ports.
Also set your limits to 0 and 1 so that your database don't get used when adding other site Collections

Now go and create you New Site Collection.

Adding Site via PowerShell:
If you don't want to set the limits on your Databases you need to create your site collection via PowerShell
(If there are lots of Databases you don't always want to go and set all the site collection levels, although i think t should be done to manage your databases properly)

Open PowerShell in admin mode
New-SPSite http://sp2010manual/operations -ContentDatabase Databasename -ownerAlias spdc\sp_admin -lang 1033
  
Ok, now we are ready to import your site:

Import site with this:
Import-SPWeb -Identity "http://Siteurl/Site/SiteCollection" -Path c:\backups\Sitename.cmp -IncludeVersions Qverwrite -IncludeUserSecurity
a Log file will be generated. Make sure there were no errors Right at the bottom it should say "0 errors"

This piece was done going backwards and forward testing different approaches so if anything does not makes sense please post comments so that i can fix it.





Thursday 27 June 2013

SP2010: What Site is using all my Storage

Hi,

If you need to see a breakdown of what site is using what % of storage go to your Site Settings under the root site.

Select Storage Metrics

And there you have it!


SP2010: Conflicting Username from old user

Hi,
i Had a issue where we had a old deleted account that had the same username as a new user.

Bill Gates = Username BGates
Bob Gates = Username BGates

This caused some issues where the display name on Mysites showed the old username.

All i had to do is simply run the following command:
Set-SPUser -Identity ‘Domain\Username’ -DisplayName ‘Name Surname’ –Web http://YourUrls

Friday 21 June 2013

SP2010: Recover data from an unattached content database

Hi,

i Need to restore a file where the data has changed and version'ing is not enabled.
Here is the steps im following:

Getting the DB backup and restoring it to the dev environment.
After this is done do the following:

Goto Central Admin, Backup and Restore, Recover data from an unattached content database.

Here it does not look like you can browse files. Might be wrong. but lists is available.
i Chose Export Site or List, selected a location and this started creating a txt file.

Ok, Got here the next day and it failed....There is a easier way to do this...
i Already had the DB attached on a server in the same domain,
i created a new web app, went to Manage Content Database, added the already attached DB and removed the old one.
Opened the Site Collection and it was done!

So why would you use this? Must be some reasons but for me the above route was easier.

Friday 14 June 2013

Sending Test mail with Telnet

Hi

This can be very handy when trying to troubleshoot.

Firstly you need to have the Telnet Client installed on your server.
Cant remember if this is under Roles or features but it is there.(Win 2008 R2)

After you added this open you command prompt, probably best to do it in admin mode.
Then you type the following:

Telnet 10.10.10.10 25 (So basically that is pointing to the ip on port 25. Change accordingly.)
Helo local.domain.com
Mail From: mail@domain.com
RCPT TO: mail@domain.com

To start with the body of your mail type
DATA
If you want a Subject:
Subject:-*Type Subject* Press Enter Twice
*Now type your Email*
Once your email body is done type a "." in it's own line

Now you should get a message saying that your mail was send...
If there was issues you should have received a error by now. Hopefully that error is useful.

Update: Much easyer to do this via PowerShell These days...:
http://daniecsp.blogspot.com/2015/02/test-and-troubleshoot-mail-with.html






Wednesday 12 June 2013

SP2010: Move a site to a different Sub-Site

Here is how to move a site to a different Sub-Site in the same Site-Collection

You can do it in three ways:
Under Site setting use the Content and Structure option
Import/Export
Backup/Restore

i Am going to use the Content and Structure Option.

So go to the Site Settings of the root site collection and select Content and Structure.


Under Content and Structure select the parent site in the left column and check the site you want to move in the right-hand side. Then under actions click in Move.
If you don't have the move option you probably don't have admin rights.



After this the Move web part will pop up, select the new destination and click ok


And that is it...Quick and easy

Tuesday 11 June 2013

SharePoint CU Updates, should i install them?

This looks like quite a controversial issue?

i Saw a best practice from Microsoft in 2008 where they say only install it if it fixes a issue you are experiencing.

That seems to have change over the years...Some people say install them and some say don't...

i Am still in the process of reading up and doing some research but post your comments if you have some!

Ok, the approach im going to take is not to install the CU updates.
If it will resolve a specific issue then it can be tested on Dev and QA.

However, you will need to install SP2010 SP1. There was issues with SP1 and for this reason i will install either June 2011 CU but then in that case why not go for a newer SP...December 2012 CU was recommended and think i will go for that...

Wednesday 5 June 2013

SP2010: Users SP Favorites missing from my computer when trying to access "Add to SharePoint Sites" from home

Hi,

i Have a user which has got quote a few sites which they added via "Add to SharePoint Sites"

The site would be working perfectly internally, then they go home and then the only item available(VPN'ed and not VPN'ed) would be "Member Sites" and all the other items they added would be missing.

At Office

Then from home she gets this whether she is VPN'ed in or not

At Home
Going back to the office the still only see the "Member Sites" for apparently a few days then the links return...

Ok, so where to start.
i Found these two sites which were very helpful:
http://thechriskent.com/2012/03/02/fixing-sharepoint-office-integration-problems/
http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/Server/MS-SharePoint/Q_27796793.html

What it comes down to:
Add a registry entry:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WebClient\Parameters
Create a new multi string value called "AuthForwardServerList"
Add the following value:
http:\\*.domain.com
i Have seen some people adding this entry under 
HKEY_LOCAL_MACHINE \SYSTEM\CurrentControlSet\WebClient\Parameters
You can also try this if top path does not work

This will take up to 24 hours to take affect as office only request the list of sites every 24hours.





SharePoint and SQL Server 2008 R2 maintenance plans and maintenance

Hi,

Here is how a run my SQL Server maintenance plans and do maintenance.
i Have updated this post a few time's as i read some new onions...

i Set it for once a week...

i Choose the following tasks:
Update: SharePoint checks the index, it calls the stored procedure "proc_DefragmentIndices" so you can leave that step if that storeproc is under the DB, else you need to run a rebuild index.
Also important to regularly check the DB integrity
Remember to not run A/V scans on your SQL server files.

Set your "Default index fill factor" to 80(Under DB Settings)


Then a change the order, have seen people do the backups last but a want a backup before anything gets corrupted.
If you have any comment on the tasks please post a comment, this is the way i do it...Probably a few opinions on this.


On the next page choose you backup location and set the other settings
Same for Transaction log backups page.
On Backup integrity there is not much to set but choose your db's
On index rebuild again choose your db's and select "Change free space per percentage to:" 80%


Update stats again choose your db's
Clean up history and the clean up tasks is handy to help you not letting you backups filling up your drives.
Dont include a Shrink in your maint plan.

It is also debatable if you want to include rebuild index and update statistics as SharePoint has got a timer job for this.

i Am sticking to Index rebuild...Looks like there are ways to check how much it is fragmented and then decide if rebuild or re-index. i Still think rebuild cant hurt so that is why im sticking to it but that is my 2cents

Then to shrink your log files:
Go to the database with a big log file, properties and options. There you will find the Recovery Model. Set this to simple.


Right click on your DB again, Tasks, Shrink and Files

Here you can change the File Type to Log and click ok.


After this i run "DBCC CHECKDB" just to make sure all is still healthy.

Also look at the Microsoft Whitepaper on SharePoint SQL Maintenance.
http://technet.microsoft.com/en-us/library/cc262731.aspx
Very helpfull! and some more details in there which i will probably add as i read it more in detail

SP2010: “Check out” functionality doesn’t allow user to check out MV2, mcr and raw files

i Have a user with the following issue:

“Check out” functionality doesn't allow user to check out  MV2, mcr and raw file types to his local drafts folder. 
The pop up window to allow him to check out documents to his drafts folder but checkout doesn't come up after clicking on check out. It just checks out the file.

The procedure to resolve this is similar to adding a PDF iFilter and the part that actually brings up the Save to local drafts is the part where you edit the docicon.xml file




http://daniecsp.blogspot.com/2012/11/sp2010-installing-pdf-ifilter-and.html
As above, look for a icon for the file, upload it to the images folder and add a line in the docicon.xml for that extension.
Icon Path: \Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\IMAGES\

DocIconPath: "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\XML." and edit the docicon.xml file

Important:
You also need to have the file type associated with a application on your local machine.
If you click on the file and it ask you what you want to open the file with it is not associated with a application and it wont give you the option to save to drafts.







Monday 3 June 2013

SP2010: Enable health reports on a SharePoint 2010 server

Hi,

Here is how to enable the health reports for SharePoint 2010.
You might get this message when clicking on it under Central Admin monitoring:

a health report is not available for this site. usage processing may be disabled on this server

On Central Admin goto "Manage Services on Server"
Make sure that the following to are started:
"Web Analytics Data Processing Service"
"Web Analytics Web Service"

Then goto Monitoring and Review Job Definitions
You need to change the Service to "Microsoft SharePoint Foundation Usage" and enable it.
Once enabled run it.
Check the report again