473,409 Members | 1,967 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,409 software developers and data experts.

Web Assistant and Active Directory

Hi

I've created a stored procedure (see below) which accesses the Active
Directory and SQL server to get "real names" back. When I run the
stored procedure in Query Analyzer it returns the expected results,
however when I try to create a Web Assistant job based upon the
procedure I get the SQL-DMO message:

Error 7410 Remote Access not allowed for Windows NT Useractivated by
SETUSER.

The procedure is being run (and the job created) as the account which
owns the SQL Server installation, and this account has AD admin
permissions.

Any suggestions?

CREATE VIEW dbo.vw_account_ad
AS
SELECT a.Name AS ad_name, dbo.Accounts.*
FROM dbo.Accounts INNER JOIN
OPENQUERY(ADSI,
'select SamAccountName, Name FROM
''LDAP://w2k-bspad1/ ou=users,ou=bsp,DC=ad,DC=bl,DC=uk'' where
objectcategory=''person'' ') a ON
SUBSTRING(dbo.Accounts.Account_Name,
CHARINDEX('\', dbo.Accounts.Account_Name) + 1,
LEN(dbo.Accounts.Account_Name) - CHARINDEX('\',
dbo.Accounts.Account_Name)) = a.SamAccountName
CREATE PROCEDURE [dbo].[usp_event_report] AS

SET ANSI_NULLS ON
SET ANSI_WARNINGS ON

SELECT Code_Name, Account_Name + ' ('+ad_Name+')' as 'Account Name',
Date_Occured, Result
FROM Usage_Codes, Usage, vw_account_ad
WHERE Usage.Code_ID = Usage_Codes.Code_ID
AND Usage.Account_ID = vw_account_ad.Account_ID
AND datepart(month,Date_Occured) = datepart(month,getdate())
ORDER BY Code_Name, Account_Name, Date_Occured
GO

Chloe Crowder
The British Library
Jul 20 '05 #1
2 3760
Chloe Crowder (ch***********@bl.uk) writes:
I've created a stored procedure (see below) which accesses the Active
Directory and SQL server to get "real names" back. When I run the
stored procedure in Query Analyzer it returns the expected results,
however when I try to create a Web Assistant job based upon the
procedure I get the SQL-DMO message:

Error 7410 Remote Access not allowed for Windows NT Useractivated by
SETUSER.

The procedure is being run (and the job created) as the account which
owns the SQL Server installation, and this account has AD admin
permissions.

Any suggestions?


It seems that you have run into a restriction.

I don't know the web assistent, but I would guess that the web assistent
runs from a single login, which then performs SETUSER of behalf of the
user the job is to run. (I believe that SQL Server Agent does this a lot.)
But once you have issued a SETUSER, you can no longer access any remote
source. For instance I tried this:

setuser 'KESÄMETSÄ\sommar'
go
select * from openquery(KESÄMETSÄ, 'select * from pubs.dbo.authors')
go
setuser

KESÄMETSÄ is the machine I am running from, and I am logged into SQL
Server as KESÄMETSÄ\sommar with sysadmin priviledges. Yet I get the
same error message as you.
--
Erland Sommarskog, SQL Server MVP, so****@algonet.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 20 '05 #2
Erland Sommarskog <so****@algonet.se> wrote in message news:<Xn**********************@127.0.0.1>...
Chloe Crowder (ch***********@bl.uk) writes:
I've created a stored procedure (see below) which accesses the Active
Directory and SQL server to get "real names" back. When I run the
stored procedure in Query Analyzer it returns the expected results,
however when I try to create a Web Assistant job based upon the
procedure I get the SQL-DMO message:

Error 7410 Remote Access not allowed for Windows NT Useractivated by
SETUSER.

The procedure is being run (and the job created) as the account which
owns the SQL Server installation, and this account has AD admin
permissions.

Any suggestions?


It seems that you have run into a restriction.

I don't know the web assistent, but I would guess that the web assistent
runs from a single login, which then performs SETUSER of behalf of the
user the job is to run. (I believe that SQL Server Agent does this a lot.)
But once you have issued a SETUSER, you can no longer access any remote
source. For instance I tried this:

setuser 'KESÄMETSÄ\sommar'
go
select * from openquery(KESÄMETSÄ, 'select * from pubs.dbo.authors')
go
setuser

KESÄMETSÄ is the machine I am running from, and I am logged into SQL
Server as KESÄMETSÄ\sommar with sysadmin priviledges. Yet I get the
same error message as you.


FYI, this behaviour is documented here:

http://support.microsoft.com/default...&Product=sql2k

Usually, making sa the job owner seems to fix this (the first
workaround from the KB Article), although I've never tried it with AD.

Simon
Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: microsoft | last post by:
Hi People, when I try to modify an active directory user programatically, I receive the following exception: The server is unwilling to process the request Reading the microsoft web site, I...
9
by: Mario Rodriguez | last post by:
Hi people. I have a problem adding users to Win2003 active directory programatically. When I execute my app throws the following exception: .................The specified directory service...
5
by: Thames | last post by:
For the Configuration Assistant, why gave me such errors when I try to add remote database "sample" on linux (DB2 ESE UDB version 8)using "add database wizard" to my local DB server ...
1
by: Wayne Aprato | last post by:
I'm calling the following code from my autoexec macro: Application.Assistant.Visible=False but the Office Assistant still graces the screen. What am I doing wrong? Thanks in advance.
1
by: Andrew | last post by:
Hey all, Working on revamping our Intranet here and making use of the LDPA, Active Directory, Directory Services, etc. that .Net provides. I am still fairly new on this subject, so the problem...
6
by: Leo_Surf | last post by:
Hello, I need your help adding user in Active Directory from ASP.net website. Could any one provide me the complete code for the html page. As this is my curriculam project and I dont have any...
1
by: tangus via DotNetMonster.com | last post by:
Hello all, I'm really struggling with getting some Active Directory code to work in ASP.NET. Can you please provide assistance? I am executing the following code: Dim enTry As DirectoryEntry =...
10
by: Hriday | last post by:
Hi there, Please help me..It is urgent This is Hriday, working on windows authentication with Active Directory... My requirment is when a user sends a request to my web Applicatoin I want to...
0
by: RTT | last post by:
here is my current situation. I develop a program on my computer's localhost. From there i contact Active directory succesfull using a connectionstring like:...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.