Sharepoint Service Error on Windodws Server 2003 - Cannot connect to configuration database

Hi,

We have a sharepoint server running on a Windows 2003 server with the SQL databases on another server on the same network.
When trying to connect to the sharepoint intranet website we got an error “Cannot connect to configuration database”  the same error for Sharepoint Central Administration site.  

I opened a command prompt and tried to run stsadm -o enumservices (from C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN) but it gave an error and did not run.  

I restarted all SQL, sharepoint and IIS services to start with, all seemed to restarted okay.

I can now get into the Sharepoint Central Administration (I restored the IIS configuration from an automatic backup of the 30/11/2011)

Enumservices now given in code window below

I am still getting a 404 web page cannot be found error when trying to access the Sharepoint Intranet website.
<Services>
  <Service>
    <Type>Microsoft.SharePoint.Administration.SPWebService, Microsoft.SharePoint
, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c</Type>
    <Name />
    <DisplayName>Windows SharePoint Services Web Application</DisplayName>
    <Status>Online</Status>
  </Service>
  <Service>
    <Type>Microsoft.SharePoint.Administration.SPWebService, Microsoft.SharePoint
, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c</Type>
    <Name>WSS_Administration</Name>
    <DisplayName>Central Administration</DisplayName>
    <Status>Online</Status>
  </Service>
  <Service>
    <Type>Microsoft.SharePoint.Administration.SPAdministrationService, Microsoft
.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c<
/Type>
    <Name>SPAdmin</Name>
    <DisplayName>Windows SharePoint Services Administration</DisplayName>
    <Status />
  </Service>
  <Service>
    <Type>Microsoft.SharePoint.Administration.SPDatabaseService, Microsoft.Share
Point, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c</Type>

    <Name />
    <DisplayName>Windows SharePoint Services Database</DisplayName>
    <Status>Online</Status>
  </Service>
  <Service>
    <Type>Microsoft.SharePoint.Administration.SPTimerService, Microsoft.SharePoi
nt, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c</Type>
    <Name>SPTimerV3</Name>
    <DisplayName>Windows SharePoint Services Timer</DisplayName>
    <Status />
  </Service>
  <Service>
    <Type>Microsoft.SharePoint.Search.Administration.SPSearchService, Microsoft.
SharePoint.Search, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e
9429c</Type>
    <Name>SPSearch</Name>
    <DisplayName>Windows SharePoint Services Help Search</DisplayName>
    <Status>Online</Status>
  </Service>
  <Service>
    <Type>Microsoft.SharePoint.Search.Administration.SPSearchService, Microsoft.
SharePoint.Search, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e
9429c</Type>
    <Name>SPSearch</Name>
    <DisplayName>Windows SharePoint Services Help Search</DisplayName>
    <Status>Online</Status>
  </Service>
  <Service>
    <Type>Microsoft.SharePoint.Administration.SPIncomingEmailService, Microsoft.
SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c</
Type>
    <Name />
    <DisplayName>Windows SharePoint Services Incoming E-Mail</DisplayName>
    <Status>Online</Status>
  </Service>
</Services>

Open in new window

afflik1923Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jayaraja JayaramanSharepoint Architect ConsultantCommented:
You can select "connect to an existing server farm" option when running configuration wizard and select the configuration database of your farm.

Then give a try to connect it.

0
afflik1923Author Commented:
Where would this option be? Would you mind expandig on this?

We don't have another sharepoint farm? Sorry if I'm being naive here.
0
Jayaraja JayaramanSharepoint Architect ConsultantCommented:
run the sharepoint configuration wizard
you ll get to know the database name, server name  and the user id it uses,
then login to the sql server and check for the database name and the user permsissions for it, it ll help you
0
Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

afflik1923Author Commented:
sweetraskels: thanks much appreciated, I have taken note of that as suggested

We now have a new clean sharepoint sites working and are wanting to add the content database from the old site to the newly created one.  

I have removed the new database from the sharepoint Central Administration.
Now when I try add the old/existing database from the Sharepoint central administration it gives me the following error:
SharePoint_Config_507ea1f4-2140-41e0-a804-bd1ed7 on Server\Microsoft##SSEE contains user-defined schema.  Databases must be empty before they can be used.  Delete all of the tables, stored procedures and other objects or use a different database.

If I try add it from a command line using stsadm I get the error below:
C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN>stsa
dm -o addcontentdb -url http://intranet:80 -databasename 'SharePoint_AdminConten
t_881850dd-1e93-4bc8-8840-771e415e0c06' -databaseserver \\fs-01\microsoft##ssee

The server instance specified was not found.  Please specify the server's addres
s and port.


Is there a way around this?  
Any suggestions on how to recover the sharepoint website using only the LDF and MDF files?
0
Jayaraja JayaramanSharepoint Architect ConsultantCommented:
If I understand your problem correct this problem came when you started the search. Try in central administration to stop the search service, start it again and create a new index database. This may fix your problem.

You can also use stsadm –o osearch  -action stop

To stop the search service
0
afflik1923Author Commented:
Thanks, sweetraskels.

What we have decided to do for now is try and reconnect the LDF and MDF files to a new website.

Can we do this and if so how?
0
afflik1923Author Commented:
We resovled this problem with assistance from MS support who were really helpful.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
afflik1923Author Commented:
MS Support helped us through this in the end and we got it all working again.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SharePoint

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.