Service not able to connect to SQLExpress 2012

Answered Service not able to connect to SQLExpress 2012

  • Thursday, August 16, 2012 8:26 PM
     
     

    I have SQLServer Express 2012 installed on a VMWare hosted 2008 R2 64bit Server. I have an application that logs data to the database. It works fine under Visual Studio 2012, but when I take the logic and put it into a Service it runs up to the point it opens the database to execute a stored procedure. Then I get one of those "datbase doesn't exist or you don't have rights" type of messages.

    I have tried running the service under my name which is an admin with rights to access and execute the stored procedure and also have run it under the default "Service" with it added to the database as a user with the correct default database and rights granted to execute the stored procedure. No Joy. The only other thing that I know of that might have something to do with this is that before I installed the database, a copy of SharePoint was running and I uninstalled the database it had along with SharePoint, but who knows... TCP/IP is enabled for the database and the SQL Browser is running. Right now there is no firewall.

    Len

All Replies

  • Friday, August 17, 2012 12:51 AM
     
     Answered

    You are getting datbase doesn't exist or you don't have rights" type of messages

    You need to check :-

    • Database you are trying to access if runing fine or not
    • User you are using is having access on database or not

    Please click the Mark as Answer or Vote As Helpful if a post solves your problem or is helpful!

  • Friday, August 17, 2012 4:08 AM
     
     Answered
    I would also check the user contxt that the  service is running under and make sure that it has permissions on the database. Have a look at the connection string and make sure they are the same.