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
  1. Home
  2. Database & SysAdmin
  3. Database
  4. delete all users from database and set one user

delete all users from database and set one user

Scheduled Pinned Locked Moved Database
databasesql-serversysadminquestion
3 Posts 2 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.
  • H Offline
    H Offline
    hamid_m
    wrote on last edited by
    #1

    i want to know how can i delete (or disable) all users (dbo, guest, etc.) from my database and set one user for my database. in fact i don't want other users could to connect to mydatabase in any sql server.

    J 1 Reply Last reply
    0
    • H hamid_m

      i want to know how can i delete (or disable) all users (dbo, guest, etc.) from my database and set one user for my database. in fact i don't want other users could to connect to mydatabase in any sql server.

      J Offline
      J Offline
      joemonvarghese
      wrote on last edited by
      #2

      hi Use enter prise Manager To remove Users ..Follow these steps 1)To remove a user account from a database role 2)Expand a server group, and then expand a server. 3)Expand Databases, and then expand the database in which the role exists. 4)Click Roles. 5)In the details pane, right-click the role to which the user account belongs, and then click Properties. 6)Select the user to remove, and then click Remove.

      H 1 Reply Last reply
      0
      • J joemonvarghese

        hi Use enter prise Manager To remove Users ..Follow these steps 1)To remove a user account from a database role 2)Expand a server group, and then expand a server. 3)Expand Databases, and then expand the database in which the role exists. 4)Click Roles. 5)In the details pane, right-click the role to which the user account belongs, and then click Properties. 6)Select the user to remove, and then click Remove.

        H Offline
        H Offline
        hamid_m
        wrote on last edited by
        #3

        thank you, so i will remove all users (dbo, ..) from my database and set one user to it and detach it from sql server, now i have a mdf file that just one user could connect to it. let me know in any machine with sql server express just my user could connect to it and others (dbo, ...) could not connect to my database? in fact i don't want any user from any machine could connect or view my database.

        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