SQL Server - Urgent help required---regards sql server 2008 r2 express error

Asked By prathap chowdary on 29-Mar-12 08:16 AM
Hi,

This is Prathap i ma sql server DBA.......I will tell you what happend in my organization:

One user installed sql server 2008 r2 express database server on his local system....i.e stand alone system......and he creates one database on that server.
And he configure application to database........Now he is facing problem.......

When he connects to the database through application......some times it connects and some times it gives the error.
that error is : underlying provider failed to open

And i had checked his sql services.....1.when we checked MSSQLSERVER properties-->Advanced--> here there is no startup parameters options.
2.When i checked in sql network configuration....the protocols of MSSQLSERVER--->named pipes and tcp\ip disabled.
3.when i am trying to change from disable to enable...its not changed.
4.And when i am trying to stop the MSSQLSERVER services......it is not stopped the services.......

Please anyone help me...what is the solution i am going to give to customer.........what he is asking if this is having problems why some times connects to database through application......

Please any one help me.......

Regards,
Prathap.
Somesh Yadav replied to prathap chowdary on 29-Mar-12 08:53 AM

Hello,


 Can you please make sure your connection string has correct arguments?

 I have similar issue and i fixed by changing connection string

  If you have any IntegratedSecurity = true then replace that will User Id=XXXXX;Password=XXXXXX

kalpana aparnathi replied to prathap chowdary on 29-Mar-12 09:41 AM
hi,

Try below code:


using (DatabaseEntities c = new DatabaseEntities())
{
    c
.Connection.Open();
   
// the rest
}

Regards,
prathap chowdary replied to kalpana aparnathi on 29-Mar-12 11:29 AM
Hi kalpana,

Thanks for your replying.......

And one more thing....when i am stopped service through query analyzer.......it showing access is denied.

May be this is the reason