Cleaning up an Orphaned Site Collection

An orphaned site collection is a site collection that exists in the database but not in the site map. So there is no way of navigating to it from the web browser. Usually it is the remnant of a site that was deleted or moved. You will want to make sure you have a backup of the database prior to starting this procedure; you may also take a moment to check and see if a duplicate site exists at the same url.

Run;
Stsadm –o preupgradecheck
To see if you have any orphaned site collections note the content database name that contains the orphaned site collection.

Example of orphaned site collection from preupgrade check –
- /siteurl (Data Source=<sqlServerName;Initial Catalog=<ContentDatabaseName>;Integrated Security=True;Enlist=False;Connect Timeout=15)

Now run;
Stsadm –o enumallwebs–databasename <ContentDatabaseName> –databaseserver <DatabaseServer> >c:\<ContentDatabaseNameOrphans>.txt

This will generate a list of sites and webs and their respective GUIDs.
Example;
Orphaned
- Site Id=”cbca9688-9105-46ad-ab0b-0042a652b6eb” OwnerLogin=”Domain\user” InSiteMap=”False”
Webs Count=”1″
Web Id=”f368a039-a4ee-4d49-93db-91b239f03435″ Url=”/siteurl”
Not –Orphaned
- Site Id=”a46cb97e-29a9-4dfc-a2e4-00c2be049756″ OwnerLogin=”Domain\user” InSiteMap=”True”
Webs Count=”1″>
Web Id=”344f9c51-f00d-499b-a5f0-d5eaa4dfab6a” Url=”/siteurl_1″

You are looking for a web url that matches /siteurl from the preupgradecheck report. Check the line above for the site GUID (Site Id) and confirm that “InSiteMap=”False”. This is your orphaned site collection. Note the Site GUID as you will need it to continue. (Not the web GUID!) Also be sure you are confirming that “InSiteMap=”False””. It is possible that a site with the same URL might exist in the database but be correctly registering to the site map.

To remove the orphan – Since the site is not accessible from the web application it is unlikely that the content is needed. However I still strongly suggest that a current backup of this database exist before purging the site collection from the database.

To delete run;
Stsadm –o deletesite –force –siteid <SiteID/Guide noted from above> –databasename <ContentDatabaseName> –databaseserver <DatabaseServer>

It should reply “Operation completed successfully”.

You can now re-run preupgradecheck or enumallwebs to confirm that the site no longer exists.

Clean up an environment before upgrade (SharePoint Server 2010)

Posted in SharePoint | Tagged , , , | Leave a comment

Increase the Root Drive Size on an EBS Backed Windows Instance Using the EC2 Web Console

I will clean this up later with some screenshots but I wanted to get it written down before I forgot. If you create a Windows EC2 instance using the web interface it will by default give you a 30GB root drive. This is usually not enough. The OS alone takes a good 20GB. You can use the EC2 command line tools to increase the drive size, or to create an non EBS backed instance but if you are in a hurry or on another machine using the web console is pretty quick and easy.

1. On the EC2 tab of the web console click the “Instances” link from the menu on the left and stop the instance that you want to increase. Do not terminate the instance, and if you want to be careful login first and shut it down correctly. Note the instance ID or name while in this screen.
2. Once the instance has stopped click the “Volumes” link from the menu on the left and find the root volume that is attached to the instance ID above. You will know it is the root volume because in the “Attachment Information” column it will display the instance ID and then /dev/sda1. Select this volume and then “Detach Volume” from the “More” menu at the top.
3. Once the volume has finished detaching select “Create Snapshot” from the more menu and then name the snapshot something useful like “Drive expansion.” You can delete it later once you’re done.
4. Click the “Snapshots” link from the menu on the left and wait a little while the snapshot is created. Once the snapshot is done select it and then select “Create Volume” from the menu above. Fill in the total amount of drive space desired, the availability zone that your instance is in and then hit “Yes Create”.
5. Switch back to the “Volumes” link from the menu on the left and find your new volume. It should be in an “Available” state. Select it and then select “Attach Volume” from the “More” menu at the top. Select your instance from the dropdown list and then in the “Device” field type /dev/sda1 then click “Yes Attach”.
6. Select the “Instances” link from the menu on the left and find your stopped instance, select it and then select “Start” from the “Instance Actions” menu at the top.
7. Once your instance has restarted login and open server manager. From disk management you should now be able to expand the root drive to include the additional space.
8. Once you have verified everything you can now delete the old unattached volume and the snapshot you created. Don’t do this to soon since once the old volume has been deleted you can’t reattach it as a backup plan.

