Monday, June 2, 2014

“Microsoft SharePoint Foundation Web Application” service stuck on starting OR stopping

Run following command through Shell

stsadm -o provisionservice -action stop -servicetype spwebservice
stsadm -o provisionservice -action start -servicetype spwebservice


Note: this has to run from the server where you intend to host the web application
And then IISRESET / NOFORCE

This may take long time to execute this command depending on number of web applications.

The transaction log for database 'sampledb' is full. To find out why space in the log cannot be reused, see the log_reuse_wait

Execute following commands to shrink logs -

ALTER DATABASE sampledb
SET RECOVERY SIMPLE;
GO

DBCC SHRINKFILE (sampledb_log, 1);
GO
sp_helpdb sampledb
GO
ALTER DATABASE sampledb
SET RECOVERY FULL
GO

Note : Shrinking of log file will not work if recovery mode is set to 'FULL'.