4

I have installed a new instance of SQL Server to restore a database I have. I have also set user authorization by creating user login and have set password (SQL Server authentication mode). However at-last after restoring database, there was no security to my database, client browsed the location on database file and was able to view my queries !

enter image description here

Is there any method to stop this access of database ?

Thanks

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Tharif
  • 13,794
  • 9
  • 55
  • 77

1 Answers1

0

It's possible to disable SA account, but I really don't recommend it. SA stands for System Administrator, and every system needs one.
it's good practice to rename it and give it a strong password, and never share it's login details with anyone other your dba.
setup a new sql server account for your client, with as little privileges as possible.

Community
  • 1
  • 1
Zohar Peled
  • 79,642
  • 10
  • 69
  • 121
  • thank you @ZoharPeled but i can view the database in folder know?and does it prevent client from attaching in his system ? – Tharif May 11 '15 at 05:45
  • does your client connect to your server, or does he works on a local (i mean, in his system) file based database? – Zohar Peled May 11 '15 at 05:51
  • actually network with server and multiple clients accessing one main server – Tharif May 11 '15 at 05:53
  • Ok, so your clients can`t see the file system on the server, right? all they have is the connection string. giving them the minimal privileges will solve your problem with them. [read this post](http://stackoverflow.com/questions/5497471/protecting-sql-server-database-file) to see how can you protect the database files. – Zohar Peled May 11 '15 at 05:57
  • thank you for your response but the server system is accessed by one client system which is admin/supervisor – Tharif May 11 '15 at 06:11
  • Well, if you can't trust your admin, who can you trust? someone has to have access to the file system, if it's not you then it should be someone you can trust. – Zohar Peled May 11 '15 at 06:13
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/77481/discussion-between-utility-and-zohar-peled). – Tharif May 11 '15 at 06:13