 |
SUSER_SID always NULL ?!? - AAron.nAA |
01-Dec-07 07:41:46
|
Any ideas why my SUSER_SID(@login) is ALWAYS returning NULL ?!?
Machine A:
Name: aa
Member: WORKGROUP
Sql Server 2005 Express
Sql Server Management Studio Express
Manage Computer / Local Users and Groups / Add user: fresh
SELECT suser_sid('fresh') returns NULL
SELECT suser_sid('aa\fresh') returns the SID
SELECT suser_sid('AA\fresh') returns the SID
Machine B:
Name: bb
Member: WORKGROUP
Sql Server 2005
Sql Server Management Studio
Manage Computer / Local Users and Groups / Add user: fresh
SELECT suser_sid('fresh') returns NULL
SELECT suser_sid('bb\fresh') returns NULL
SELECT suser_sid('BB\fresh') returns NULL
Thanks!
-AAron |
 |
| |
| |
|
| |
|
SUSER_SID always NULL ?!? - AAron.nAA |
01-Dec-07 07:43:05
|
I figured out the difference, but it doesn't solve my problem.
I neglected to mention "Machine C" and that I am using local accounts,
NOT accounts from a central Active Directory.
So, with the new description below, creating local accounts on the Sql
Server client Machine B, then on the same machine asking Sql Server
for the suser_sid('BB\fresh') isn't working... because when Machine C
gets the request, it doesn't know about the accounts on Machine B !
The issue is that SharePoint 2007 (MOSS & WSS v3) require user SIDs to
work properly, and I'm using local accounts and a remote database.
So, is there any way for SUSER_SID() to work properly on Sql Server
2005 when solely using local accounts, and when the local account is
on a different machine? It seems like it SHOULD work since it's merely
a lookup in the machine's user list... The information I want isn't in
the database anyway!
Thanks in advance,
-AAron
Machine A:
(just standard install of Sql Server 2005 Express, worked as
expected)
Machine B:
Name: bb
Member: WORKGROUP
Microsoft Office SharePoint Server 2007 (MOSS)
Sql Server Management Studio
Manage Computer / Local Users and Groups / Add user: freshB
SELECT suser_sid('freshB') returns NULL
SELECT suser_sid('bb\freshB') returns NULL
SELECT suser_sid('BB\freshB') returns NULL
SELECT suser_sid('cc\freshC') returns SID
Machine C:
Name: cc
Member: WORKGROUP
Sql Server 2005
Sql Server Management Studio
Manage Computer / Local Users and Groups / Add user: freshC
SELECT suser_sid('freshC') returns NULL
SELECT suser_sid('cc\freshC') returns SID |
 |
| |
|
|
| How to: Select from schema1.view in dbo.mystoredproc by specifying only select * from view |