How to disable a database in SQL?

chandrurec
Member Posts: 560
Hi all,
I have 2 databases named (TEST & LIVE)in the same server.I want to disable TEST database so that users login through finsql for accessing this TEST database. How to disable the TEST database so that the users will not be allowed to login this TEST database.
IF anyone knows the solution for disabling a database in SQL, Kindly let me know.
Thanks in advance.
Regards,
chandru.
I have 2 databases named (TEST & LIVE)in the same server.I want to disable TEST database so that users login through finsql for accessing this TEST database. How to disable the TEST database so that the users will not be allowed to login this TEST database.
IF anyone knows the solution for disabling a database in SQL, Kindly let me know.
Thanks in advance.
Regards,
chandru.
0
Comments
-
Did you try by Unchecking the database in User Mapping setup in SQL management studio?0
-
Hi mohana_cse06 ,
I tried it but still I can access the database.
Regards,
chandru.0 -
Can you explain me what you did?0
-
Hi mohana_cse06 ,
I selected the login id for which I want to disble the TEST database, then went to user mapping properties then it lists all the db in right hand side,I unchecked the TEST Db.
Regards,
chandru.0 -
Which version of SQL Server r u using? you can try the following:
1. Open SQL Server Management Studio
2. Expand the Databases
3. Right click on the TEST database
4. Select Tasks --> Take Offline
Note: remember to shut down all services that may be using the database first.
Or, alternatively you can change the passwords of the database logins in the TEST database, or remove the LIVE users and create new set of users for the TEST database.
Hope this helps.
Chn0 -
If you want to DISABLE the database to all users then you can make the database offline, else if you want to disable only to few users then goto Database->right click->Properties->Options->Restrict Access and select from the list.Cheers,
Prashanth.0 -
In SSMS under Security=>Logins, you have all the logins of the users that can access SQL Server.
If you open the properties of a login, go to tab "User Mappings". Remove the toggle in column "MAP" of users that may not enter the DB. Of course your users should NOT be system administrators (they should NEVER be!).
Another way is to disallow access through the NAV security tables by removing their account in it (if you are using SQL Server accounts and not Windows accounts, you can put an "Expiration Date" in the past).Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions