Re: Granting permission to a database - need help
- From: Erland Sommarskog <esquel@xxxxxxxxxxxxx>
- Date: Tue, 5 Jan 2010 22:53:43 +0000 (UTC)
Learner (pradev@xxxxxxxxx) writes:
Thanks for the inputs. But couldn't fix the issue I am facing with.
The reason why I wanted to create another user is because we have a
software that needs to be installed on users computers and this
software needs to talk to our production SQL Server 2005 to access
its database called 'DriverAccess'. When the software is installed on
users computers it generates a .config file user the program files
folder and it would have the database connection info. Below is the
connection code snippet in the config file
Since this is a Windows application, there is all reason to use
Windows authentication, and not use an application login, as then
you cannot track who has done what in any way.) (It would be
different if it was a web app; in web apps it appears to be common
to use an application login.)
for some reason it doesn't connect to the database with this
connection info (is 'Integrated Security=SSPI' option tries to connect
using windows authentication?) .
So what happens? Has the Windows user you tried to login as, been
granted access to the database?
1).Under databases there is a Security/Logins folder I created a user
called DAApplication.
2).Under the DriverAccess database Security/users folder created a
user called DAUser.
To which login did you connect it to?
In any case, I would recommend you from clicking around in SSMS, because
it will only serve to make you more confused. And you cannot automate
points and clicks. Use T-SQL commands instead.
The T-SQL steps for the above would be:
CREATE LOGIN DAApplication WITH PASSWORD = 'VerY_$$$$Tron6'
go
USE DriverAccess
go
CREATE USER DAUser FOR LOGIN DAAplication
go
However, you should really use Windows authentication, as Steen said,
this can be granted for an entire Windows group:
CREATE LOGIN [Domain\Somegroup] FROM WINDOWS
go
USE Driver Access
go
CREATE USER [Domain\Somegroup]
--
Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx
Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
SQL 2000: http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
.
- Follow-Ups:
- Re: Granting permission to a database - need help
- From: Learner
- Re: Granting permission to a database - need help
- References:
- Granting permission to a database - need help
- From: Learner
- Re: Granting permission to a database - need help
- From: Erland Sommarskog
- Re: Granting permission to a database - need help
- From: Learner
- Granting permission to a database - need help
- Prev by Date: Re: selecting from multiple OR statements
- Next by Date: Re: Entire script
- Previous by thread: Re: Granting permission to a database - need help
- Next by thread: Re: Granting permission to a database - need help
- Index(es):
Relevant Pages
|