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:
- MSSQL$SHAREPOINT service cannot maintain a "Started" state.
- We cannot connect to the SharePoint configuration database.
- Service Pack reinstall says the WSS SP has was installed.
- My SharePoint databases are located on a drive other than the default.
- 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?
- 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.
- This would allow SharePoint to connect to the Configuration database if I reattached them.
- 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?
- Make a backup of the databases in the MSSSQL$SHAREPOINT\DATA folder.
- Add/Remove Programs Uninstall “Microsoft SQL Server Desktop Engine (SHAREPOINT)
- Copy out then remove any files in the MSSQL$SHAREPOINT\Binn, Data, Install, and Log folder. Leave the folders.
- You will need SBS CD #3 (change paths as needed):
F:\sbs\CLIENT~2\SHAREPT\sqlrun16.msi DISABLENETWORKPROTOCOLS=1 DISABLEAGENTSTARTUP=1 DISABLETHROTTLE=1 SAPWD=2194032892 INSTANCENAME=SharePoint
DATADIR="<Drive letter with databases>:\Program Files\Microsoft SQL Server\" /l*v C:\wsmde.log - 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.
- 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>
2>go
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'
2>go
**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'
go
exec sp_grantlogin 'NT AUTHORITY\NETWORK SERVICE'
go
exec sp_grantlogin ‘DOMAIN\Administrator'
go
Reinstalling WSS Service pack - Completed without an issue
Tested Companyweb and it work flawlessly.....
>edwalt
Comments
Anonymous
January 01, 2003
The comment has been removedAnonymous
November 21, 2007
<a href="http://loveposition.freehostia.com/sitemap.html">love position</a>Anonymous
January 11, 2008
Hi people!!! I want introduce my new year[url=http://www.xrum.977mb.com]new year foto. [/url]Anonymous
February 29, 2008
Q3Nw2c r u crazzy? I told u! I can't read!Anonymous
February 29, 2008
izFr0Y r u crazzy? I told u! I can't read!Anonymous
February 29, 2008
KZ9Ch9 r u crazzy? I told u! I can't read!Anonymous
March 01, 2008
9GSUvh r u crazzy? I told u! I can't read!Anonymous
March 06, 2008
pLySGR r u crazzy? I told u! I can't read, man!Anonymous
March 06, 2008
u5ucxg r u crazzy? I told u! I can't read!Anonymous
March 07, 2008
jubAR1 r u crazzy? I told u! I can't read!Anonymous
March 07, 2008
RLjzTS r u crazzy? I told u! I can't read!Anonymous
March 07, 2008
OlDzeE r u crazzy? I told u! I can't read!Anonymous
March 07, 2008
Yq5fvj r u crazzy? I told u! I can't read!Anonymous
March 08, 2008
vEpCvn r u crazzy? I told u! I can't read!Anonymous
March 08, 2008
Og3wuD r u crazzy? I told u! I can't read!Anonymous
March 29, 2008
gold and silver to the annual produce of the land and labour of <a href= http://idisk.mac.com/dukebluedevilsfreewe/Public/0/how-do-you-change-facebook-layouts.html >how do you change facebook layouts</a> his utmost industry, make one pin in a day, and certainly could not make jevbuaumppAnonymous
April 18, 2008
A u see <a href="http://abramovies1.110mb.com/?">Captivity</a>?">http://abramovies1.110mb.com/?">Captivity</a>? Give me url to download [url=http://abramovies1.110mb.com/?]Captivity[/url].Anonymous
December 08, 2008
I like this wishes! <a href=" http://carr6.110mb.com/cosco-car-seat-manufacturer.html ">Cosco car seat manufacturer</a><a href=" http://carr6.110mb.com/index.html ">Index</a><a href=" http://carr6.110mb.com/concept-cars-for-sale.html ">Concept cars for sale</a> uxefs