How to Secure the MDF and LDF File with Password

  • hi,

    I've been working on sql server.

    I want to protect the mdf file with password.

    I develop a windows application with sql server back end, i install into a client system, someone stop the sqlserver service and copy the mdf,ldf and store at diff sql server to know the structure of tables, queries and SPs.

    I need a solution to protect the mdf file with password.

  • You need encryption: http://technet.microsoft.com/en-us/library/bb510663.aspx

    ---

    Note to developers:
    CAST(SUBSTRING(CAST(FLOOR(NULLIF(ISNULL(COALESCE(1,NULL),NULL),NULL)) AS CHAR(1)),1,1) AS INT) == 1
    So why complicate your code AND MAKE MY JOB HARDER??!:crazy:

    Want to get the best help? Click here https://www.sqlservercentral.com/articles/forum-etiquette-how-to-post-datacode-on-a-forum-to-get-the-best-help (Jeff Moden)
    My blog: http://uksqldba.blogspot.com
    Visit http://www.DerekColley.co.uk to find out more about me.

  • If you are looking at TDE, you will need the Enterprise Edition of SQL Server.

  • tamil.selvanmca (9/5/2012)


    hi,

    I've been working on sql server.

    I want to protect the mdf file with password.

    I develop a windows application with sql server back end, i install into a client system, someone stop the sqlserver service and copy the mdf,ldf and store at diff sql server to know the structure of tables, queries and SPs.

    I need a solution to protect the mdf file with password.

    TDE will handle the specific question you posted but probably not the underlying intent. There really is no comprehensive way to protect your Intellectual Property (IP) if you're deploying the database to the client site. Anyone who is a local admin on the machine where SQL Server is being hosted can enter the database as a sysadmin if they know to start SQL Server in single-user mode. Encrypting the database with TDE will protect the data at rest, i.e. if someone takes the mdf or a backup of the database to another server they will not be able to access to it without knowledge of the key infrastructure. If you want to protect your IP you'll need to host the database for the solution yourself or move to a hosted solution like SQL Azure.

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • If you don't want to upgrade to Enterprise to get TDE then take a look at NetLib. They have an encryption tool that will encrypt your SQL database. http://www.netlib.com/sql-server-encryption.asp

  • If you do not have enterprise edition, to enable TDE then Secure the folder on the local drive with password.

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply