edwalt's - Things I Wish I'd known about SBS 2003....
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:
Based on the information given it appears there is a problem with WMSDE. So why do I think that?
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?
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'goexec sp_grantlogin 'NT AUTHORITY\NETWORK SERVICE'goexec sp_grantlogin ‘DOMAIN\Administrator'go
Reinstalling WSS Service pack - Completed without an issue
Tested Companyweb and it work flawlessly.....