mibuso.com

Microsoft Business Solutions online community
It is currently Sat May 18, 2013 8:06 pm

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: How to disable a database in SQL?
PostPosted: Wed Apr 18, 2012 9:14 am 
Offline

Joined: Sat Mar 29, 2008 7:29 am
Posts: 465
Location: chennai
Country: India (in)
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.


Top
 Profile E-mail  
 
 Post subject: Re: How to disable a database in SQL?
PostPosted: Wed Apr 18, 2012 9:19 am 
Offline
MVP Microsoft Dynamics NAV

Joined: Tue Sep 02, 2008 8:37 am
Posts: 4224
Location: New Delhi
Country: India (in)
Did you try by Unchecking the database in User Mapping setup in SQL management studio?

_________________
-Mohana
http://mibuso.com/blogs/mohana
http://mohana-dynamicsnav.blogspot.in/


Top
 Profile  
 
 Post subject: Re: How to disable a database in SQL?
PostPosted: Wed Apr 18, 2012 9:23 am 
Offline

Joined: Sat Mar 29, 2008 7:29 am
Posts: 465
Location: chennai
Country: India (in)
Hi mohana_cse06 ,

I tried it but still I can access the database.

Regards,
chandru.


Top
 Profile E-mail  
 
 Post subject: Re: How to disable a database in SQL?
PostPosted: Wed Apr 18, 2012 9:34 am 
Offline
MVP Microsoft Dynamics NAV

Joined: Tue Sep 02, 2008 8:37 am
Posts: 4224
Location: New Delhi
Country: India (in)
Can you explain me what you did?

_________________
-Mohana
http://mibuso.com/blogs/mohana
http://mohana-dynamicsnav.blogspot.in/


Top
 Profile  
 
 Post subject: Re: How to disable a database in SQL?
PostPosted: Wed Apr 18, 2012 9:35 am 
Offline

Joined: Sat Mar 29, 2008 7:29 am
Posts: 465
Location: chennai
Country: India (in)
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.


Top
 Profile E-mail  
 
 Post subject: Re: How to disable a database in SQL?
PostPosted: Wed Apr 18, 2012 9:41 am 
Offline

Joined: Wed Apr 07, 2004 9:39 am
Posts: 338
Location: Bangalore
Country: India (in)
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.

Chn


Top
 Profile E-mail WWW  
 
 Post subject: Re: How to disable a database in SQL?
PostPosted: Wed Apr 18, 2012 10:06 am 
Offline

Joined: Sat Apr 14, 2012 7:58 am
Posts: 17
Country: India (in)
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.


Top
 Profile E-mail  
 
 Post subject: Re: How to disable a database in SQL?
PostPosted: Wed Apr 18, 2012 2:01 pm 
Offline
Moderator
MVP Microsoft Dynamics NAV
NAV TechDays 2013 attendee

Joined: Wed Jul 02, 2003 10:13 am
Posts: 7493
Location: Milan
Country: Italy (it)
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
Use the SEARCH,Luke! || No PM,please use the forum. || May the <SOLVED>-attribute be in your title! || Read Forum Rules before making a posting


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 10 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum


Search for:
Jump to: