Solved

system_user for a user without login

Posted on 2010-09-09
5
306 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:Scott Pletcher
Scott Pletcher 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

Backup Solution for AWS

Read about how CloudBerry Backup fully integrates your backups with Amazon S3 and Amazon Glacier to provide military-grade encryption and dramatically cut storage costs on any platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

713 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