Truncate SharePoint Log Files for All the database in SQL Server


Truncate Log Files for All the database in SQL Server

1. Perform full backup of all your database
2. Open your SQL Management Studio

3. Click on New Query
4. Insert the code and click Execute

clip_image002


SQL 2008

use master
DECLARE @Statement varchar (4000)
SELECT @Statement = ”
SELECT @Statement = @Statement + ‘USE [?];’
SELECT @Statement = @Statement + ‘DECLARE @Log_Logical_FileName varchar (100);’
SELECT @Statement = @Statement + ‘SELECT @Log_Logical_FileName = rtrim(name) FROM dbo.sysfiles WHERE fileid = 2; ‘
SELECT @Statement = @Statement + ‘ALTER DATABASE [?] SET RECOVERY SIMPLE WITH NO_WAIT;’
SELECT @Statement = @Statement + ‘DBCC SHRINKFILE(@Log_Logical_FileName,1);’
SELECT @Statement = @Statement + ‘ALTER DATABASE [?] SET RECOVERY FULL WITH NO_WAIT;’
EXEC sp_MSforeachdb @command1=@Statement
GO

SQL 2005

use master
DECLARE @Statement varchar (4000)
SELECT @Statement = ”
SELECT @Statement = @Statement + ‘USE [?]; ‘
SELECT @Statement = @Statement + ‘DECLARE @Log_Logical_FileName varchar (100); ‘
SELECT @Statement = @Statement + ‘SELECT @Log_Logical_FileName = rtrim(name) FROM dbo.sysfiles WHERE fileid = 2; ‘
SELECT @Statement = @Statement + ‘BACKUP LOG [?] WITH TRUNCATE_ONLY; ‘
SELECT @Statement = @Statement + ‘DBCC SHRINKFILE(@Log_Logical_FileName,1); ‘
EXEC sp_MSforeachdb @command1=@Statement
GO

Running this will truncate all your log file

Publishing Portal Missing Team Site Template


Publishing Portal Missing Team Site Template

Cannot find the “Team Site” template when I try to create a new site in SharePoint 2010
I checked Site Collection Administration | Features and all the features I needed are active

clip_image002

Went to Site Settings | Features and Team Collaboration Lists are active

clip_image004

Still when I try to create new site, I don’t see any Team Site templates

clip_image006

Solution:

Go to Site Action | Site Settings | Page Layouts and Site Templates

clip_image008

Select Team Site (ALL) and Add. Click OK below to add all the Team Sites

clip_image010

Now if you go to create sites, you will see the team sites template

clip_image012

Delete Orphaned Project Database


How to delete orphaned Project Database?

The database specified is already used by another project server. Enter a different server or database name and try again.

atabase_specified_already_used_another_project_server

To delete orphaned Project Database

1. Run: Get-SPDatabase | Select Name

get-spdatabase

2. Identify the database which you want to delete and open SQL Management Studio
3. Select SharePoint ConfigDB and run this query

SELECT OD.ID AS DepID,OD.Name AS DepName, O.ID AS ObID,O.Name AS ObName
FROM Objects AS O
INNER JOIN Dependencies AS D ON O.ID = D.ObjectID
INNER JOIN Objects AS OD ON D.DependantID = OD.ID
WHERE O.Name like ‘ProjectServer_Archive’


remove-project-database

4. Get the GUID ID of the orphaned Project Server Database

GuidID-Delete-Project-Server-Database

5. Copy DepID and open STSADM

stsadm.exe -o deleteconfigurationobject -id <objectId>
stsadm.exe -o deleteconfigurationobject -id B41E07C6-BFE4-4F70-96AB-D4FCB1514A63

stsadm-orphaned-database

6. Perform the steps 3 to 5 for all the orphaned database and create Project Site.

SharePoint Server reference architecture in AWS


SharePoint server reference architecture for public facing website scenario using Amazon AWS

Amazon Web Services Architecture Diagrams for Sharepoint
Amazon Web Services Architecture Diagrams for Sharepoint

 

Social Intranets with SharePoint and Yammer


Social Intranet with SharePoint and Yammer concept

Before actually going on to the technical details, let’s first clarify the concept slightly with few pictures and some description. SharePoint 2013 had actually natively some great social capabilities, but roughly on the same time as we released the beta 2 for SharePoint 2013, we announced that we have bought the Yammer. At the time I personally didn’t really get the reason (I’m a simple person), but after working with the Yammer for a while, I seriously felt in love with it… it does provide some great social capabilities and it will dramatically to decrease the email inbox growth, which is great news for me and for many others.

Classic challenge however with the Yammer has been that it feels so disconnected from the collaboration platform, which is commonly SharePoint and there is still some overlapping capabilities even in Office365 SharePoint platform. Obviously this disconnected used experience will be adjusted in the future (you don’t need to be oracle to realize that), but already today you can build the needed integrations for the end users with pretty simple customizations.

Following pictures shows an imaginary Intranet concept build on top of the Office Garage (check the series) branding. I’ve just used the Office Garage colors and branding to demonstrate the capabilities and to provide some nice UI elements, but obviously this same concepts is possible to apply with any Intranet in Office365 or in the on-premises. Objective is pretty simple – let’s make the end user experience better by introducing some simple JavaScript integrations between SharePoint and Yammer capabilities so that we can combine the best from both systems..

image

And here’s an example of using Yammer with the team sites on replacing the out of the box SharePoint team site newsfeed discussion.

image

Yammer also in on-premises as the social platform?

Actual initial reason why I got involved on this Yammer integration discussion was requirements from one global on-premises deployment, where the customer was not willing to go to the Office365 due miscellaneous reasons. Customer had three existing SharePoint farms cross the world and as part of the SharePoint 2013 upgrade, they wanted to start using also the different social capabilities from our platform.

Default on-premises social capabilities (SharePoint social) are having some challenges with multi-farm deployments, since user profile and distributed cache information are not shared cross the farms. In this particular case customer was however also interested on seeing the possibilities with Yammer, so we designed the architecture to use Yammer as the social platform, so that we can address the needed social capabilities (messaging, discussions, likes, follows). As a side a note, we also did design a custom user profile property sync between the three farms to ensure that farm specific user profile properties are sync’d between the other farms for people search purposes. This was needed for few other planned functionalities as well and since we don’t have user profile replication engine for SharePoint 2013, this had to be solved with a custom add-on. Details on this custom sync would however require separate blog post, so let’s not go too detailed on overall architecture design and requirements.

In high level the design was as in following picture. Key point was that we would use the Yammer social capabilities from the cloud as the engine for any social functionalities, but still keep the normal collaboration and document management functionalities in on-premises.

image

In many cases using Yammer, but then not using Office365, could be seen as strange, but in this case customer explicitly wanted to have the actual document storage in their on-premises, even though the social capabilities are coming from the cloud. Not necessarily typical setup, but completely valid hybrid design which could be taken based on circumstances.

Read More: http://blogs.msdn.com/b/vesku/archive/2014/03/30/getting-started-on-building-social-intranets-with-sharepoint-and-yammer.aspx