0

Set pssword for .mdf file in sqlserver.

When you attach a file to someone, I want to ask him the password. In both cases, windows authorization and sqlserver authorization.

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129

1 Answers1

0

You can encrypt a database using tde which will prevent anyone from attaching an mdf file to another instance. It uses certificates and as usual simple talk has a great article as to how to use it and how it works. If someone has the correct certificate they can attach it.

benjamin moskovits
  • 5,261
  • 1
  • 12
  • 22