首页 > 其他 > 详细

Setsitelock: Stsadm operation (Office SharePoint Server)

时间:2014-02-13 19:51:21      阅读:432      评论:0      收藏:0      [点我收藏+]

Setsitelock: Stsadm operation (Office SharePoint Server)

SharePoint 2007
 
6 out of 8 rated this helpful - Rate this topic
 

Updated: April 28, 2009

Applies To: Office SharePoint Server 2007

Updated: 2009-04-28

Description

Sets a value that specifies whether the site collection is locked and unavailable for read or write access. This operation should be used in conjunction with the Getsitelock operation. For more information, see the Examples section.

bubuko.com,布布扣Important:

In Service Pack 2 for SharePoint Products and Technologies, site collections are automatically locked as read-only before a backup process occurs. Therefore, there is no need to use the Setsitelock: Stsadm operation (Office SharePoint Server) operation. If you do not want site collections to be locked as read-only, you must specify the nositelock parameter of the Backup: Stsadm operation (Office SharePoint Server) operation that is available in Microsoft Office SharePoint Server 2007 with Service Pack 2 (SP2).

Syntax

stsadm -o setsitelock

   -url <URL name>

   -lock {none | noadditions | readonly | noaccess}

Parameters

 
Parameter name Value Required? Description

url

A valid URL, such as http://server_name

Yes

The URL of the site collection.

lock

Any of the following values:

  • None: Sets the site collection to unlock.

  • Noadditions: Permits changes that reduce the size of the data.

    For example, if you had an announcement list item whose body consisted of 50 characters, you could successfully edit the list item so that the body was reduced to 25 characters. However, if you tried to edit the list item so that they body was increased to 100 characters, that would be blocked.

  • Readonly: Sets the site collection to read-only.

  • Noaccess: Sets the site collection unavailable to all users.

Yes

Set the lock status of the site collection.

Examples

A common situation where the getsitelock and setsitelock operations are useful is when a site is backed up. Typically, before you back up a site collection, the site should be locked and no users should have access to it.

To determine the lock status of the site, you can use the following getsitelock syntax:

stsadm -o getsitelock -url http://server_name

Once the lock status of the site collection is determined, you can use the noaccess parameter of the setsitelock operation to lock out all users to the site:

stsadm -o setsitelock -url http://server_name -lock noaccess

You can use the Backup operation to create a backup of the site collection:

stsadm -o backup -url http://server_name -filename "filename.bak" -overwrite

After the site has been backed up, you can use the none parameter of the setsitelock operation to remove all locks to the site:

stsadm -o setsitelock -url http://server_name -lock none

 

转自 http://technet.microsoft.com/en-us/library/cc262811(v=office.12).aspx

Setsitelock: Stsadm operation (Office SharePoint Server)

原文:http://www.cnblogs.com/midnight-travel/p/3547728.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!