MOSS MVP

I've moved my blog to http://blog.falchionconsulting.com!. Please update your links. This blog is no longer in use--you can find all posts and comments at my new blog; I will no longer be posting to this site and comments have been disabled.

Thursday, November 29, 2007

Search Scopes and Rules

Our previous environment had just one web application and no existing search scopes beyond the default ones. With our upgrade we wanted to (finally) take advantage of search scopes to help filter the result sets and make searches more relevant. In order to make the creation of scopes scriptable I needed three new commands: gl-createsearchscope, gl-updatesearchscope, and gl-addsearchrule. I thought about creating commands to support editing and deleting but as I don't currently have the need for that I decided against it (with the exception of the gl-updatesearchscope command which I needed to be able to assign my shared search scope to groups on the various web applications). For some reason I was expecting this to be more difficult than it was but after digging into it I found it to be rather easy. The commands I created are detailed below.

1. gl-createsearchscope

The code to work with search scopes is really straight forward. You obtain a "Microsoft.Office.Server.Search.Administration.Scopes" object which is effectively your scope manager object. From this you use the AllScopes property (which is a ScopeCollection object) and call the Create method passing in appropriate parameters. Once you've got your scope created you can add it to relavent groups by getting the ScopeDisplayGroup object via the GetDisplayGroup() method of the Scopes object. Note that the scope can be owned by a site collection or the SSP. If a null value is passed into the Create method for the owningSiteUrl parameter then the scope will be owned by the SSP (it will be a shared scope available to all site collections belonging to the SSP which is determined by the passed in url parameter which loads the appropriate SPSite object). The core code is shown below:

   1: public override int Run(string command, System.Collections.Specialized.StringDictionary keyValues, out string output)
   2: {
   3:  output = string.Empty;
   4:  
   5:  InitParameters(keyValues);
   6:  
   7:  string url = Params["url"].Value.TrimEnd('/');
   8:  string name = Params["name"].Value;
   9:  string description = Params["description"].Value;
  10:  string searchPage = null;
  11:  if (Params["searchpage"].UserTypedIn)
  12:   searchPage = Params["searchpage"].Value;
  13:  bool sspIsOwner = Params["sspisowner"].UserTypedIn;
  14:  
  15:  using (SPSite site = new SPSite(url))
  16:  {
  17:   Scopes scopeManager = new Scopes(SearchContext.GetContext(site));
  18:  
  19:   // Create the scope
  20:   Scope scope = scopeManager.AllScopes.Create(name, description, (sspIsOwner ? null : new Uri(site.Url)), true,
  21:            searchPage, ScopeCompilationType.AlwaysCompile);
  22:  
  23:   // If the user passed in any groups then add the scope to those groups.
  24:   if (Params["groups"].UserTypedIn)
  25:   {
  26:    foreach (string g in Params["groups"].Value.Split(','))
  27:    {
  28:     ScopeDisplayGroup group;
  29:     try
  30:     {
  31:      group = scopeManager.GetDisplayGroup(new Uri(site.Url), g.Trim());
  32:     }
  33:     catch (Exception)
  34:     {
  35:      group = null;
  36:     }
  37:     if (group == null)
  38:     {
  39:      scope.Delete(); // We don't want the scope created if there was an error with the groups so undo what we've done.
  40:      throw new SPException(string.Format("Display group '{0}' not found.", g));
  41:     }
  42:     group.Add(scope);
  43:     group.Update();
  44:    }
  45:   }
  46:  }
  47:  
  48:  return 1;
  49: }

The syntax of the command can be seen below:

C:\>stsadm -help gl-createsearchscope

stsadm -o gl-createsearchscope

Sets the search scope for a given site collection.

Parameters:
        -url <site collection url>
        -name <scope name>
        [-description <scope description>]
        [-groups <display groups (comma separate multiple groups)>]
        [-searchpage <specific search results page to send users to for results when they search in this scope>]
        [-sspisowner]

Here's an example of how to create a shared search scope (owned by the SSP):

stsadm –o gl-createsearchscope -url "http://sspadmin/ssp/admin" -name "Search Scope 1" -description "A really helpful search scope." -groups "search dropdown, advanced search" -sspisowner

Note that the group assignments will not show up on other web applications - you must use the updatesearchscope command to associate the scope with groups on each web application of interest.

2. gl-updatesearchscope

This code is almost identical to that of the gl-createsearchscope command - the main difference is that I'm updating individual properties rather than calling the Create method and I have to clear out existing groups before adding the newly assigned groups:

   1: public override int Run(string command, System.Collections.Specialized.StringDictionary keyValues, out string output)
   2: {
   3:  output = string.Empty;
   4:  
   5:  InitParameters(keyValues);
   6:  
   7:  string url = Params["url"].Value.TrimEnd('/');
   8:  string name = Params["name"].Value;
   9:  string description = Params["description"].Value + string.Empty;
  10:  string searchPage = null;
  11:  if (Params["searchpage"].UserTypedIn)
  12:   searchPage = Params["searchpage"].Value;
  13:  
  14:  using (SPSite site = new SPSite(url))
  15:  using (SPWeb web = site.RootWeb)
  16:  {
  17:   if (!web.CurrentUser.IsSiteAdmin)
  18:    throw new UnauthorizedAccessException();
  19:  
  20:   Scopes scopeManager = new Scopes(SearchContext.GetContext(site));
  21:  
  22:   Scope scope;
  23:   try
  24:   {
  25:    scope = scopeManager.GetScope(new Uri(site.Url), name);
  26:   }
  27:   catch (ScopeNotFoundException)
  28:   {
  29:    scope = scopeManager.GetScope(null, name);
  30:   }
  31:   if (Params["description"].UserTypedIn)
  32:    scope.Description = description;
  33:   if (Params["searchpage"].UserTypedIn)
  34:    scope.AlternateResultsPage = searchPage;
  35:  
  36:   scope.Update();
  37:  
  38:   // If the user passed in any groups then add the scope to those groups.
  39:   if (Params["groups"].UserTypedIn)
  40:   {
  41:    // Clear out any group settings.
  42:    foreach (ScopeDisplayGroup g in scopeManager.AllDisplayGroups)
  43:    {
  44:     if (g.Contains(scope))
  45:     {
  46:      g.Remove(scope);
  47:      g.Update();
  48:     }
  49:    }
  50:  
  51:    // Add back the specified groups.
  52:    foreach (string g in Params["groups"].Value.Split(','))
  53:    {
  54:     ScopeDisplayGroup group;
  55:     try
  56:     {
  57:      group = scopeManager.GetDisplayGroup(new Uri(site.Url), g.Trim());
  58:     }
  59:     catch (Exception)
  60:     {
  61:      group = null;
  62:     }
  63:     if (group == null)
  64:     {
  65:      scope.Delete(); // We don't want the scope created if there was an error with the groups so undo what we've done.
  66:      throw new SPException(string.Format("Display group '{0}' not found.", g));
  67:     }
  68:     group.Add(scope);
  69:     group.Update();
  70:    }
  71:   }
  72:  }
  73:  
  74:  return 1;
  75: }

