Welcome to dbFreaks.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Impersonating a user like in Unix/Linux

 
   Database Help (Home) -> Visual Basic -> ADO RSS
Next:  Can I create an assembly in Access?  
Author Message
YYZ

External


Since: Feb 18, 2005
Posts: 2



(Msg. 1) Posted: Fri Feb 18, 2005 10:46 am
Post subject: Impersonating a user like in Unix/Linux
Archived from groups: microsoft>public>vb>database>ado (more info?)

We have an app that connects as a certain user (limited rights for normal
operation) to a SQL Server 2000 database running on the local machine. Its
actually MSDE, but whatever.

When we want to push out database updates, or to be able to run a backup and
zip the database so we can pull it off of our users' machines to inspect a
bug, we would like to, using the current open connection, do something like
the su command in Linux (and probably Unix). Basically, this allows you to
"be" a different user for a certain command/set of commands. Then we can
get out of su mode and go back to just being our regular old user.

Does SQL Server support anything like this? Or do we have to create a new
connection?

Its not a HUGE chore to create a new connection, but I was hoping to make
these functions as easy to use as possible, and not have to pass in a bunch
of connection information to each of these functions so that our other
programmers can just use them and move on, and not have to know a bunch of
the connection information whenever they want to do these kinds of things.

Thanks for any and all advice.

Matt

 >> Stay informed about: Impersonating a user like in Unix/Linux 
Back to top
Login to vote
giovanni

External


Since: Feb 18, 2005
Posts: 1



(Msg. 2) Posted: Fri Feb 18, 2005 5:01 pm
Post subject: RE: Impersonating a user like in Unix/Linux [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

try search for "impersonate" keyword in SQL2000 documentation,
I also know that on 7.0 version where still supported the T-SQL command
"SETUSER" but it's scope was to "scale down" a sysadmin or a dbo_owner user
and not to promote a low profile user.
hope this helps, bye gio

"YYZ" wrote:

 > We have an app that connects as a certain user (limited rights for normal
 > operation) to a SQL Server 2000 database running on the local machine. Its
 > actually MSDE, but whatever.
 >
 > When we want to push out database updates, or to be able to run a backup and
 > zip the database so we can pull it off of our users' machines to inspect a
 > bug, we would like to, using the current open connection, do something like
 > the su command in Linux (and probably Unix). Basically, this allows you to
 > "be" a different user for a certain command/set of commands. Then we can
 > get out of su mode and go back to just being our regular old user.
 >
 > Does SQL Server support anything like this? Or do we have to create a new
 > connection?
 >
 > Its not a HUGE chore to create a new connection, but I was hoping to make
 > these functions as easy to use as possible, and not have to pass in a bunch
 > of connection information to each of these functions so that our other
 > programmers can just use them and move on, and not have to know a bunch of
 > the connection information whenever they want to do these kinds of things.
 >
 > Thanks for any and all advice.
 >
 > Matt
 >
 >
 >

 >> Stay informed about: Impersonating a user like in Unix/Linux 
Back to top
Login to vote
YYZ

External


Since: Feb 18, 2005
Posts: 2



(Msg. 3) Posted: Sat Feb 19, 2005 6:23 pm
Post subject: Re: Impersonating a user like in Unix/Linux [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"giovanni" wrote in message

 > try search for "impersonate" keyword in SQL2000 documentation,
 > I also know that on 7.0 version where still supported the T-SQL command
 > "SETUSER" but it's scope was to "scale down" a sysadmin or a dbo_owner
 > user
 > and not to promote a low profile user.
 > hope this helps, bye gio

Thanks -- its just like you remembered, but even worse for me. SETUSER is
only included for backward compatibility, and therefore I can't count on it
being in any later version.

Thanks for that, though -- I must have thought of the word "impersonate"
AFTER I searched the BOL. Sorry for that.

Matt
 >> Stay informed about: Impersonating a user like in Unix/Linux 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
runtime error 3021 and user permissions - I have a VB6 application that uses ADO 2.7 to access an Access2000 database. I have found on Windows XP and 2000, that if the user is not part of the administrators group, they receive: "runtime error 3021. Either BOF or EOF is true, or the current ...

updatable ado-recordset - Hi, In the code below i have an updatable ado-recordset. However it is not working how i thought it would be. Maybe someone can help me out here? The global connection (Thanks to Brendan): Option Compare Database Option Explicit Public mconn As..

ADO Connection Access Database VB - I have been accessing a database on a local drive thru an ADO connection. The following is the code that I have been using. cnCejco.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=Y:\Cejco.mdb;Persist Security Info=False" The problem is n...

DataReport PageBreak - Hi everyone, I would like to know how to force pagebreak in a datareport for example after 5 records printed. Thank you all

Recordset-adding to a Listview - I've got a weird problem - - - it must be something simple, but for the life of me, I must be missing it... I've got a recordset - and I'm trying to add the results into a listview, but, instead of adding each successive record after the first line of....
   Database Help (Home) -> Visual Basic -> ADO All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]