Restoring content database to a new SharePoint installation with a new SQL instance

As the SharePoint configuration-go-to-guy at Vertica (the company where I work) had a customer today who experienced some trouble with SharePoint Services 3.0 after they ballooned their SQL volume, to achieve more space.

I’m not sure how it happened, but for some reason the embedded SQL broke during this transition and along the way, their systems administrator somehow managed to delete the VirtualDirectories for all the SharePoint sites located in the C:\Inetpub\wwwroot\wss-folder.

Yaiks!...

Well, since the customer earlier had a request to move from the embedded SQL to a somewhat real SQL version (though still the Express-version), I started deploying SQL 2008 R2 Express to their server.

I pulled the database files from their backup, and attached them to my new SQL 2008 R2 database instance, but prefixed both the files and databasenames with “old_”.

Afterwards since the SharePoint installation was smashed up, I decided redo the setup progress, and ordering SharePoint to use the new database instance:

Source:
http://technet.microsoft.com/en-us/library/cc263093(office.12).aspx

psconfig.exe –cmd –create –server  “sharepoint-srv” –database “sharepoint30” –admincontentdatabase “SharePoint_AdminContent”

Followed by a the “SharePoint Products and Technologies Configuration Wizard”, which sets up the necessary IIS sites, which I had deleted earlier, since they broke when the underlying files was deleted.

Next up, entered the SharePoint Administration site and created a new Application, but didn’t create a Site Collection, since I just needed to attach the content database from the backup.

Selected the “Content databases” in Application Management, selected the Web application, and clicked the “Add a content database”.
Typed in the server and name for my attached backup content database, in this case “WSS_Content_portal”. Finished off by clicking OK.

Visited the site from my browser, and the site was back in its glory. Yeay!

 

 

Bonus tip: 
Uninstalling the SQL Embedded instance, isn't as easy as Add/Remove programs, but following this tip, makes it possible:
Credit to: http://jemm.wordpress.com/2007/08/06/how-to-uninstall-sql-server-2005-embedded-edition/

To uninstall SSEE:
Start Registry Editor, and then locate the following registry key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall

In the left pane, click each GUID.
For each GUID that you click, look for a display name in the right pane that matches
“Microsoft SQL 2005 Embedded Edition…”.

When you see a display name that matches the name,
copy the value of the Key named “UninstallString”

Open a Command-Window (Start->run->cmd)
Paste the Copied string.

Append “CALLERID=OCSETUP.EXE"

Example: “MsiExec.exe /X{BDD79957-5801-4A2D-B09E-852E7FA64D01} CALLERID=OCSETUP.EXE”


Sharepoint Discussion Board, not triggering workflow on new items added via e-mail

If you have a Discussion Board in SharePoint 2007, and have successfully deployed a workflow which triggers when new items is added or created in the list, and decides to switch on "E-mail enabled list", you normally (unfortunate) see that the workflow isn't firing.

To make this work, you have to apply what must be somewhat of a long operationcommand via stsadm-tool:

"stsadm -o setproperty -pn declarativeworkflowautostartonemailenabled -pv true"

Note that I've only tested this on WSS 3.0 with SP2 installed, and didn't need to install the kb953749 fix.

If you have WSS 3.0 or WSS 3.0 SP1 you might need to install this fixes before the above command works.

Battle plan:
   Install Windows SharePoint Services 3.0 Infrastructure Update:
   http://support.microsoft.com/kb/953749/

   Run the very-long-command as described above and in this Microsoft Knowledge Base article:
   http://support.microsoft.com/kb/953289/


Happy e-mail-enabled-discussion-board-workflow'ing, and my you have a lovely summer =)


Experiencing backup problems with DPM 2007 and Microsoft Virtual Server 2005 R2?

Admitted, this is not my favorite solution to this problem, but if the alternative is no backup at all, this is without doubt a workable resolution.

In our setup I've experienced backup problems when using DPM 2007 to backup some of my VM's running on our Microsoft Virtual Server 2005 host. More specific these the errors appearing:

DPM 2007 reported:
The replica of vm-client-001 on vm-host-xxx.local is inconsistent with the protected data source. All protection activities for this data source will fail until the replica is synchronized with consistency check.
DPM encountered a retryable VSS error.


