Pages

Wednesday, March 7, 2018

Scheduled workflows and the Nintex Site Workflow Scheduler timer job

If Nintex Site workflow is not running or trigger by automatically, you need to follow in the below steps:

The Nintex Workflow Scheduler job should only have one instance listed in the Timer Job Definitions page.  To check, please go to Central AdministrationMonitoring Timer Jobs Review job definitions.  Scroll through until you locate Nintex Workflow Scheduler.  There should be only one instance there.  If there are more, all but one will need to be deleted, ensuring the one that is left is on a web application on a server running the “Microsoft SharePoint Foundation Web Application” service.


To change this, the NWAdmin.exe 
InstallTimerJob and UninstallTimerJob operations can be used to bind the timer job to a Web application running the Microsoft SharePoint Foundation Web Application service.  Doing this will ensure SharePoint executes scheduled workflows on a web front end servers, so any content web application running the web application service will do (only one per farm).

The nwadmin.exe command line tool is used.  Full information here NWAdmin Operations - Nintex Workflow 2010

Please type (do not copy and paste) these commands:
1.      NWAdmin.exe -o UninstallTimerJob -job ScheduledWorkflows
    (Use above line if it is currently installed on Central Admin Web App, if not specify what Web App to remove it from using -url switch)

Then:

2.      NWAdmin.exe -o InstallTimerJob -job ScheduledWorkflows -url http://yourwebappurl/

Naturally, you will need to replace http://yourwebappurl/ with the real URL of the relevant web application you choose to install it on.

NOTE: Only scheduled workflows use the Nintex Workflow Scheduler service.  Any regular workflow is run at first by the "w3wp.exe" service and once having been "put to sleep", then after by "owstimer.exe", the SharePoint Timer service.  Moving the Nintex Workflow Scheduler will not interfere with regular workflows at all.  

Install, Uninstall and reinstall can be done during business hours, there is no resets, down-time or any impact to workflows.  The timer job will pickup where it left off after reinstall and run any schedules that were missed during reinstall. 

Screens:




How do I delete columns that workflows create in a sharepoint list

Here is what you should do:
1. Get SharePoint Manager from Codeplex, if you've not already. It's a freeware with very useful feature for people like us. you can download it.
2. Run SharePoint Manager as Administrator 
3. Under the site -> List -> Fields, change the property of Workflow field Allow Deletion True
4. Open the site in SPD, Edit List coulmns, Show Read Only columns & finally delete.
Sharepoint Manager Screen:


Sharepoint Designer

Thursday, February 22, 2018

Remove-SPODeletedSite - Sharepoint Online site from Recycle bin


1.Connect Sharepoint Online via SPO Service

Connect-SPOService -Url https://TenantName-admin.sharepoint.com/

Example:

Go to your Sharepoint Admin center and copy URL

Connect-SPOService -Url https://LiveSolution-admin.sharepoint.com/

2. Enter Login Credentials.

3.Execute this command and Enter Y

Remove-SPODeletedSite -Identity https://LiveSolution.sharepoint.com/sites/Testing

Site will be removed immediately from Recycle Bin.

Tuesday, January 23, 2018

All Power shell Backup Commands for SharePoint Site


Backup Site Collection

Backup -SPSite http://spuat/sites/SG -Path C:\Backup\SGSite.bak

Restore Site Collection

Restore-SPSite http://spuat:222/sites/SG  -Path C:\Backup\SGSite.bak -Force

Monday, January 8, 2018

Truncate WSS_Logging MDF and LDF database in the Sharepoint Server

we try to access our SharePoint site and notice that site does not load and instead throws an error. 
we investigate the error and find out that it has something to do with the WSS_Logging database when check WSS_LOGGIN MDF file size has more than 100 GB out of 120 GB Disk space. 
It is a common problem and If you are facing this type of issue, truncate your WSS_Logging DB and you should be follow in the below steps:

1.       Open your SQL UI. Right click WSS_Logging DB and go to Reports > Disk Usage OR Reports > Standard Reports > Disk Usage.

Figure 1: Disk Usage

2.       In the disk usage report, expand the second node to see current disk usage. It should be full.



3.       Right-click WSS_Logging B and select “New Query” and paste the following script in the window and then hit F5 to execute it. NOTE: This script was copied from the following link:


Script:

·         DECLARE @TableName AS VARCHAR(MAX)
DECLARE table_cursor CURSOR
FOR
SELECT TABLE_NAME
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_TYPE = 'BASE TABLE'
AND TABLE_NAME LIKE '%_Partition%'
OPEN table_cursor
FETCH NEXT FROM table_cursor INTO @TableName
WHILE @@FETCH_STATUS = 0
BEGIN
DECLARE @SQLText AS NVARCHAR(4000)

SET @SQLText = 'TRUNCATE TABLE ' + @TableName

EXEC sp_executeSQL @SQLText

FETCH NEXT FROM table_cursor INTO @TableName
END
CLOSE table_cursor
DEALLOCATE table_cursor


Different people have written different scripts to truncate the table. This one is a tested solution and works perfectly.

4.       After executing the query, go back to the disk usage report and now you should see that the database is empty. Open your SharePoint site and it should work.


After that we shrink MDF files from SQL Server management studio then WSS Logging MDF files has reduced disk size and which is working fine and tested in my environment.