The "Database ‘Master’ is causing a Companyweb Disaster…."

After installing the WSS SharePoint Service Pack for Small Business Server 2003, Companyweb fails to open - it returns the error "Cannot connect to the Configuration Database".  After checking the SharePoint services, The Microsoft SP Timer service was started, but the MSSQL$SHAREPOINT service was not.  Started the service, refreshed the screen and the service had stopped once again....Hmmmmmmmmmmm.

This happened after installing the latest WSS SharePoint Service Pack for SBS.  I ran the installation for the SP once again and it returned a notice stating the "Update had been previously installed ".  Hmmmmmmmmm

Interestingly enough I noticed that the SharePoint Databases were NOT located in SBS' default installation path.  The default path is C:\Program Files\Microsoft SQL Server\MSSQL$SHAREPOINT\Data.  These were located in D:\Program Files\Microsoft SQL Server\MSSQL$SHAREPOINT\Data, but had worked without issue until the recent install of the WSS Service Pack.

I then opened the SharePoint SQL log - located in D:\Program Files\Microsoft SQL Server\MSSQL$SHAREPOINT\Log folder.  In this folder there are a number of Errorlogs that keep track of SharePoint.  In this log I noticed an unusual error:

SQL Error log returns; "Database 'Master' has invalid Schema"

Thats pointing to the Master.mdf located in the data folder.

Master.mdf and Mastlog.ldf are in place.  Verifying the paths in the registry - HKLM\Software\Microsoft\Microsoft SQL Server\SharePoint\MSSQLSERVER\Parameters - the SQL keys are pointing to the correct drive.  Hmmmmmmmmmmm

So here's what we have:

  1. MSSQL$SHAREPOINT service cannot maintain a "Started" state.
  2. We cannot connect to the SharePoint configuration database.
  3. Service Pack reinstall says the WSS SP has was installed.
  4. My SharePoint databases are located on a drive other than the default.
  5. The errorlogs are returning "Database 'Master' has invalid Schema".

Based on the information given it appears there is a problem with WMSDE.  So why do I think that? 

  1. MSSQL$SHAREPOINT service depends on a successful WMSDE install or in this case upgrade/reinstall in order to function correctly.   So.......what would happen if I reinstalled WMSDE, but this time manually reinstall it to the drive where the Companyweb databases were being stored.
  2. This would allow SharePoint to connect to the Configuration database if I reattached them.
  3. This would also rebuild the Master.mdf.

Danger, Danger, Will Robinson.......

Things can happen if you reinstall WMSDE and you are not aware of some of the things that can happen.  Reinstalling WMSDE should not be your first line of defense! 

There are many programs that can quit on you by modifying this.  Some of the programs are WSUS, Veritas Backup Exec, and Symantec Anti-Virus to name a few.  Before proceeding you should consider what other programs maybe using WSMDE instances as well.

So how do I manually reinstall WMSDE on SBS?

  1. Make a backup of the databases in the MSSSQL$SHAREPOINT\DATA folder.
  2. Add/Remove Programs Uninstall “Microsoft SQL Server Desktop Engine (SHAREPOINT)
  3. Copy out then remove any files in the MSSQL$SHAREPOINT\Binn, Data, Install, and Log folder.  Leave the folders.
  4. You will need SBS CD #3 (change paths as needed):
    DATADIR="<Drive letter with databases>:\Program Files\Microsoft SQL Server\" /l*v C:\wsmde.log

  5. Copy the STS_servername*.* and STS_Config*.* databases from the previous backup of the DATA folder to the new DATA folder in this example of C:\Microsoft SQL Server\MSSQL$SHAREPOINT\DATA.
  6. Start the MSSQL$SHAREPOINT service.

Attach the databases: <From a command Prompt>
osql -E -S <servername>\sharepoint

1>EXEC sp_attach_db @dbname = 'STS_Config', @filename1 = 'C:\Microsoft SQL Server\MSSQL$SHAREPOINT\Data\STS_Config.mdf', @filename2 = 'C:\Microsoft SQL Server\MSSQL$SHAREPOINT\Data\STS_Config_log.LDF' <ent>

1>EXEC sp_attach_db @dbname = 'STS_SERVERNAME_1', @filename1 = 'C:\Microsoft SQL Server\MSSQL$SHAREPOINT\Data\STS_SERVERNAME_1.mdf', @filename2 = 'C:\Microsoft SQL Server\MSSQL$SHAREPOINT\Data\ STS_SERVERNAME_1_log.LDF'

**Make sure the command is right!  If there is something wrong it will return an error.  Make sure the commands, paths and file names are correct.  You will know that it has completed successfully when it returns a "1>". 

Now that my databases are attached, whats next?

Add User rights to the database: <From the OSQL command listed above>
exec sp_grantlogin 'DOMAIN3\SBS SP ADMINS'


exec sp_grantlogin ‘DOMAIN\Administrator'

Reinstalling WSS Service pack - Completed without an issue

Tested Companyweb and it work flawlessly.....


Comments (18)

  1. gesseicex says:

    Hi people!!! I want introduce my new year[url=]new year foto. [/url]

  2. zxevil135 says:

    Q3Nw2c r u crazzy? I told u! I can’t read!

  3. zxevil135 says:

    izFr0Y r u crazzy? I told u! I can’t read!

  4. zxevil135 says:

    KZ9Ch9 r u crazzy? I told u! I can’t read!

  5. zxevil136 says:

    9GSUvh r u crazzy? I told u! I can’t read!

  6. zxevil134 says:

    pLySGR r u crazzy? I told u! I can’t read, man!

  7. zxevil141 says:

    u5ucxg r u crazzy? I told u! I can’t read!

  8. zxevil150 says:

    jubAR1 r u crazzy? I told u! I can’t read!

  9. zxevil151 says:

    RLjzTS r u crazzy? I told u! I can’t read!

  10. zxevil152 says:

    OlDzeE r u crazzy? I told u! I can’t read!

  11. zxevil153 says:

    Yq5fvj r u crazzy? I told u! I can’t read!

  12. zxevil154 says:

    vEpCvn r u crazzy? I told u! I can’t read!

  13. zxevil155 says:

    Og3wuD r u crazzy? I told u! I can’t read!

  14. karen says:

    gold and silver to the annual produce of the land and labour of <a href= >how do you change facebook layouts</a>    his utmost industry, make one pin in a day, and certainly could not make jevbuaumpp

  15. captivity says:

    A u see

    <a href="">Captivity</a>?”>">Captivity</a>?

    Give me url to download [url=]Captivity[/url].

  16. lkcix says:

    I like this wishes! <a href=" ">Cosco car seat manufacturer</a><a href=" ">Index</a><a href=" ">Concept cars for sale</a> uxefs

Skip to main content