question

Arul avatar image
Arul asked

please tell me that how can we set the password on sql server 2000 database so other person can not open the my database

please tell me that how can we set the password on sql server 2000 database so other person can not open the my database

Thanks in advance.

sql-server-2000security
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

TG avatar image
TG answered

Unless they are guessing the password (hacking in) then it has nothing to do with a password. If they are guessing/hacking it then you obviously need a more complex password.

Any one who has admin privs on the server can do anything they want so start by making sure that "other person" is not in the admin group of the box (or any other group which will have complete access.

In sql server object explorer look at Security | logins for the "other person". Make sure they are not in the any fixed server roles that will give them access (like sysAdmin). Look at their User Mapping to see what databases they have access to and what db roles they have their. Take the appropriate actions to prohibit access.

EDIT: Look at the subtopics under this (Books Online: sql server 2000 Managing Security): http://technet.microsoft.com/en-us/library/aa905156%28SQL.80%29.aspx

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Benjamin avatar image
Benjamin answered

I infer from your question that you think there is some Global database password you can enter on the database. There are only 2 basic ways for someone to have direct access to your database (not through an application but through Enterprise Manager or Management Studio, for example).

  1. SQL Authentication - someone has a known username and a known, guessed or blank password
  2. Windows Authentication - some logs into a machine attached to a domain with their network password, the domain controller verifies their identity and passes that to the SQL instance

In Case 1 (SQL Authentication), you can simply change the password on the user account.

EXEC master.dbo.sp_password @new=N'NewPassword', @loginame=[MyLogin]            

Please replace 'NewPassword' with your own stronger password. I use a random password generator that I have built with T-SQL code which I'd be happy to post if it is helpful.

In case 2 (Windows Authentication), you should verify your Active Directory Group (BEST) or domain ID (network login) has administrative access to the database. Then you'll want to remove the BUILTIN\Adminstrators group which allows anyone who is an admin to the server to automatically have sysadmin access to the SQL Server.
NOTE: be sure your SQL Services are mapped with sysadmin privileges before removing the BUILTIN\Administrators group otherwise the services may lose their access.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.