Database Locking

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • SnehaAgrawal
    New Member
    • Apr 2009
    • 31

    Database Locking

    Hi I want to know how can I lock my database...I mean if someone wishes to see he should be able to see only Database Name He should not be able to see tables,Sp's,UDF 'S...I don't want to set permissions bcoz permissions can be changed by ADMIN...
  • balame2004
    New Member
    • Mar 2008
    • 142

    #2
    This is interesting question. Very useful if someone explain the possibilities.

    Comment

    • ck9663
      Recognized Expert Specialist
      • Jun 2007
      • 2878

      #3
      They're called ADMIN because they can do anything. Being the highest user, you can not stop them from doing anything. If you can, that makes you the ADMIN which makes everything a cycle :)

      Good luck


      --- CK

      Comment

      • prabirchoudhury
        New Member
        • May 2009
        • 162

        #4
        ok..

        Set the database into single user mode so only one connection can access it

        Code:
        sp_dboption 'databaseName', single, true
        
        Set the database to readonly
        
        sp_dboption 'databaseName', read only, true
        that might solve problem..
        Last edited by prabirchoudhury; May 16 '09, 09:46 AM. Reason: Database Locking Edit Post

        Comment

        Working...