Sunday, March 25, 2012

Accessing Database Users

Hi,

I would like to know if there is any way of Accessing database users from frontend and changing their persmissions.

Thanks

Niranjana.

You can do it from Enterprise Manager. Anything other than that you can run profiler and see what procs get called and build your own tool simulating the windows from EM.

|||

Thanks for the idea!

Let me try...

-Niranjana.

|||

Hi Dinakar,

Your idea worked fine...Thank you

-Niranch

|||

Hi dinakar,

I am trying to pull the users for a database and display in the frontend. As by your idea I have found the storedprocedure which displays the users in the Enterprise Mangager. This Stored Procedure Stores the values of all users in a temp table.

Can you please let me know,

How to get output from temp tables? used in the procedure...

thanks

-Niranch

|||

Check out master..syslogins.

|||

I have located the system stored procedure(sp_MSdbuseraccess) which will list all the users of the database. Now my question is, how to get the output values from the stored procedure...so that i can use it from the front end...

thanks

-niranch

|||Well you could cut n paste the code into your own proc and call the proc from your application.|||

Cutting and pasting will not help, since the stored procedure doesn't give any output, it is a system stored procedure which just collects the loginid's and the permission level and displays these details in the Enterprise manager(I guess it has it's own logic to display in the EM).Anyhow it stores the output value in a TEMP Table.

In my case, I want to use this proc to get the login id's and display in the front end. I could get the values from the TEMP table, I would like to know how to retrieve the values of the temp table outside the procedure? If it is not possible is there anyother way of converting these TEMP table values to recordsets and send it as OUTPUT values? Kindly help me...

Thanks

-Niranch

|||If temp table is not an option you could create a physical table and insert into it and later do a SELECT from the table outside the proc.|||

Thank You, Let me try that....

-Niranch

No comments:

Post a Comment