Hi,

I have recently finished a windows desktop application for a client that connects to a sql server database. Throughout development while the server instance was on my local machine the application and server communicated fine with the connection string below

<add name="myString" 
         connectionString="Data Source=myServerName;Initial Catalog=&quot;myDbName&quot;;Integrated Security=True" providerName="System.Data.SqlClient" />

However when we installed the database onto a server and swapped the data source names over the application failed to access the server.

When we installed sql server we used the default settings except when it came to the service account settings where the DBA used checked use a domain user account and used the administrator log in details. Everything else was by default.

The version of sql server is 2005 developer edition.

Apologies for any holes in my knowledge - I've never tackled this task before!

Can anyone shed any light?

First things first...if you're using integrated security, did you add the users' NT logins to SQL Server and give them permissions to your database? If not then all connections will be denied except for the database owner or SA.

You may consider creating an Active Directory Group and add all your users to that group. Then you only have to add the AD Group to the SQL Server logins, then grant that group the needed permissions. Then you can move users in and out of the AD group and they will automatically get the permissions as part of the group. Without seeing more of how your server and database is set up, I can only offer these generic hints. This may do the trick for you, though.

One thing to keep in mind...lax or weak database security is a huge vulnerability...if you have a competent DBA around, have him help you do this. If you don't, think very seriously about hiring a consultant for a few hours to help. Believe me, it's not for the faint of heart if you want to protect your data, and spending a few dollars now will save you much misery later.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.