Solved

system_user for a user without login

Posted on 2010-09-09
5
302 Views
Last Modified: 2012-05-10
create user test without login
execute as user = 'test';
select system_user
revert
drop user test

when i run the above, i get the value of
S-1-9-3-2009668872-1126946027-3271010458-694455781
which i can't see in sysusers or syslogins.. what is it?

thanks
0
Comment
Question by:anushahanna
  • 3
5 Comments
 
LVL 17

Accepted Solution

by:
Chris Mangus earned 250 total points
ID: 33639761
It's showing you a SID of an orphan user, which is a user account without a login.
0
 
LVL 6

Author Comment

by:anushahanna
ID: 33639830
But could not see it in sysusers (that id starting with S-') rather we have a regular sid

create user test without login
execute as user = 'test';
select system_user
select * from sysusers where name = 'test'
revert
drop user test
0
 
LVL 69

Assisted Solution

by:ScottPletcher
ScottPletcher earned 250 total points
ID: 33640430
My best guess is that SQL may have to create some type of login name internally because of the way its processes work.  You're likely seeing that "dummy" login name.
0
 
LVL 6

Author Comment

by:anushahanna
ID: 33640481
OK. that makes sense.
0
 
LVL 6

Author Comment

by:anushahanna
ID: 33640486
Thank you for your input.
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Introduced in Microsoft SQL Server 2005, the Copy Database Wizard (http://msdn.microsoft.com/en-us/library/ms188664.aspx) is useful in copying databases and associated objects between SQL instances; therefore, it is a good migration and upgrade tool…
Having an SQL database can be a big investment for a small company. Hardware, setup and of course, the price of software all add up to a big bill that some companies may not be able to absorb.  Luckily, there is a free version SQL Express, but does …
Via a live example, show how to setup several different housekeeping processes for a SQL Server.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now