I have a user u with server role security admin. I use sql2000. I go the query analyzer and call sp_helplogins. Now I get all the logins with attached users. Perfect! When i'm in my sourcecode(C++ and i use sqloledb.dll) and I make a call to sp_helplogins I get now results. Why is this? When I also give user u the fixed server role system admin it also works in my code. But in sql server help file it says the following:
Only members of the sysadmin and securityadmin fixed server roles can execute sp_helplogins.
So it should be enough to have only one of these two roles. Does anyone have a clue why I don't get result when I call sp_helplogins from my code. I don't want to give system admin tights to user u.
As I said I CAN use the stored_procedure sp_helplogins with sql analyzer, but not when i'm calling it from my C++ sourcecode. It is on the same machine. It happens for sqlserver 7 and 2000. I use the sqloledb-provider to make calls from C++ to the database.