This worked for me.

Posted in Uncategorized | Tagged , , , | Leave a comment

Why Every SharePoint “Pro” Should Tour The Datacenter

Cern DatacenterI had to run back to the datacenter this morning to help with something and it was nice to be reminded that there is actual metal somewhere that I’m working on. It made me think that it is probably a good idea that all SharePoint people in their various roles should at some point have a tour of that nice little icebox that houses the servers. Really the invitation can be extended to all technical people such as information workers, decision makers, and developers.

Here are a few things to look for;

Routers and cables and switches oh my – It’s easy sometimes to get tunnel vision when thinking about your own system or area of expertise. You may be the master of your own domain (or rather house since domain can have a different meaning in the IT world) but you are supported by a team of people, each with expertise in different areas. It is impossible for anyone to be an expert in all things and the rows and rows of servers each with their own complex systems can be an eye opener when considering the skills and perspective of other people on the team.

Lots of blinking lights – Touring the datacenter is a solid reminder that you are part of a greater whole. As a developer you can make the lights pretty, but your ops team keeps them on, and the business users make them mean something. A lot of attention is given to helping technical people “understand the business” but that needs to be a two way street. Business people also need to acknowledge the contributions and complexity involved on the technical side.

Rows and rows of sever racks – Virtual servers are servers to. It seems obvious but people can forget that they are working on actual equipment somewhere. This equipment takes up space, consumes resources and requires a whole lifecycle of management. The next time your team spins up additional resources for your project remember to say thank you.

It’s a great place to cool off – On very hot days you will notice that the datacenter maintains a constant cool temperature.  It can be easy to take this for granted but remember that there are also maintenance personnel, A/C specialists, electrical engineers and others that contribute to keeping things running. These are people you may pass in the hallway and never give a second thought as to what they do or what their day is like.

Remember that Sysadmin appreciation day is July 27th this year. (The last Friday of July)

http://sysadminday.com/

Posted in Uncategorized | Tagged , , | Leave a comment

SharePoint4Gov Conference March 27th -> 29th 2012

XgilityAFEI is supporting a conference for Government Professionals that are currently working with or considering the deployment of Microsoft SharePoint. Last year’s conference was a huge success and this year the theme is “Efficiency Through Transformation”. Anyone who has worked with SharePoint for a while knows that in the right hands it has the power to transform an organization. Since it has always been my personal goal, and Xgility’s company goal, to help “Achieve Transformational Results” this theme aligns well with many ideas I find important.

The keynote speaker this year is Dux Raymond Sy who will be presenting the topic “Achieving Organizational Buy-In to Transform Your Enterprise”. I’ve heard Dux present at previous conferences and am excited to catch this one as well.

I have the pleasure of presenting as well at Tuesday @ 2pm on “Securing Your SharePoint Deployment”. So check it out!

Conference Details – Full Agenda

Stephen

Posted in SharePoint | Tagged , , , , , | Leave a comment

No SQL sysadmin Access

I was working on a Dev environment today and found that when the developer had configured SQL they left themselves as the only sysadmin. This was before we had created a standard Dev image and I found myself unable to log into SQL.

Apparently in Server 2008 you no longer get access to SQL by default if you are in the local admin group.

