Home > Archive > MS SQL Server > November 2006 > Changing user in sql query analyzer









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Changing user in sql query analyzer
Jason Huang

2006-11-30, 5:18 am

Hi,

In SQL Server 2000's SQL Query Analyzer, how do I change the login account?
I mean if I am using UsrA in the Analyzer, how do I switch to UserB by SQL
command?
Thanks for help.


Jason


Uri Dimant

2006-11-30, 5:18 am

Jason
I'm afraid you cannot in SQL Server 2000, unless open a new connection .




"Jason Huang" < JasonHuang8888@hotma
il.com> wrote in message
news:%23tox$%23FFHHA
.3288@TK2MSFTNGP05.phx.gbl...
> Hi,
>
> In SQL Server 2000's SQL Query Analyzer, how do I change the login
> account?
> I mean if I am using UsrA in the Analyzer, how do I switch to UserB by SQL
> command?
> Thanks for help.
>
>
> Jason
>



Tibor Karaszi

2006-11-30, 5:18 am

> I mean if I am using UsrA in the Analyzer, how do I switch to UserB by SQL command?

In 2000, you only have the SETUSER command, but it changes the user context, not the login context.

In 2005, you have the EXECUTE AS command, and you decide whether to change user or login context.

--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www. solidqualitylearning
.com/



"Jason Huang" < JasonHuang8888@hotma
il.com> wrote in message
news:%23tox$%23FFHHA
.3288@TK2MSFTNGP05.phx.gbl...
> Hi,
>
> In SQL Server 2000's SQL Query Analyzer, how do I change the login account?
> I mean if I am using UsrA in the Analyzer, how do I switch to UserB by SQL command?
> Thanks for help.
>
>
> Jason
>


Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com