Microsoft Virtual Server 2005 host reported:
(Both visible in Event log and Virtual Server 2005 R2 master status webpage)
The VSS writer for Virtual Server failed during the PostBackup phase, during the mounting of disk \\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy290\Virtual Servers\vm-client-001.vhd for virtual machine vm-client-001. The disk did not come online within 5 minutes. Confirm that the vhd mount driver in installed correctly and is able to mount virtual hard disks.

It's worth mentioning the VM, DPM has been failing to backup of the type: Online backups. I have several other VM's setup on the VM-host, without backup problems, both Online and Offline backups.

My way of fixing the issue with DPM continuing to fail when backup is initiated is solved by changing the backup-mode from Online backup to Offline backup. This is done by the registry on the physical/host machine running the VMs.

1. Open Registry Editor/regedit
2. Navigate to "HKEY_LOCAL_MACHINE\Software\Microsoft\Virtual Server\1.0\Backup\BackupType"
3. Either change the existing REG_DWORD-record if your VM is located here, or create a new REG_DWORD with the same name as your VM appears in Virtual Server 2005 R2 web-interface.
4. Set the value of appropriate record to: 1 This would changes the Backup mode to Offline backups.

Just for the kicks, here is the value definitions:
0/1: Offline backup
2: Online backup

Beware that DPM still reports it's as a Online Backup, but underneath the bonnet, it is Offline backup, and your DPM should no longer experience the mentioned problem. It's by the way not necessary to reboot any of the machines involved for the changes to take effect.


Setting up Google Calendar for your Iphone, Nokia phones and Outlook

Lately a couple of my friends has asked into how my Google Calendar setup works, since I'm driving this as a central element in my daily planning. It's evolved a bit since I first started to use Google Calendar to be used across multiple devices and systems.
My girlfriend is also a happy user of this setup, allowing here to control her working schedule, since she's working with changing work hours. This has been an issue for a quite some time, since I never knew when she was home because my memory often gets flushed or reset every time I sleep.

My current setup:
4 main calendars:
- My own
- My girlfriend
- Our shared calendar (my girlfriend and me, for stuff where we both attends)
- Building/estate (this is used for registering worktasks, and/or different numbers for stat on electric and water usage)

3 special calendar, for some features that the Google Calendar sadly doesn't have embedded yet:
- Weather (Feature added from calendar settings)
- Holydays (in this case the Danish holydays, feature added from Google calendar "inventory")
- Week numbers (http://recover89.googlepages.com/googlecalendarweeknumbers)

The 4 main calendars are synced with:
- My Apple Iphone 3G (all four, changes are pushed)
- My personal pc, main Outlook calendar (all four, syncs every 15 min)
- My workstation pc, secondary/shared Outlook calendar (only my personal and shared calendar, syncs every 15 min)
- My workstation pc, as a Vista Gadget (my own  and shared calendar)
- Girlfriends Nokia 6500 (her own and shared calendar, syncs once every day)

Now you might think that would build up events every day, and displays on some devices is almost impossible to get a good overview of your appointments, but luckily the different calendars are color coded.

The Google Calendar is the primary calendar, and to keep this simple we decided it would be the best (and easiest) that additions and changes has to be made though the Google Calendar webpage.

For syncing the Nokia phone with Google Calendar I use, I would guess Ericsson could use this as well:
www.goosync.com

Iphone setup for Google Calendar:
I'm currently using www.nuevasync.com,  but I've heard that Google now supports push technology and thereby allowing you to skip nuevasync as a gateway/pass-through service, and connect directly to your data in Google Calendar, but haven't tried it yet.

Vista Gadget, Google Calendar:
http://www.eelkespaak.nl/2008/08/windows-vista-sidebar-gadget-for-google-calendar/


Disabling the MRU/most-recently-used computers in Remote Desktop

Here is a small trick to avoid the Remote Desktop Connection client (RDP/mstsc) from saving the latest computers you’ve established connection to.

If you are afraid of tinkling with regedit and have to look up what ACL stands for, I wouldn’t recommend trying this.

More...

Creating custom service accounts for IIS

Just came across this today – maybe it's only me being buried under a huge rock, but I think this small feature need a lot more credit and advertising – so this is me advertising for a parameter – yay!

For those of you who think the whole procedure of setting custom service accounts when configuring Internet Information Server is just the most fun you could ever imagine, don't read any further. If you - like me - think it's quite boring to do this a lot of times, there is a nifty little feature in the aspnet_regiis tool that comes with the .NET 2.0 Framework.

More...