Thursday, 30 March 2017

Mapping the Backup path in destination SQL Server

For Mapping the following commands should be executed in the Destination Server

GO
-- Update currently configured values for advanced options.
RECONFIGURE
GO
-- To enable xp_cmdshell
EXEC sp_configure 'xp_cmdshell', 1
GO
-- Update currently configured values for advanced options.
RECONFIGURE
GO
---------------------------------------------

\\TRIG-O-1898\aa Servername\Foldername (The foldername should not contain space)

EXEC xp_cmdshell 'NET USE M: \\TRIG-O-1898\aa trig@123 /USER:trigchn\spdev23'

EXEC xp_cmdshell 'Dir M:'

--------------------------------------------------

For Restore in command:

RESTORE DATABASE WSS_Content_10000 FROM DISK = 'M:\WSS_Content_10000_backup_2016_11_11_200006_8301046.BAK'
GO

 --------------------------------------------------

For delete the network mapping

EXEC XP_CMDSHELL 'net use M: /delete'

------------------------------------------------

After this commands executed successfully, take Content Databases backup and specify the path from Source and restore in Destination 

Boundaries and limits for SharePoint 2013

Configure automatic, scheduled database backups in SQL

Wednesday, 29 March 2017

Sign in as different user" option in SharePoint 2013

Step: 1
Go to the location C:\Program Files\Common Files\microsoft shared\Web ServerExtensions\15\TEMPLATE\CONTROLTEMPLATES.
Here we have a file named welcome.ascx.

Step: 2
Open welcome.ascx in Visual Studio or in Notepad and add the following code and save:

<SharePoint:MenuItemTemplate runat="server" ID="ID_LoginAsDifferentUser"
  Text="<%$Resources:wss,personalactions_loginasdifferentuser%>"
  Description="<%$Resources:wss,personalactions_loginasdifferentuserdescription%>"
  MenuGroupId="100"
  Sequence="100"
  UseShortId="true"/>

And it should be above the tag which has ID_RequestAcess.
Step: 3
Refresh the site, and it's been enabled:

This content cannot be displayed in a frame - (Permissive XFrame Header)

Tuesday, 28 March 2017