473,761 Members | 9,379 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

T-Sql & Active Directory Roles, Identification of original login ofimpersonated ID's and Suspended processing

Tim
Folks,

I have 3 loosely linked problems which I am would appreciate feedback
on.

1). T-Sql and Active directory roles.
We want to be able to control access to data within a table based on a
role within Active directory.
For example, Region1 has 4 sites, Region 2 has 3 sites and so forth.
All the sites are held in a single database table.
The staff in Region1 must be limited to only being able to retrieve
data for their 4 sites.
We would like to set up an active directory role for each region and
use this to control things.
Is there any way in which T-Sql can retrieve data about the Active
Directory Roles?

2). Drilling back to the original ID when an impersonating ID is used
at database level.
We have legacy systems that allow for an individual login but once the
data request is passed to the database the access is via a generic ID.
This is causing a problem with tracking the authors of inappropriate
changes to the data.
Is there anyway in which T-Sql can drill back to the original ID?

3). Suspended processes.
We are running 2005, to be precise:-

Microsoft SQL Server Management Studio 9.00.3042.00
Microsoft Analysis Services Client Tools 2005.090.3042.0 0
Microsoft Data Access Components (MDAC) 2000.085.1117.0 0
(xpsp_sp2_rtm.0 40803-2158)
Microsoft MSXML 2.6 3.0 4.0
5.0 6.0
Microsoft Internet Explorer 6.0.2900.2180
Microsoft .NET Framework 2.0.50727.42
Operating System 5.1.2600

We are finding that the larger SQL statements, in terms of the number
of rows affected, are being 'Suspended' and just hanging for hours.
The term Suspended is taken from the Management>Acti vity
Monitor>Status Column.
We believe that the 'Suspended' is occuring because the process is
waiting on memory but we're not certain.
Does anyone know the cause and / or cure for this 'undocumented
feature'?

TIA, Tim



Jul 15 '08 #1
1 4060
Tim (ti**********@h otmail.com) writes:
1). T-Sql and Active directory roles.
We want to be able to control access to data within a table based on a
role within Active directory.
For example, Region1 has 4 sites, Region 2 has 3 sites and so forth.
All the sites are held in a single database table.
The staff in Region1 must be limited to only being able to retrieve
data for their 4 sites.
We would like to set up an active directory role for each region and
use this to control things.
Is there any way in which T-Sql can retrieve data about the Active
Directory Roles?
You can grant DB access to a Windows group, and I think you also
can grant permissions in SQL Server to Windows groups. But you seem
to be looking at some row-level security scheme. In that case, have a
look at the is_member() function.
2). Drilling back to the original ID when an impersonating ID is used
at database level.
We have legacy systems that allow for an individual login but once the
data request is passed to the database the access is via a generic ID.
This is causing a problem with tracking the authors of inappropriate
changes to the data.
Is there anyway in which T-Sql can drill back to the original ID?
It would have helped if you had told how impersonation is done, as
there are several options. But I can think of two ways:

1) Have the generic ID to perform an EXECUTE AS on behalf of the
real user. Note that in SQL 2005 you can add login-less users to
a database.

2) Issue SET CONTEXT_INFO before the generic ID starts working. Then
use the context_info function to retrieve that data in your T-SQL
code.
We are finding that the larger SQL statements, in terms of the number
of rows affected, are being 'Suspended' and just hanging for hours.
The term Suspended is taken from the Management>Acti vity
Monitor>Status Column.
We believe that the 'Suspended' is occuring because the process is
waiting on memory but we're not certain.
Does anyone know the cause and / or cure for this 'undocumented
feature'?
Without knowing more, I would guess on cached connections for linked
servers. I don't think they are waiting for memory.

--
Erland Sommarskog, SQL Server MVP, es****@sommarsk og.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
Jul 15 '08 #2

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

Similar topics

2
15191
by: James Allan | last post by:
Hello -- I'm trying to get SQL Server 2000 on a Windows 2000 Server to be able to query an Active Directory. We've got two domain servers one Win2000 and one Win2003. However, I'm having problems: I've run the following query to setup the linked server: sp_addlinkedserver 'ADSI', 'Active Directory Service Interfaces', 'ADSDSOObject', 'adsdatasource'
0
908
by: hooperman68 | last post by:
I have 4 servers all running Active Directory. I have Install the DNS services on all the servers. (first) is this good practice, and the replication have passed to all the servers correctly. Second, should each server be the primary server or should I change this is in the zones. Third sould the TCPIP be config first DNS server itself, and the second another on on the network. The design of the network is based on a WAN with 4 servers...
2
8809
by: Steven Marshall | last post by:
I would like to check login credentials, ie username and password, from Active Directory via an asp page. This will allow users to login to a restricted area of the website using their windows login and password. I read a thread about it on here, but it just said that it was possible, it didn't say how it was possible. Any suggestions? Examples would be EXCELLENT. -- -- Steven Marshall Web Technician
0
919
by: bryhhh | last post by:
I have an application that creates computer objects in an active directory domain, but I want to be able to set ACLs on the object, rather than inherit the ACLs from the parent container. Can anybody offer any advise about how this can be done? Regards, Bryan Hobson
4
2276
by: Marty Underwood | last post by:
Okay the subject line explains a scenario I just had to tackle but I am looking for a better way. The current way: 1) Use forms authentication. 2) Query Active Directory and bind to a user object if no exception create custom authentication ticket. 3) But I also needed Role based security within the app. So I used SQL server 2k DTS package to get the members of the AD group and then created a
1
1039
by: Bart | last post by:
I want to check whether a certain user is a member of a certain group in active directory. Is this possible ? Bart
0
1050
by: billk | last post by:
I was developed an ASP.NET application using the authentication method descripted in the folowing url evrething works fine in IIS 5 but when i deploy the application in Windows 2003 server with IIS 6 this method does not work anymore. How must configure IIS 6 to work with the above method? thanks.
3
5331
by: Demetri | last post by:
Hello, My company has charged me with creating a web service that will validate a user and return the user's roles via Active Directory. The requirement is that the web service must return data to any consumer. This means the consumer may be a Java app or any app on any platform. Now, my knowledge of returning data to consumers who are not .Net applications or platforms is limited. I was told to make sure that SOAP
0
1271
by: mduff | last post by:
This is actually a great script that will help authenticate your username and password within your domain. One thing I would correct is directly above the line that indicates: Set oADsObject = oADsNamespace.OpenDSObject(strADsPath, strUserName, strPassword, 0) place an on error resume next
0
9522
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10111
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9948
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9765
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8770
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5364
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3866
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3446
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2738
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.