Solved

varbinary in equality condition

Posted on 2010-08-26
8
281 Views
Last Modified: 2012-05-10
when i run the foll, i get a bunch of valid users, right?
select * from sysusers a, master..syslogins b where a.sid = b.sid

I copied one of the SIDs and pasted it below like
select * from master..syslogins where sid = '0x010600000000000901000000FF26DF8EEDB95511A14FF6DC4F44B25F67867BAE'

but i get blank output. why is this?

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

Accepted Solution

by:
xDJR1875 earned 250 total points
ID: 33534571
Don't put it in quotes
0
 
LVL 8

Expert Comment

by:Mohit Vijay
ID: 33534684
select * from master..syslogins where sid = suser_sid('0x010600000000000901000000FF26DF8EEDB95511A14FF6DC4F44B25F67867BAE')
0
 
LVL 8

Expert Comment

by:Mohit Vijay
ID: 33534699
pass login name in SUSER_SID
0
 
LVL 6

Author Comment

by:anushahanna
ID: 33534844
xDJR1875, that worked. thanks.
0
Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

 
LVL 6

Author Comment

by:anushahanna
ID: 33534854
VjSoft, the foll is bringing blank..
select * from master..syslogins where sid = suser_sid('0x010600000000000901000000FF26DF8EEDB95511A14FF6DC4F44B25F67867BAE')

whereas
select * from master..syslogins where sid = 0x010600000000000901000000FF26DF8EEDB95511A14FF6DC4F44B25F67867BAE
brings the output.
0
 
LVL 8

Expert Comment

by:Mohit Vijay
ID: 33534875
suser_sid('0x010600000000000901000000FF26DF8EEDB95511A14FF6DC4F44B25F67867BAE')

is not correct, I wrote it by mistake, see my next post, that will work,
0
 
LVL 8

Assisted Solution

by:Mohit Vijay
Mohit Vijay earned 250 total points
ID: 33534888
example

select * from master..syslogins where sid = suser_sid('sa')
0
 
LVL 6

Author Comment

by:anushahanna
ID: 33534986
beautiful. thanks many.
0

Featured Post

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Calculate values in an array 18 35
how can i make refactoring for below code for making faster? 4 29
Add '#' to end of file 2 30
Query / Window function ? 3 18
Nowadays, some of developer are too much worried about data. Who is using data, who is updating it etc. etc. Because, data is more costlier in term of money and information. So security of data is focusing concern in days. Lets' understand the Au…
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed

920 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

18 Experts available now in Live!

Get 1:1 Help Now