Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Create sql server users and groups using SQL statement

Create sql server users and groups using SQL statement

Scheduled Pinned Locked Moved Database
databasecsharpsql-serversysadmin
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    miceisland
    wrote on last edited by
    #1

    Halo, Which tables in SQL server i need to update to create users for database and assign them to a groups? any articles to share. planning to use this sql script from vb.net to create users ;) thanks Stephen --------------------- www.islasolutions.net

    C E 2 Replies Last reply
    0
    • M miceisland

      Halo, Which tables in SQL server i need to update to create users for database and assign them to a groups? any articles to share. planning to use this sql script from vb.net to create users ;) thanks Stephen --------------------- www.islasolutions.net

      C Offline
      C Offline
      Colin Angus Mackay
      wrote on last edited by
      #2

      miceisland wrote:

      Which tables in SQL server i need to update to create users for database and assign them to a groups?

      You don't update any tables. You should use the stored procedures: * sp_grantdbaccess[^] * sp_addrolemember[^]


      "On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question." --Charles Babbage (1791-1871) My: Website | Blog

      M 1 Reply Last reply
      0
      • C Colin Angus Mackay

        miceisland wrote:

        Which tables in SQL server i need to update to create users for database and assign them to a groups?

        You don't update any tables. You should use the stored procedures: * sp_grantdbaccess[^] * sp_addrolemember[^]


        "On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question." --Charles Babbage (1791-1871) My: Website | Blog

        M Offline
        M Offline
        miceisland
        wrote on last edited by
        #3

        many thanks. i will try this. :-D --------------------- www.islasolutions.net

        1 Reply Last reply
        0
        • M miceisland

          Halo, Which tables in SQL server i need to update to create users for database and assign them to a groups? any articles to share. planning to use this sql script from vb.net to create users ;) thanks Stephen --------------------- www.islasolutions.net

          E Offline
          E Offline
          Eric Dahlvang
          wrote on last edited by
          #4

          Also see: sp_addlogin[^] ---------- Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them. - Laurence J. Peters

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups