I am sorry for cross-posting, but I'm used to posting in the programming
section and posted there as a force of habit.
I have an application written in VB6 that is hooked up to Sql Server 2005.
I can't seem to get a regular user to be able to access it. There's a Sql
Server error:
"Login failed for user ''. The user is not associated with a trusted Sql
Server connection." Note that it doesn't name the user; just supplies blank
single quotes together.
I want to use Windows Authentication. I set up a group in Active Directory
called CustomerService.
Can someone show me step by step how I set up the CustomerService group to
access the database MyDatabase?
Any help will be greatly appreciated!!
Sandy> "Login failed for user ''. The user is not associated with a trusted Sql
> Server connection." Note that it doesn't name the user; just supplies
> blank
> single quotes together.
I'm not sure of the significance of the empty string. Most often, the
message specifies user "(NULL)" and that means that the users Windows
credentials could not be verified and may be due to a number of different
reasons. For example, I've seen that happen when the client computer clock
was significantly different that the domain controller.
> Can someone show me step by step how I set up the CustomerService group to
> access the database MyDatabase?
You can grant all members of that AD group access to the database as
follows:
SQL 7 and SQL 2000:
EXEC sp_grantlogin 'MyDomain\CustomerService'
USE MyDatabase
EXEC sp_grantdbaccess 'MyDomain\CustomerService'
SQL 2005:
CREATE LOGIN [MyDomain\CustomerService]
FROM WINDOWS
USE MyDatabase
CREATE USER [MyDomain\CustomerService]
Hope this helps.
Dan Guzman
SQL Server MVP
"Sandy" <Sandy@.discussions.microsoft.com> wrote in message
news:A3D05D3B-79C1-4318-AFE7-E65604A0EFE5@.microsoft.com...
>I am sorry for cross-posting, but I'm used to posting in the programming
> section and posted there as a force of habit.
> I have an application written in VB6 that is hooked up to Sql Server 2005.
> I can't seem to get a regular user to be able to access it. There's a Sql
> Server error:
> "Login failed for user ''. The user is not associated with a trusted Sql
> Server connection." Note that it doesn't name the user; just supplies
> blank
> single quotes together.
> I want to use Windows Authentication. I set up a group in Active
> Directory
> called CustomerService.
> Can someone show me step by step how I set up the CustomerService group to
> access the database MyDatabase?
> Any help will be greatly appreciated!!
> --
> Sandy|||You would execute something like the following:
USE master
GO
CREATE LOGIN [YourDomain\SomeGroup]
FROM WINDOWS
WITH DEFAULT_DATABASE= YourDefaultDatabaseName
GO
USE YourDatabase
GO
CREATE USER [YourDomain\SomeGroup]
FOR LOGIN [YourDomain\SomeGroup]
WITH DEFAULT_SCHEMA= YourDefaultSchemaName
That's just to access the database. Then you need to figure
out permissions in the database.
-Sue
On Mon, 14 May 2007 17:45:01 -0700, Sandy
<Sandy@.discussions.microsoft.com> wrote:
>I am sorry for cross-posting, but I'm used to posting in the programming
>section and posted there as a force of habit.
>I have an application written in VB6 that is hooked up to Sql Server 2005.
>I can't seem to get a regular user to be able to access it. There's a Sql
>Server error:
>"Login failed for user ''. The user is not associated with a trusted Sql
>Server connection." Note that it doesn't name the user; just supplies blan
k
>single quotes together.
>I want to use Windows Authentication. I set up a group in Active Directory
>called CustomerService.
>Can someone show me step by step how I set up the CustomerService group to
>access the database MyDatabase?
>Any help will be greatly appreciated!!|||Thanks for your reply, Sue.
Would I use dbo as YourDefaultSchemaName?
I need all the users in YourDomain/SomeGroup to be able to execute stored
procedures, insert, update and delete on all tables in the database. How
would I word that?
Again, any help is greatly appreciated!
--
Sandy
"Sue Hoegemeier" wrote:
> You would execute something like the following:
> USE master
> GO
> CREATE LOGIN [YourDomain\SomeGroup]
> FROM WINDOWS
> WITH DEFAULT_DATABASE= YourDefaultDatabaseName
> GO
> USE YourDatabase
> GO
> CREATE USER [YourDomain\SomeGroup]
> FOR LOGIN [YourDomain\SomeGroup]
> WITH DEFAULT_SCHEMA= YourDefaultSchemaName
> That's just to access the database. Then you need to figure
> out permissions in the database.
> -Sue
> On Mon, 14 May 2007 17:45:01 -0700, Sandy
> <Sandy@.discussions.microsoft.com> wrote:
>
>
Monday, March 26, 2012
Help! Set up Windows Group to access application
Labels:
access,
application,
cross-posting,
database,
force,
group,
habit,
microsoft,
mysql,
oracle,
posting,
programmingsection,
server,
sql,
windows
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment