Search This Blog

Wednesday, 28 December 2011

Take Ownership of the Sharepoint Database in SBS 2008

Assigning ownership of the SBS 2008 Sharepoint WSS 3.0 Databases when you are not able to access the properties of the WSS 3.0 Databases in SQL Server Studio Express

Run the SQL Server Studio Express as Admin


Elevate your privileges when you run the application or you will not be able to connect to the databases.

Use the Named Pipes String


The Sharepoint Database instance uses a named pipes name instead of the usual database instance so make sure you enter this correctly.

The error that is the reason for all this


Here is the problem, I am logged on to my SBS Server as my custom administrator account I used for my migration from SBS 2003. However this account does not have rights to the database by default, in fact no account does, the database has an owner that is NULL. This means we need to assign an owner to the database to be able to see the properties of the database. The Administrator account in SBS 2008 is disabled by default and we need to reenable this and then logon to the SBS 2008 console as this account so we can assign a database owner.

Change the database owner


Once you have logged onto the SBS 2008 console as the Administrator and you have opened SQL Server Studio Express you can use this query to change the database owner. First you need to find the name of the Sharepoint Config database, it has a name in the convention Sharepoint_Config_*********

Use the command as shown above to select the database and then run the sp_changedbowner to change the owner to our Administrator account.

Check the ownership


Once the change ownership command is executed you can test the change with the query sp_helpdb Sharepoint_Config_********

Access Database Properties


Now you are able to access the properties of the database!

Friday, 23 December 2011

"Operations are in progress, please wait" on Windows 2008/R2 shutdown or restart

We have had for sometime problems when rebooting certain Windows 2008/R2 Servers, they are scheduled for a reboot and then overnight this error is displayed on the console when the server tries to shutdown.  This message is a Windows System Message that is designed to inform you that a task is waiting completion and Windows will not shutdown until it is complete.  This is by design and to avoid data corruption by the shutdown process.

This is outlined in this KB from Acronis

However there is a problem with this, one is that if you want the server to reboot at 4am and be ready for people the next day and Acronis for example takes until 7am to complete its task, then what is the first thing it does at 7:01am.  It reboots.  Now this is outside your window for a reboot and you get unexpected results and upset users.

Secondly, if the server is a Terminal Server or Remote Desktop Server, then the shutdown process starting stops access to the server via RDP, therefore blocking all your users until the task is complete.

So ultimately this function stops data corruption in your backup but just about renders the server redundant until you discover it is in this state.  If you use MSP tools like GFI RM as we do this will not show as offline as the client can communicate using HTTPS, LogMeIn also shows online for the same reason so it is quite hard to spot until your customer calls you up!

I appreciate the sentiment Acronis but you know what, it would be better to cancel the backup due to the shutdown than to leave a server in this position, because you cannot access the console to stop the process or interact with it you have no choice but to get iLO out or LogMeIn and hard reset, which naturally risks data more than the original backup being cancelled would have.

Monday, 19 December 2011

Schedule a CHKDSK on Windows XP

OK so we shouldn't really be using Windows XP but we are so we have to live with it!  Often XP will need a CHKDSK, more often that it should.  So how do you run this on a schedule for the C: partition if it needs you to confirm that the partition is locked?  Well its actually really simple but doesn't always jump to mind.

echo y | chkdsk c: /r
Using ECHO you can send the Y to the command and then schedule this using AT or Task Scheduler.

Friday, 16 December 2011

Outlook 2007 shows as Disconnected with working Exchange Server

Sometimes and Outlook 2007 Client will go into a Disconnected state, the Exchange Server is working and you can connect as other users and connect via Outlook Web Access but your MAPI client just will not connect. Often this is because the user has multiple connections or sessions to the Exchange Server and has gone over the default limit of 32 sessions.

Check the Exchange Server Event Logs

You should see in the application log of your Exchange Server the following Event Log IS 9646. This is the message that explains that the session limit has been reached.

Microsoft KB Article

Microsoft has a KB Article on this exact issue here -

Edit the Registry to increase the session limit

Run Regedit on your Exchange Server and browse to the key shown.

Increase the Session Limit

Increase the session limit to 500 as this will allow for multiple MAPI, IMAP and other sessions that a user may need. Once this is done you will need to restart the Information Store Service to see the effect for the users Outlook Client.

Wednesday, 14 December 2011

Exchange 2007/2010 - There is not valid SMTP Transport Layer Security (TLS) Certificate

Event Log ID 12016 is displayed in the Application Log for the MSExchangeTransport Source

Event Log Error


The SSL Certificate used for SMTP has expired and the event log error 12016 is logged.

Show Exchange Certificates


Run the EMS command Get-ExchangeCertificate to show the current certificates and the associated Services, in this case we can see two Thumbprints associated with the Service SMTP (S). Once of these has expired so we need to see which one.

Output Certificate Details to a text file


Use the command Get-ExchangeCertificate | fl| out-file -FilePath C:\certs.txt to export the full details to a text file.

Expired Certificate


Look through the text file for the certificate that has expired, in this case we can see the certificate has expired and has an Invalid Date.

Valid Certificate


Look through the text file for the certificate that is valid and make a copy of the Thumbprint.

Enable the Valid Certificate for use with SMTP


Use the command Enable-ExchangeCertificate - Thumbprint thumbprint -Services "SMTP" to enable the valid certificate

Remove the expired Certificate


Use the Remove-ExchangeCertificate -Thumbprint thumbprint to remove the expired certificate

Confirm the change


Use the Get-ExchangeCertificate command to confirm you now have the correct valid certificate associated to the SMTP Service. Restart the Exchange Transport Service to complete the change.