The syntax of the command can be seen below:

C:\>stsadm -help gl-updatesearchscope

stsadm -o gl-updatesearchscope

Updates the specified search scope for a given site collection.

Parameters:
        -url <site collection url>
        -name <scope name>
        [-description <scope description>]
        [-groups <display groups (comma separate multiple groups)>]
        [-searchpage <specific search results page to send users to for results when they search in this scope>]

Here's an example of how to update a web application to assign the shared scope created above to appropriate groups:

stsadm –o gl-updatesearchscope -url "http://intranet" -name "Search Scope 1" -groups "search dropdown, advanced search"

3. gl-addsearchrule

Once you have a search scope created you can now add rules to it. This command is slightly more complex due to the different types of rules that can be created. In general there are four types: AllContent, ContentSource, PropertyQuery, and WebAddress. The ContentSource is typically only used with shared scopes (you can create a ContentSource rule on a scope that is not shared using this tool but you cannot do it via the browser - I'm honestly not sure if the rule will work correctly though). To manage the rules of a scope you simply grab the Rules property of the Scope object and call the appropriate method (there's one for each type of rule except for ContentSource which is effectively just a PropertyQuery rule that uses the ContentSource managed property):

   1: public override int Run(string command, System.Collections.Specialized.StringDictionary keyValues, out string output)
   2: {
   3:  output = string.Empty;
   4:  
   5:  InitParameters(keyValues);
   6:  
   7:  string url = Params["url"].Value.TrimEnd('/');
   8:  string scopeName = Params["scope"].Value;
   9:  PageType type = (PageType)Enum.Parse(typeof(PageType), Params["type"].Value, true);
  10:  
  11:  ScopeRuleFilterBehavior behavior = ScopeRuleFilterBehavior.Include;
  12:  if (Params["behavior"].UserTypedIn)
  13:   behavior = (ScopeRuleFilterBehavior)Enum.Parse(typeof(ScopeRuleFilterBehavior), Params["behavior"].Value, true);
  14:  
  15:  
  16:  using (SPSite site = new SPSite(url))
  17:  {
  18:   SearchContext context = SearchContext.GetContext(site);
  19:   Scopes scopeManager = new Scopes(context);
  20:   Scope scope = scopeManager.GetScope(new Uri(site.Url), scopeName);
  21:   Schema schema = new Schema(context);
  22:  
  23:   switch(type)
  24:   {
  25:    case PageType.AllContent:
  26:     scope.Rules.CreateAllContentRule();
  27:     break;
  28:    case PageType.ContentSource:
  29:     scope.Rules.CreatePropertyQueryRule(behavior, schema.AllManagedProperties["ContentSource"], Params["propertyvalue"].Value);
  30:     break;
  31:    case PageType.PropertyQuery:
  32:     ManagedProperty prop;
  33:     try
  34:     {
  35:      prop = schema.AllManagedProperties[Params["property"].Value];
  36:     }
  37:     catch (KeyNotFoundException)
  38:     {
  39:      throw new SPException(
  40:       string.Format("Property '{0}' was not found.", Params["property"].Value));
  41:     }
  42:     scope.Rules.CreatePropertyQueryRule(behavior, prop, Params["propertyvalue"].Value);
  43:  
  44:     break;
  45:    case PageType.WebAddress:
  46:     UrlScopeRuleType webType =
  47:      (UrlScopeRuleType) Enum.Parse(typeof (UrlScopeRuleType), Params["webtype"].Value, true);
  48:     scope.Rules.CreateUrlRule(behavior, webType, Params["webvalue"].Value);
  49:     break;
  50:   }
  51:  }
  52:  
  53:  return 1;
  54: }

The syntax of the command can be seen below:

C:\>stsadm -help gl-addsearchrule

stsadm -o gl-addsearchrule

Adds a search scope rule to the specified scope for a given site collection.

Parameters:
        -url <site collection url>
        -scope <scope name>
        -behavior <include | require | exclude>
        -type <webaddress | propertyquery | contentsource | allcontent>
        [-webtype <folder | hostname | domain>]
        [-webvalue <value associated with the specified web type>]
        [-property <managed property name>]
        [-propertyvalue <value associated with the specified property or content source>]

Here's an example of how to add a rule to the scope created above which will prevent content from the HR site collection from being returned in the results:

stsadm –o gl-addsearchrule -url "http://intranet" -scope "Search Scope 1" -behavior exclude -type webaddress -webtype folder -webvalue "http://intranet/hr"

33 comments:

Padmaja P said...

Hi,
I developed searchbox and SearchResults User Controls. Iam trying to add the scopes programatically by writing a CreateScopes function in the pageload of SearchBox. But whenver page is refreshed its throwing an error that the scope already exists. How can it be avoided and also iam not able to add the scope to the Search DropDown Display box. Please help me iam badli in need of it

Thanx in advance

Gary Lapointe said...

You just have to check that the scope doesn't already exist before attempting to create it again. Here's some code that should get you started:

SearchContext context = SearchContext.GetContext(site);
Scopes scopeManager = new Scopes(context);

Scope scope;
try
{
scope = scopeManager.GetScope(new Uri(site.Url), scopeName);
}
catch (ScopeNotFoundException)
{
scope = scopeManager.GetScope(null, scopeName);
}

Note that there are other, more efficient ways to get the SearchContext if you are within the context of a web request.

Gary Lapointe said...