Fortunately I found this script @ http://archive.msdn.microsoft.com/addselftosqlsysadmin/ which did the trick for me. Kind of a useful little item to keep handy.

Posted in Troubleshooting | Tagged , , | Leave a comment

How to Google

Saw this neat infographic showing some quick Google cheats. I’m not sure the source but I’m saving here so I can direct people to it in the future.

How to use Google

Posted in Uncategorized | Leave a comment

SharePoint 2010 Central Administration Shortcut

At a client site recently I helped a customer move their Central Administration site to a new server to better fit their overall architecture goals. After using the SharePoint 2010 Products Configuration Wizard first to remove it from one server, and then to add it to the new server we found that the program menu shortcut for Central Administration was no longer working.

Even though we could manually navigate to the new Central Administration page from each server the program menu shortcut still directed us to the old url.

Update 12/21/2011 – Thanks to Chris Howell for pointing out this alternative!

“I’ve found that this change is applied by altering the Internal URL for the site within Central Admin > Alternate Access Mappings.”

After some digging we found a registry key that you can edit to correct this.

HKLM\Software\Microsoft\Shared Tools\Web Server Extensions\14\WSS\

Edit “CentralAdministrationURL”. This will have to be done on every server in the farm.

Remember to backup the registry before making any changes. It is my guess that a group policy setting or other security setting was preventing this change from being made by the wizard. If I figure out what was doing it I’ll update this post.

Posted in Uncategorized | Tagged , , | 2 Comments

SharePoint Saturday Richmond

Please join me for “The inherent sense of inheritance” on Saturday November 5th at SharePoint Saturday Richmond.

My session is geared towards end users and users that have been recently “promoted” to site owners or site collection owners.

Session details – “So you drank the koolaide, swallowed the red pill and volunteered to be the go-to SharePoint person for your company. Or maybe you got dragged into it against your will? Either way this session will introduce you to a few basic but overarching concepts to working in SharePoint as new Site Owner. Session will serve as an introduction to SharePoint site hierarchy and how it affects navigation, permissions, content types, templates and pretty much controls the rest of your life, forever. “

I’ll be hanging out throughout the day and a few of the other non-slacker Xgility team members will be there as well. I hope to see you there.

-Stephen

Posted in Uncategorized | Tagged , , , , | Leave a comment

Inbound SharePoint email on multiple domain suffixes

While working on a MOSS 2007 to SharePoint Server 2010 upgrade recently I ran into a unique requirement involving the domain suffix used for inbound emails. Since this particular upgrade was also a consolidation of multiple SharePoint farms I found myself in a situation where I needed SharePoint to accept email on multiple domain suffixes. Since this is a farm wide setting I had a feeling that the secret would lie in the local SMTP configuration but I was unable to find confirmation.

Requirement;
Old SharePoint farm domain suffix = @oldserver.SharePoint.local
New SharePoint farm domain suffix = @newserver.SharePoint.net

New SharePoint farm must accept email on the original alias for both suffixes. So email sent to list1@oldserver.SharePoint.local and list1@newserver.SharePoint.net must both arrive @ list1.

Setting up inbound email in SharePoint is well documented, as is configuring the exchange connectors needed to relay mail to the local SMTP service running on the SharePoint server. So there is no reason to document configuring SharePoint to accept mail on the new domain suffix initially.

Only two additional configuration changes were required. The first was a second exchange connector the was configured to also forward any mail addressed to @oldserver.SharePoint.local to the SMTP service running on the SharePoint server. The second was to create a domain alias on the SharePoint server for @oldserver.SharePoint.local.

Start -> Administrative Tools -> Internet Information Services (IIS) 6.0 Manager
Expand the SMTP Virtual Server that you created when you set up the primary suffix.
Right click on “Domains” and select “New -> Domain”.
Select “Alias”.
Enter oldserver.SharePoint.local
Click “Finish”.

iisreset /noforce

And that is all there is to it.

Posted in Uncategorized | Tagged , , , , , | Leave a comment