user mapping

  • Please view the attached picture and tell me how to script setting the sv2 user to 'map' to the solovue_country_fresh database with a role membership of db_owner.

    Thank you!!

    Mike

  • Did you consider BOL (BooksOnLine, the SQL Server help system), section "sp_addrolemember" as a resource?



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • Everything's kinda on that screen. I think you ought to try this yourself first and if it doesn't work, let us know what you've done.

  • Everything is on that screen is UI. I want to know how to do it in an .SQL file that can be run.

    Mike

  • Try the SP_ADDROLEMEMBER TSQL

    EXEC SP_ADDROLEMEMBER N'db_owner', N'user_login'

    "More Green More Oxygen !! Plant a tree today"

  • Ok...

    This:

    use xyz

    EXEC sp_grantdbaccess @loginame = 'sv2'

    gets me 'public' database access to xyz for user sv2. How do I programatically get the db_owner set for the same user?

    TIA,

    Mike

  • mike 57299 (8/6/2010)


    Ok...

    This:

    use xyz

    EXEC sp_grantdbaccess @loginame = 'sv2'

    gets me 'public' database access to xyz for user sv2. How do I programatically get the db_owner set for the same user?

    TIA,

    Mike

    What privileges with you have logged in? if it is a sysadmin and simple from the management studio you can assign db_owner role on the specific db for the login you need. This will be the simple step

    or use the TSQL above to grant the role.

    Cheers,

    Got an idea..share it !!

    DBA_Vishal

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

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