Complicated !!!!!!!!!!! Plz provide script

  • Can any1 help me in generating following output?? Plz provide script..

    I want to collect following details,

    Login_names,ServerLevel role,Database Level role,Databases associated for that role.

    this means i need to capture all login names lets say if there r 3 logins A,B,C then

    i want to capture their names,there server level roles and also details for which databases A is db_owner and for which databases it is dbreader.

    It is too complicated but plz help me out.

  • Search for Security Catalog Views in books online, that will show what you need.

  • thanks!!!!!!

    but i want to gather information in single shot in order to import in excel sheet..

    those views and system tables as well as spz,give me all d details but its too tidious to check for more than 20 logins per server also databases associated for each logins are also large in no...

    thus in order to automate this process i need script.

  • What's the issue with joining the tables together and using a WHERE clause?

  • actually i am not so good at writing queries having cursors or multiple joins..

    i will appreciate if any1 can write for me and help me out.

    thanks !!!!

  • Actually, if you make the effort (good or not) to create a script and post it here, someone will help with it.

    MG

    "There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies. And the other way is to make it so complicated that there are no obvious deficiencies."
    Tony Hoare

    "If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.

  • Nikhil,

    I will repeat MG's words, You please try it once, post your query here. Definitely you will see comments from experts.

    If you don't know how to write select statement using where clause learn it now, before it is too late.

    ~ IM.

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply