Click here to Skip to main content
15,886,851 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
how i can protect my database who, they can't attach it
Posted

 
Share this answer
 
Comments
faezun 10-Dec-11 8:26am    
Tank You very mach amir jan
رو لینکهایی که گذاشتی بیشتر کار می کنم ببینم چی می شه
Amir Mahfoozi 10-Dec-11 8:35am    
You're welcome ;)
You didn't mention your SQLServer Version.

Use the following steps:
1) Open your SqlServer Management Studio > [YOUR DATABASE]> Security >Roles
2) Right click over "Database Roles", select "New Database Role".
3)Click on "Securables" and select other database roles, objects, etc to be assigned to that role. After that click "OK." The database role should now appear in the "Database Roles" listing under your database/security/roles.
4)Assign permissions to your database role. Only assign permissions to the database role that are absolutely necessary.

For further information please visit here
[UPDATED]
To Learn more about database role please visit the following links:

Database-Level Roles
Understanding SQL Server Roles
Creating User-Defined SQL Server Database Roles
 
Share this answer
 
v2
Comments
Uday P.Singh 10-Dec-11 15:06pm    
5ed :)
Monjurul Habib 10-Dec-11 15:23pm    
thank you
faezun 10-Dec-11 15:49pm    
Thank you dear
I will try this
Monjurul Habib 10-Dec-11 15:55pm    
my pleasure, let me know your result. If my it helps don't forget to vote and mark as answer.
faezun 10-Dec-11 16:17pm    
hello , my sql is 2008

3)Click on "Securables" and select other database roles, objects, etc to be
assigned to that role


"Securables" table is empty!
"Permissions" table is empty!

What are doing this steps?
what is result?
Who are they?

You protect your database by using SQL Logins and roles and not publishing the password to those who don't need it. And don't ever use the SA account for access.
 
Share this answer
 
Comments
Orcun Iyigun 9-Dec-11 11:52am    
faezun's comment: hello Thank you for answering my question. excuse me i can't speak english properly.

i want to protect my database ,so No one can't attach it. What should I do?!

- I have tried my best to update his comment into a meaningful one :)
 
Share this answer
 
Comments
faezun 10-Dec-11 15:30pm    
security is a Complex issue
Thank you to help me

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900