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. user acces spermissions

user acces spermissions

Scheduled Pinned Locked Moved Database
databasehelp
4 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.
  • R Offline
    R Offline
    ranjjj
    wrote on last edited by
    #1

    I have a sql databse.. Now I'll have to write a program that will find the users for that database and each user's access access permissions. and set permissions iff necessary! can someone help me out in doing this! ranjani

    P 1 Reply Last reply
    0
    • R ranjjj

      I have a sql databse.. Now I'll have to write a program that will find the users for that database and each user's access access permissions. and set permissions iff necessary! can someone help me out in doing this! ranjani

      P Offline
      P Offline
      perlmunger
      wrote on last edited by
      #2

      You can use the SQLDMO to view user information on a particular database. If you are using something like C# or VB .NET, you can just add a reference to your project to the SQLDMO. Then just start referencing the objects you want to use. SQLDMO.User (which can be accessed from the SQLDMO.Database.Users collection) will probably give you what you're looking for. -Matt ------------------------------------------ The 3 great virtues of a programmer: Laziness, Impatience, and Hubris. --Larry Wall

      R 1 Reply Last reply
      0
      • P perlmunger

        You can use the SQLDMO to view user information on a particular database. If you are using something like C# or VB .NET, you can just add a reference to your project to the SQLDMO. Then just start referencing the objects you want to use. SQLDMO.User (which can be accessed from the SQLDMO.Database.Users collection) will probably give you what you're looking for. -Matt ------------------------------------------ The 3 great virtues of a programmer: Laziness, Impatience, and Hubris. --Larry Wall

        R Offline
        R Offline
        ranjjj
        wrote on last edited by
        #3

        I'll have to program using c++ ...using UI's but! What is SQLDMO ? ranjani

        P 1 Reply Last reply
        0
        • R ranjjj

          I'll have to program using c++ ...using UI's but! What is SQLDMO ? ranjani

          P Offline
          P Offline
          perlmunger
          wrote on last edited by
          #4

          Here is a basic definition of SQLDMO that I found here: http://www.expresscomputeronline.com/20030616/techspace1.shtml "DMO is a set of objects that represents the SQL Server infrastructure. This is a very rich and complex object model. It is not intended to provide data handling, which is best done by traditional SQL commands. DMO is designed for administration of SQL Server using a component object model approach. In fact, using DMO, you can do things that are impossible with Enterprise Manager. Moreover, it is often much simpler to write a DMO based code rather than trying to find equivalent Transact SQL syntax for achieving certain administrative tasks." Things I've used it for include: - Listing available SQL Servers - Listing available databases in a given server - Programmatically "walking" a set of database tables for generating database objects based on those table (just to name a few). It is a very useful component. I found a link here http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/Q287/7/37.ASP&NoWebContent=1 that demonstrates listing available SQL servers using C++. I'm sure there are many more examples out there, so you should just do a google search for the term "C++ SQLDMO" or something like that. There tend to be more examples out there written in VB or C#, however, the same component can be referenced from C++. Let me know if you need any further clarification. -Matt ------------------------------------------ The 3 great virtues of a programmer: Laziness, Impatience, and Hubris. --Larry Wall

          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