I forgot to answer the part about the drop down - you need to assign it to a display group (it won't show up until the next incremental crawl though). Download my commands and you'll find plenty of code to do all of this.

Paddy said...

Hi,

Thanx a lot. I have one more doubt. I need to restrict my search to some folders existing in MOSS depending on the scope selected. Like lets suppose i have a scope called Diseases. If the user selects it then my search should be restricted to a Folder by name disorders in (moss->documentlibraries->pages->diseases) and this folder contains URL like http://dev/Pages/Forms/AllItems.aspx?RootFolder=%2fPages%2fdiseases&FolderCTID=0x010100C568DB52D9D0A14D9B2FDCC96666E9F2007948130EC3DB064584E219954237AF3900847D2AA5C4F7BF44ADAAF90D9939A0C1&View=%7b131B08F8%2d78DE%2d4CE4%2dBB1F%2d4837F309516C%7d
in this case i tried to create a scope as

newScope = scopes.AllScopes.Create("Diseases", string.Empty, null, true, "resultpage.aspx", ScopeCompilationType.AlwaysCompile);

and added the rule as

newScope.Rules.CreateUrlRule(ScopeRuleFilterBehavior.Include, UrlScopeRuleType.Folder, "Diseases");

But its not fetching me the information i need. Instead if i go into the searchsettings in SSP and open the rule. It is containing Diseases in the Folder textbox and when i say ok its throwing an error as incorrect URL.

Now how should i restrict my search to the folder.

I know its a long one but iam facing a lot of difficulty with this. Is my approach correct or is there something wrong which iam doing.

I can specify the URL directly in the Folder TextBox of the Rule. But then the folder with same name can exist in some other parent folder which also needs to be searched.

Please do help me....

Gary Lapointe said...

The url needs to be a complete url (not just the folder name).

Padmaja P said...

Hi,

Lets say i have a Folder named Publications in

Document Libraries->Pages->Publications

and the Folder with the same name is also there in

Document Libraries->Pages->News->Publications

In the above two cases the Parent Folder for Publications is different.

Now if i want to create Web Address rule so that it will search my Publications Folder irrespective of the Parent Folder.

i.e,can i use wildcards in my URL like */Publications/* so that my search will be done in that folder.

Any comments and suggestions are highly appreciated.

Thanks in Advance...

Gary Lapointe said...

As far as I understand how it's done you would simply add two rules - one for each publications folder. I don't know if you can use wild cards or not (I'm really not a search expert - you may want to try posting these questions to the sharepoint search forum on msdn - you'll probably get better responses there).

Padmaja P said...

Hi Gary,

Its not related to search. Buthope you can give me a suggestion for my problem.

failure trying to synch site a7b12d90-7d1d-4341-8df3-a1d92eba7a47 for ContentDB db7fb0d6-7d0d-4230-8de5-e7cc00ca0db7 WebApp 55de867d-5a9d-4ac4-83d6-f3ee9ee98df2. Exception message was Cannot insert duplicate key row in object 'dbo.UserMemberships' with unique index 'CX_UserMemberships_RecordId_MemberGroupId_SID'.
The statement has been terminated..
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

i got this error in my log file and my site was not opening. I found that this is a problem of content database synchronization and performed a series of steps
stsadm -o preparetomove -contentdb -ContentDB SQLserver:DB_NAME -site http://website

stsadm -o deletecontentdb -url http://website -databaseserver SQLserver -databasename DB_NAME

stsadm -o addcontentdb -url http://website -databasename DB_NAME -databaseserver SQLserver

but all these commands i performed on Sharepoint_Config_dev which is my configuration database

for the addcontentdb comand i got an error that

C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN>stsadm -o addcontentdb -url http://Sharepoint-dev -databasename Sharepoint_Config_Dev -databaseserver SPOINT-SQL Upgrade completed with errors. Review the upgrade.log file located in C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\Logs\Upgrade.log. The number of errors and warnings is listed at the end of the upgrade log file.

and in the upgrade log file its showing me two errors.

Since then i am not able to open my Central Administration.Is there any chance to get back my Central Administration.

Please suggest me something as i am in gr8 touble.

Gary Lapointe said...

I wish I had some words of encouragement but frankly you've got me stumped. Are there any other errors that show when you try to load your central admin (anything in the event log or the 12 hive log files)?

Padmaja P said...

[SPManager] [DEBUG] [12/18/2007 2:55:21 PM]: Logging enabled Tuesday, December 18, 2007 at 2:55:21 PM.
[SPManager] [INFO] [12/18/2007 2:55:21 PM]: Inplace Upgrade session starts. root object = SPContentDatabase Name=Sharepoint_Config_Dev Parent=SPDatabaseServiceInstance, recursive = False
[SPManager] [DEBUG] [12/18/2007 2:55:21 PM]: CanUpgrade [SPContentDatabase Name=WSS_Content_Dev Parent=SPDatabaseServiceInstance] returned: True.
[SPManager] [DEBUG] [12/18/2007 2:55:21 PM]: NeedsUpgrade [SPContentDatabase Name=WSS_Content_Dev Parent=SPDatabaseServiceInstance] returned: False.
[SPManager] [INFO] [12/18/2007 2:55:21 PM]: Preparing to upgrade PersistedUpgradableObject: SPContentDatabase Name=Sharepoint_Config_Dev Parent=SPDatabaseServiceInstance. This object's current status is Online.
[SPManager] [DEBUG] [12/18/2007 2:55:21 PM]: Using cached [SPContentDatabase Name=Sharepoint_Config_Dev Parent=SPDatabaseServiceInstance] CanUpgrade value: True.
[SPHierarchyManager] [DEBUG] [12/18/2007 2:55:21 PM]: SPTree Value=SPContentDatabase Name=Sharepoint_Config_Dev Parent=SPDatabaseServiceInstance IsRoot=True.
[SPHierarchyManager] [DEBUG] [12/18/2007 2:55:21 PM]: 1/1 root trees in cache.
[SPManager] [DEBUG] [12/18/2007 2:55:21 PM]: SPTree Value=SPContentDatabase Name=Sharepoint_Config_Dev Parent=SPDatabaseServiceInstance IsGrown=False IsRoot=True IsLeaf=True.
[SPManager] [DEBUG] [12/18/2007 2:55:21 PM]: Using cached [SPContentDatabase Name=Sharepoint_Config_Dev Parent=SPDatabaseServiceInstance] NeedsUpgrade value: True.
[SPManager] [DEBUG] [12/18/2007 2:55:21 PM]: Upgrading [SPContentDatabase Name=Sharepoint_Config_Dev Parent=SPDatabaseServiceInstance].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:21 PM]: Invalidating WYukon signature in SPContentDatabase Name=Sharepoint_Config_Dev Parent=SPDatabaseServiceInstance.
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:21 PM]: ---------------- Begin Table RowCount Dump ----------------
[SPSqlCommandFactory] [DEBUG] [12/18/2007 2:55:21 PM]: SqlCommand.CommandTimeout = 1800
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:21 PM]: Table [dbo].[AntiVirusVendors] RowCount = 0
[SPSqlCommandFactory] [DEBUG] [12/18/2007 2:55:21 PM]: SqlCommand.CommandTimeout = 1800
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:21 PM]: Table [dbo].[Binaries] RowCount = 1
[SPSqlCommandFactory] [DEBUG] [12/18/2007 2:55:21 PM]: SqlCommand.CommandTimeout = 1800
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:21 PM]: Table [dbo].[Classes] RowCount = 144
[SPSqlCommandFactory] [DEBUG] [12/18/2007 2:55:21 PM]: SqlCommand.CommandTimeout = 1800
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:21 PM]: Table [dbo].[CustomTemplates] RowCount = 0
[SPSqlCommandFactory] [DEBUG] [12/18/2007 2:55:21 PM]: SqlCommand.CommandTimeout = 1800
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:21 PM]: Table [dbo].[Databases] RowCount = 0
[SPSqlCommandFactory] [DEBUG] [12/18/2007 2:55:21 PM]: SqlCommand.CommandTimeout = 1800
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:21 PM]: Table [dbo].[Dependencies] RowCount = 90
[SPSqlCommandFactory] [DEBUG] [12/18/2007 2:55:21 PM]: SqlCommand.CommandTimeout = 1800
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:21 PM]: Table [dbo].[EmailEnabledLists] RowCount = 0
[SPSqlCommandFactory] [DEBUG] [12/18/2007 2:55:21 PM]: SqlCommand.CommandTimeout = 1800
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:21 PM]: Table [dbo].[Globals] RowCount = 0
[SPSqlCommandFactory] [DEBUG] [12/18/2007 2:55:21 PM]: SqlCommand.CommandTimeout = 1800
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:21 PM]: Table [dbo].[InstalledWebPartPackages] RowCount = 0
[SPSqlCommandFactory] [DEBUG] [12/18/2007 2:55:21 PM]: SqlCommand.CommandTimeout = 1800
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:21 PM]: Table [dbo].[LastUpdate] RowCount = 1
[SPSqlCommandFactory] [DEBUG] [12/18/2007 2:55:21 PM]: SqlCommand.CommandTimeout = 1800
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:21 PM]: Table [dbo].[Objects] RowCount = 577
[SPSqlCommandFactory] [DEBUG] [12/18/2007 2:55:21 PM]: SqlCommand.CommandTimeout = 1800
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:21 PM]: Table [dbo].[PendingDistributionLists] RowCount = 0
[SPSqlCommandFactory] [DEBUG] [12/18/2007 2:55:21 PM]: SqlCommand.CommandTimeout = 1800
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:21 PM]: Table [dbo].[Servers] RowCount = 0
[SPSqlCommandFactory] [DEBUG] [12/18/2007 2:55:21 PM]: SqlCommand.CommandTimeout = 1800
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:21 PM]: Table [dbo].[Services] RowCount = 0
[SPSqlCommandFactory] [DEBUG] [12/18/2007 2:55:21 PM]: SqlCommand.CommandTimeout = 1800
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:21 PM]: Table [dbo].[SiteCounts] RowCount = 7
[SPSqlCommandFactory] [DEBUG] [12/18/2007 2:55:21 PM]: SqlCommand.CommandTimeout = 1800
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:21 PM]: Table [dbo].[SiteMap] RowCount = 10
[SPSqlCommandFactory] [DEBUG] [12/18/2007 2:55:21 PM]: SqlCommand.CommandTimeout = 1800
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:21 PM]: Table [dbo].[Sites] RowCount = 0
[SPSqlCommandFactory] [DEBUG] [12/18/2007 2:55:21 PM]: SqlCommand.CommandTimeout = 1800
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:21 PM]: Table [dbo].[TimerLocks] RowCount = 14
[SPSqlCommandFactory] [DEBUG] [12/18/2007 2:55:21 PM]: SqlCommand.CommandTimeout = 1800
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:21 PM]: Table [dbo].[TimerRunningJobs] RowCount = 227
[SPSqlCommandFactory] [DEBUG] [12/18/2007 2:55:21 PM]: SqlCommand.CommandTimeout = 1800
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:21 PM]: Table [dbo].[TimerTargetInstances] RowCount = 0
[SPSqlCommandFactory] [DEBUG] [12/18/2007 2:55:21 PM]: SqlCommand.CommandTimeout = 1800
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:21 PM]: Table [dbo].[Tombstones] RowCount = 304
[SPSqlCommandFactory] [DEBUG] [12/18/2007 2:55:21 PM]: SqlCommand.CommandTimeout = 1800
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:21 PM]: Table [dbo].[Versions] RowCount = 4
[SPSqlCommandFactory] [DEBUG] [12/18/2007 2:55:21 PM]: SqlCommand.CommandTimeout = 1800
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:21 PM]: Table [dbo].[VirtualServers] RowCount = 0
[SPSqlCommandFactory] [DEBUG] [12/18/2007 2:55:21 PM]: SqlCommand.CommandTimeout = 1800
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:21 PM]: Table [dbo].[WebPartPackages] RowCount = 0
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:21 PM]: ----------------- End Table RowCount Dump -----------------
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:21 PM]: Dropping indexes.
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:21 PM]: Executing SQL DDL Script.
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:22 PM]: Dropping stored procedures.
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:22 PM]: Executing SQL DDL Script.
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:22 PM]: Calling get SchemaVersion on Database Sharepoint_Config_Dev, Status = Upgrading.
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:22 PM]: Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.RemoveOrphanedUserData].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.VerifyScrubbedLists].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.DropSystemVersionTable].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.DropFullTextSearch].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.ChangeSchemaForDocsAndUserData].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.CreateRecycleBinAction].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.ChangeSchemaForSubscriptionsAndEvents].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.UpdateEmailFieldsInSchema].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.WideListsChangeForUserData].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.AddContentTypesToLists].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.UpgradeTablesForAutoCopyFeature].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.CreateEventReceiversTable].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.CreateFeaturesTable].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.SecurityUpgrade1].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.SecurityUpgrade2].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.SecurityUpgrade3].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.SecurityUpgrade4].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.AddWorkflow].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.CreateContentTypesTable].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.UpdateSubscriptionsAddStatusAndNotifyTime].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.CreateAuditDataTable].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.AddPublishSupportForDocs].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.AddDocsWelcomePage].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.AddWebsAncestry].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.UpdateNavigationStructure].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.DocsUserDataUnificationPhase1].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.AddSubscriptionFields].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.AddRecycleBinFieldsTable].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.CreateSiteQuotaTable].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.AddSizeToContentTypes].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.CreateEventBatches].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.AddSiteVersionsTable].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.AddContentTypeIdToEventCache].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.AddMasterUrlToWebs].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.FixCorruptProps].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.CreateContentTypeUsage].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.CreateNameValuePairTable].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.AddDistributionListGroupsColumns].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.AddUserInfoListIdRootWebIdToSites].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.FixListContentType].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.AddContentTypeIdToEventReceivers].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.RemoveFullUrlFromSitesTable].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.AddListItemVersions].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.AddUIVersionString].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.AddResourceDirToContentTypes].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.CreateBuildDependenciesTable].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.AddRegionalSettings].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.AddSendToLocationColumn].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.AddDistributionListArchiveColumns].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.AddCollationNamesTable].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.AddDocumentTransformsColumnsAndTable].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.AddFieldIdToAllLinks].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.WorkflowM2Mods].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.AddFeatureIdToLists].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.ModifyAuditDataTable].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.UpgradeForIssueTracker].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.AddIsFieldIdToContentTypeUsage].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.ChangeFlagsWebPartsTable].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.AddVersionManagementColumns].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.AddPublishSupportForGenericList].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.AddProgIdToAllDocs].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.AddDraftOwnerIdForUserdata].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.CreateJunctionsTable].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.AddSiteLogoUrlToWebs].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.AddPublishingWorkflowForList].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.CalendarListRichTextDescriptionUpgrade].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.ChangeWebTableFlagsForNavigation].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.AddFlagsToGroups].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.IssueFormsRelated].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.AddSubscriptionLookupFieldPermissionResults].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.AddCtoOffset].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.WorkflowM3Mods].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.AddCustomizedCssToWebs].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.UpdateSystemIDSize].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.DropUnusedSubscriptionColumns].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.SplitSetupPathAndAddVersion].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.AddCachedNavColumnsToWebs].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.AddContentTypeIdToWebParts].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.AddSearchToLinks].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.MarkAspxDocumentsAsDirty].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.UpdateAuditDataEventDataType].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.AddNavParentWebIdToWebs].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.AddRequestEmail].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.AddExtensionToAllDocs].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.DumpFieldsAndCtypes].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.UpgradeListToContentType].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.UpdateUserDataModifiedDate].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.MultipleDistributionListArchiveColumns].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.UpgradeDiscussionLists].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.AddClassToCtUsage].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.UpdateO12Documents].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.AddEventReceiverSource].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.AddIsActiveToUserInfo].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.AddHostHeaderToSitesTable].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.ModifyCollationNamesTable].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.AddCustomMasterUrlToWebs].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.AddExternalTokenToUserInfo].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.AddIsFromFeatureToContentTypes].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.UpdateWebFlagsDefaultValue].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.AddChildCountsToAllDocs].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.UpdateQuickLaunch].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.AddModificationsToWorkflowTable].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.WidenAllListsFlags].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.DisableModerationForImgLib].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.ContactsListRichTextNotesUpgrade].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.AddInternalFgpColumnToLists].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.CreateCollatedNameValuePairTables].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.ConvertV2Perm].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.ConvertAnonymousPerm].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.ClearV2Themes].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.UpdateNewParsableDocformats].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.UpdateListItemCounts].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.FixBlogTemplateId].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.UpdateDiscussionsLinksInNavNodes].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.AddProgIdToRecycleBinTable].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.FixBlogPostViewBaseId].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.UpdateEventReceiversForIndexChanges].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.RemoveExtraFixedLengthFields].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.RemoveObsoleteNavLinks].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.MigrateSpanishTraditionalLocaleToSpanish].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.EnsureSystemListPropertiesForCatalogs].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.MakeEventDataBinary].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.FixUnghostedViews].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.CalculateWebHasFGP].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.AddRoleOrderToRoles].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.RemoveUserCollationColumnFromUserInfoTable].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.AddInt1ToEventCache].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.RemoveOpenItemFromAnonymousPermMask].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.SetIsCurrrentForListItems].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.CreateImage0xTable].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.ChangeAlertTemplateIdToAlertTemplateName].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.UpgradeAlertTemplateName].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.UpdateAdminTopologyWebPartType].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.FixAllUserDataJunctionsIndex].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.RemoveObsoleteFiledAndCt].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.ChangeNavSequencesFromPagesToLinks].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.SetWebPartListsData].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.UpgradeIssueNotifications].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.RemoveWorkflowTaskUpdateEventReceivers].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Adding upgrade action [Microsoft.SharePoint.Upgrade.FixSecondStageDiskUsed].
[SPContentDatabaseSequence] [DEBUG] [12/18/2007 2:55:23 PM]: Calling get SchemaVersion on Database Sharepoint_Config_Dev, Status = Upgrading.
[SPManager] [DEBUG] [12/18/2007 2:55:23 PM]: [SPContentDatabase Name=Sharepoint_Config_Dev Parent=SPDatabaseServiceInstance] Running 1 of 135 steps
[RemoveOrphanedUserData] [3.0.0.1000] [DEBUG] [12/18/2007 2:55:23 PM]: Begin Initialize()
[RemoveOrphanedUserData] [3.0.0.1000] [DEBUG] [12/18/2007 2:55:23 PM]: End Initialize()
[RemoveOrphanedUserData] [3.0.0.1000] [INFO] [12/18/2007 2:55:23 PM]: Remove orphaned user data.
[RemoveOrphanedUserData] [3.0.0.1000] [DEBUG] [12/18/2007 2:55:23 PM]: Begin Upgrade()
[RemoveOrphanedUserData] [3.0.0.1000] [DEBUG] [12/18/2007 2:55:23 PM]: Remove Siteless entries from the UserData table.
[RemoveOrphanedUserData] [3.0.0.1000] [DEBUG] [12/18/2007 2:55:23 PM]: SqlCommand.CommandTimeout = 1800
[SPContentDatabaseSequence] [ERROR] [12/18/2007 2:55:23 PM]: Action 3.0.0.1000 of Microsoft.SharePoint.Upgrade.SPContentDatabaseSequence failed.
[SPContentDatabaseSequence] [ERROR] [12/18/2007 2:55:23 PM]: Invalid object name 'dbo.UserData'.
[SPContentDatabaseSequence] [ERROR] [12/18/2007 2:55:23 PM]: at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at Microsoft.SharePoint.Utilities.SqlSession.ExecuteNonQuery(SqlCommand command)
at Microsoft.SharePoint.Upgrade.SPSqlCommandFactory.GetRowCount(String strTable)
at Microsoft.SharePoint.Upgrade.SPSqlCommandFactory.Make(String sqlstrCmd, String[] strTables, Int32[] nThroughputs)
at Microsoft.SharePoint.Upgrade.RemoveOrphanedUserData.Upgrade()
at Microsoft.SharePoint.Upgrade.SPActionSequence.Upgrade()
[RemoveOrphanedUserData] [3.0.0.1000] [DEBUG] [12/18/2007 2:55:23 PM]: Begin Rollback()
[RemoveOrphanedUserData] [3.0.0.1000] [DEBUG] [12/18/2007 2:55:23 PM]: End Rollback()
[RemoveOrphanedUserData] [3.0.0.1000] [DEBUG] [12/18/2007 2:55:23 PM]: Begin Dispose()
[RemoveOrphanedUserData] [3.0.0.1000] [DEBUG] [12/18/2007 2:55:23 PM]: End Dispose()
[RemoveOrphanedUserData] [3.0.0.1000] [DEBUG] [12/18/2007 2:55:23 PM]: Elapsed time: 00:00:00.1406250.
[SPManager] [ERROR] [12/18/2007 2:55:23 PM]: Upgrade [SPContentDatabase Name=Sharepoint_Config_Dev Parent=SPDatabaseServiceInstance] failed.
[SPManager] [ERROR] [12/18/2007 2:55:23 PM]: Invalid object name 'dbo.UserData'.
[SPManager] [ERROR] [12/18/2007 2:55:23 PM]: at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at Microsoft.SharePoint.Utilities.SqlSession.ExecuteNonQuery(SqlCommand command)
at Microsoft.SharePoint.Upgrade.SPSqlCommandFactory.GetRowCount(String strTable)
at Microsoft.SharePoint.Upgrade.SPSqlCommandFactory.Make(String sqlstrCmd, String[] strTables, Int32[] nThroughputs)
at Microsoft.SharePoint.Upgrade.RemoveOrphanedUserData.Upgrade()
at Microsoft.SharePoint.Upgrade.SPActionSequence.Upgrade()
[SPManager] [ERROR] [12/18/2007 2:55:23 PM]: Action 3.0.0.1000 of Microsoft.SharePoint.Upgrade.SPContentDatabaseSequence failed.
[SPManager] [ERROR] [12/18/2007 2:55:23 PM]: at Microsoft.SharePoint.Upgrade.SPActionSequence.Upgrade()
at Microsoft.SharePoint.Upgrade.SPContentDatabaseSequence.Upgrade()
at Microsoft.SharePoint.Upgrade.SPManager.Upgrade(Object o, Boolean bRecurse)
[SPManager] [DEBUG] [12/18/2007 2:55:23 PM]: Elapsed time upgrading [SPContentDatabase Name=Sharepoint_Config_Dev Parent=SPDatabaseServiceInstance]: 00:00:02.
[SPManager] [INFO] [12/18/2007 2:55:23 PM]: Resetting the status of PersistedUpgradableObject: SPContentDatabase Name=Sharepoint_Config_Dev Parent=SPDatabaseServiceInstance to Online.
[SPManager] [DEBUG] [12/18/2007 2:55:23 PM]: Using cached [SPContentDatabase Name=Sharepoint_Config_Dev Parent=SPDatabaseServiceInstance] NeedsUpgrade value: True.
[SPManager] [DEBUG] [12/18/2007 2:55:24 PM]: Using cached [SPContentDatabase Name=WSS_Content_Dev Parent=SPDatabaseServiceInstance] NeedsUpgrade value: False.
[SPManager] [INFO] [12/18/2007 2:55:24 PM]: Inplace Upgrade session finishes. root object = SPContentDatabase Name=Sharepoint_Config_Dev Parent=SPDatabaseServiceInstance, recursive = False. 2 errors and 0 warnings encountered.

This is the error which got displayed in my upgrade.log file. I don't know what to do. When iam trying to open my Central administration

Unable to connect to the database SharePoint_Config_Dev on MOSS-SQL. Check the database connection information and make sure that the database server is running..This is in the event log

Cannot Connect to the Configuration Database. This is the message displayed in the browser.

Gary Lapointe said...

I'm honestly not sure what to tell you. I'm assuming you can get to the database via sql manager and it is in fact up? My only recommedation at this point would be to restore the database from a backup (hopefully you've got one). Another option (and this is a hack if you don't have a backup) would be to setup a duplicate environment using the same names and everything and then backup the config database from there and restore on top of your defective one - I don't know how well this will work but it can't be worse than what you've got now. You may want to post this on the forums (though I think I did see a post from you there) - some of the MVPs may have some insight for you as they've seen more than I have.

Padmaja P said...

Hi,

Thanx for ur suggestion.
Can I use this command to establish connection

stsadm -o setconfigdb -connect -ds Server1 -dn Server1_collab -du User1 -dp password.

Will it work.

Gary Lapointe said...

One other thing you can try: http://technet2.microsoft.com/Office/en-us/library/a59c4e8f-9b7f-4127-8199-1b9ab76991501033.mspx?mfr=true. Check out the configdb command - you could try and create a new configuration database using this - I never done this so I have no idea what will happen so if you attempt this I suggest you make sure everything is thoroughly backed up (best way is to setup a virtual environment and reproduce the actions you took - then you can try various approaches without impacting the current environment).

Gary Lapointe said...

That might work - I really don't know but it's worth a shot.

Roojo said...

Hi Gary,

I'm using WSSv3 and currently looking into installing Microsoft's Search Server Express 2008, as a workaround for what I perceived as a limited default search facility within WSSv3. However, I've stumbled across your references to adding search scopes and need your advice as to whether this is applicable to my SharePoint instance?

FYI - I find this site and your SharePoint forum posts very helpful

Thanks!

Mark said...

I have search all over and have had no luck. If you are able to answer this, I'll be extremely grateful. This post comes the closest to answering my question to anything I've found on the Internet.

What I'm needing to do is to iterate through all of the site collections in an application (probably about 900, not a big deal, this part is easy and already written) and configure each site collection to enable custom scopes.

In our upgrade testing, we found that all site collections were configured out of the box to not use custom search scopes. The client has asked that all sites be set to use custom scopes and to enable the four search scopes (two OOTB and two we configured).

The problem is, I can't find anything in the object model allowing me, given an SPSite, to configure it to use custom scopes instead of NOT to use custom scopes.

Any help would be GREATLY appreciated.

Gary Lapointe said...

Mark - unless I'm misunderstanding the problem all you need to do is add the scope to the appropriate display groups. So get a ScopeManager and use the AllScopes collection to locate the scope of interest and then get a ScopeDisplayGroup object using the ScopeManager object and add your scope to that object - the code for the createscope command does most of this (it's just creating the scope first but you just want to retrieve an existing scope).

Mark said...

Thanks Gary. I'll try it. I guess what made me think I had to do more is because the admin screen has a textbox to allow you to set the SearchCenter page where the queries will execute and that text box, when first enabled, is blank. It doesn't automatically default to your search center. Thanks again. I have to tell you how much I appreciate the code that you share on this site. You code is amazing.

Gary Lapointe said...

Mark - thanks for the compliment :) You can set the search results page - the property is AlternateResultsPage - check out this page for the other properties you can set: http://msdn2.microsoft.com/en-us/library/microsoft.office.server.search.administration.scope_members.aspx

Mark said...

Gary,
Please disregard that last post.
I think I just found that the setting I'm looking for is in the SRCH_ENH_FTR_URL.
I can't believe I missed that in your code.
My apologies for taking your time with that long post. Please delete it.
A million thanks again for your code. You soooo rock!

Bramley said...

Hi

I'm migrating a 40G content from sps2003 using stsadm addcontent, the process run for 14 hours at the end I get this error:

RemoveOrphanedUserData] [3.0.0.1000] [DEBUG] [7/30/2008 9:44:01 PM]: Table [dbo].[UserData], 2243032 Rows @ 500 Rows/s
[RemoveOrphanedUserData] [3.0.0.1000] [DEBUG] [7/30/2008 9:44:01 PM]: Table [dbo].[Lists], 701 Rows @ 100 Rows/s
[RemoveOrphanedUserData] [3.0.0.1000] [DEBUG] [7/30/2008 9:44:01 PM]: Table [dbo].[Docs], 2761275 Rows @ 100 Rows/s
[RemoveOrphanedUserData] [3.0.0.1000] [DEBUG] [7/30/2008 9:44:01 PM]: SqlCommand.CommandTimeout = 32105
[SPContentDatabaseSequence] [ERROR] [7/31/2008 6:39:14 AM]: Action 3.0.0.1000 of Microsoft.SharePoint.Upgrade.SPContentDatabaseSequence failed.
[SPContentDatabaseSequence] [ERROR] [7/31/2008 6:39:14 AM]: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
[SPContentDatabaseSequence] [ERROR] [7/31/2008 6:39:14 AM]: at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParserStateObject.ReadSniError(TdsParserStateObject stateObj, UInt32 error)
at System.Data.SqlClient.TdsParserStateObject.ReadSni(DbAsyncResult asyncResult, TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParserStateObject.ReadPacket(Int32 bytesExpected)
at System.Data.SqlClient.TdsParserStateObject.ReadBuffer()
at System.Data.SqlClient.TdsParserStateObject.ReadByte()
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at Microsoft.SharePoint.Utilities.SqlSession.ExecuteNonQuery(SqlCommand command)
at Microsoft.SharePoint.Upgrade.RemoveOrphanedUserData.Upgrade()
at Microsoft.SharePoint.Upgrade.SPActionSequence.Upgrade()
[RemoveOrphanedUserData] [3.0.0.1000] [DEBUG] [7/31/2008 6:39:14 AM]: Begin Rollback()
[SPContentDatabaseSequence] [ERROR] [7/31/2008 6:39:14 AM]: Action 3.0.0.1000 of Microsoft.SharePoint.Upgrade.SPContentDatabaseSequence failed to rollback.
[SPContentDatabaseSequence] [ERROR] [7/31/2008 6:39:14 AM]: This SqlTransaction has completed; it is no longer usable.
[SPContentDatabaseSequence] [ERROR] [7/31/2008 6:39:14 AM]: at System.Data.SqlClient.SqlTransaction.ZombieCheck()
at System.Data.SqlClient.SqlTransaction.Rollback(String transactionName)
at Microsoft.SharePoint.Utilities.TransactionalSqlSession.Rollback()
at Microsoft.SharePoint.Upgrade.SPDatabaseAction.Rollback()
at Microsoft.SharePoint.Upgrade.SPActionSequence.Upgrade()
[RemoveOrphanedUserData] [3.0.0.1000] [DEBUG] [7/31/2008 6:39:14 AM]: Begin Dispose()
[RemoveOrphanedUserData] [3.0.0.1000] [DEBUG] [7/31/2008 6:39:14 AM]: End Dispose()
[RemoveOrphanedUserData] [3.0.0.1000] [DEBUG] [7/31/2008 6:39:14 AM]: Elapsed time: 08:56:54.5171427.
[SPManager] [ERROR] [7/31/2008 6:39:14 AM]: Upgrade [SPContentDatabase Name=Intranet_SITE Parent=SPDatabaseServiceInstance Name=officeserversqa] failed.
[SPManager] [ERROR] [7/31/2008 6:39:14 AM]: This SqlTransaction has completed; it is no longer usable.
[SPManager] [ERROR] [7/31/2008 6:39:14 AM]: at System.Data.SqlClient.SqlTransaction.ZombieCheck()
at System.Data.SqlClient.SqlTransaction.Rollback(String transactionName)
at Microsoft.SharePoint.Utilities.TransactionalSqlSession.Rollback()
at Microsoft.SharePoint.Upgrade.SPDatabaseAction.Rollback()
at Microsoft.SharePoint.Upgrade.SPActionSequence.Upgrade()
[SPManager] [ERROR] [7/31/2008 6:39:14 AM]: Action 3.0.0.1000 of Microsoft.SharePoint.Upgrade.SPContentDatabaseSequence failed to rollback.
[SPManager] [ERROR] [7/31/2008 6:39:14 AM]: at Microsoft.SharePoint.Upgrade.SPActionSequence.Upgrade()
at Microsoft.SharePoint.Upgrade.SPContentDatabaseSequence.Upgrade()
at Microsoft.SharePoint.Upgrade.SPManager.Upgrade(Object o, Boolean bRecurse)
[SPManager] [DEBUG] [7/31/2008 6:39:14 AM]: Elapsed time upgrading [SPContentDatabase Name=Intranet_SITE Parent=SPDatabaseServiceInstance Name=officeserversqa]: 08:57:34.
[SPManager] [INFO] [7/31/2008 6:39:14 AM]: Resetting the status of PersistedUpgradableObject: SPContentDatabase Name=Intranet_SITE Parent=SPDatabaseServiceInstance Name=officeserversqa to Online.
[SPManager] [DEBUG] [7/31/2008 6:39:14 AM]: Using cached [SPContentDatabase Name=Intranet_SITE Parent=SPDatabaseServiceInstance Name=officeserversqa] NeedsUpgrade value: True.
[SPManager] [INFO] [7/31/2008 6:39:16 AM]: Inplace Upgrade session finishes. root object = SPContentDatabase Name=Intranet_SITE Parent=SPDatabaseServiceInstance Name=officeserversqa, recursive = False. 3 errors and 0 warnings encountered.

Any ideas where to start on this. Please help

Gary Lapointe said...

Not a whole lot that can be done about the timeout issues. Try faster hardware :) Many times the timeout value is hard coded so bumping it up in SQL Server won't make any difference. You can try a database migration approach as that's the recommended method for large databases though 40gb isn't very large.

Ed. said...

Great utility. One issue I'm having is when I try to create a scope using Spanish characters in a Windows .cmd file, like:

stsadm -o gl-createsearchscope -url ... -name "InformaciĆ³n y Servicios" -sspisowner -groups "Spanish"

the Spanish characters get translated to bizarre other characters. Any idea why this may be happening? Thanks.

Gary Lapointe said...

I'm pretty sure it's an issue with the command prompt - I don't believe it can handle those extended characters. You might try using powershell or perhaps replace the special characters with the unicode encoded character string (not sure if that will work but it's worth a shot).

Anonymous said...

Hi Gary,
Your STSADM extensions are great. I want to use the gl-createscope and gl-updatescope commands to change the default search scope from "All sites" to "This Site". I'm thinking I can use your command to create the "This Site" scope, but how do I set it to be the "Default Scope". My apologies if I missed it somewhere. If there is another way to do this, I would appreciate that info. Thanks!

Gary Lapointe said...

Unfortunately I don't have a mechanism available to set the default scope. You'd have to either write your own stsadm command for that or you could do it via PowerShell.

Larry said...

@anonymous: re: setting the default scope for a display group: I found that if you remove all scopes from the display group, then after the first one you add back will be set as the default.

@Gary: while experimenting to find the answer for @anonymous and myself I discovered an accidentally destructive operation: I was trying to temporally have have the "People" scope assigned to no display group. I guessed that if I were to just omit the -groups option that ought to do it. As follows:

C:\>stsadm -o gl-updatesearchscope -url http://team.litwareinc.com/sites/RatingTeamSite -name "People"

Operation completed successfully.

unfortunately, a bit too successfully - People scope was deleted.

Gary Lapointe said...

Larry - thanks for the info - that's actually pretty odd as I don't have any code that deletes the scope - if you don't pass in a group then all I do is update the description and search page - that's it. I tried this on my local VM and was not able to reproduce the deletion behavior - can you try again?

Himani said...

Hi Gary,

How can I update an SSP scope using gl-updatesearchscope?

Gary Lapointe said...

Just provide the URL to any site - it will attempt to find the scope within the site collection and will fail in finding it which causes the code to fall back and look for it as a shared scope (SSP scope).

Patrick Reeves said...

Gary,
I am trying to deploy a new SSP-created search scope to all my site collections (about 100), I have the following command scripted:
"Stsadm -o gl-updatesearchscope -url " & Chr(34) & arySites(x) & Chr(34) & " -name " & Chr(34) & "SharePoint Support" & Chr(34) & " -groups " & Chr(34) & "search dropdown" & Chr(34)

This will add the "SharePoint Support" search scope into the dropdown for the site.
The command works and updates each site, but the problem is that when it applies the command to the next site in the list, the previous site reverts to the default dropdown list. Am I missing something here?

Patrick Reeves said...

Gary,
Hit an odd problem with the gl-updatesearchscope command. When I run the command it seta the target site collections search drop down correctly, but causes all the other site collections to revert to their default settings for the search drop down. As I am trying to deploy a new search scope to 200 site collections this causes a slight problem.

Gary Lapointe said...

That's really bizarre - the code would have to loop through all the site collections to do that and it doesn't - it almost sounds like some sort of corruption in the database or something but honestly I've no idea what would cause that (you can see the code - I just operate on the one provided site collection and that's it).