Showing posts with label base. Show all posts
Showing posts with label base. Show all posts

Tuesday, March 27, 2012

Creation of credentials and certificates to protect a DB

Hi, i want to know if its posible to create credentials or certificates in order to protect a SQL 2005 data base.

Because if someone Buckups one of my DBs from my server, and try to restore it in orther server i dont want they to see my DB information because he dont have the correct credentials or certificates for it.

This is posible?. if is, How i do it ?

Best Regards.

You can use encryption, so that if a database is stolen, the thief cannot retrieve the original data. For more information, please consult the resources mentioned in the second post of the following thread: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=286374&SiteID=1.

Also, note that if you are trying to protect against a machine administrator or a sysadmin, then encryption may not be sufficient. You can check the following thread for this aspect: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=371562&SiteID=1.

Thanks
Laurentiu

|||

I dont know if i can encrypt al the DB, because the information would not be retrived correct to the front end, and Encrypting/decrypting all the time the DB would take lots of time.

Regards.

|||

You don't need to encrypt the entire database, you just need to encrypt the information in it that you are trying to protect.

If you don't want to rely on encryption, then the only secure solution is to control access to the database files by limiting access to them and by controlling the access that you grant in SQL Server.

Thanks
Laurentiu

|||Unfortunately, that particular feature doesn't currently exist. You still need to apply physical security to your backups. It's a feature that I'd like to see in the next version of SQL Server though. Right now, the best that you can do is to encrypt data which can not be decrypted, even after restoring on another instance of SQL Server unless they have the correct database key loaded and then the correct certificate (if you're using certificate based encryption).

Creation of credentials and certificates to protect a DB

Hi, i want to know if its posible to create credentials or certificates in order to protect a SQL 2005 data base.

Because if someone Buckups one of my DBs from my server, and try to restore it in orther server i dont want they to see my DB information because he dont have the correct credentials or certificates for it.

This is posible?. if is, How i do it ?

Best Regards.

You can use encryption, so that if a database is stolen, the thief cannot retrieve the original data. For more information, please consult the resources mentioned in the second post of the following thread: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=286374&SiteID=1.

Also, note that if you are trying to protect against a machine administrator or a sysadmin, then encryption may not be sufficient. You can check the following thread for this aspect: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=371562&SiteID=1.

Thanks
Laurentiu

|||

I dont know if i can encrypt al the DB, because the information would not be retrived correct to the front end, and Encrypting/decrypting all the time the DB would take lots of time.

Regards.

|||

You don't need to encrypt the entire database, you just need to encrypt the information in it that you are trying to protect.

If you don't want to rely on encryption, then the only secure solution is to control access to the database files by limiting access to them and by controlling the access that you grant in SQL Server.

Thanks
Laurentiu

|||Unfortunately, that particular feature doesn't currently exist. You still need to apply physical security to your backups. It's a feature that I'd like to see in the next version of SQL Server though. Right now, the best that you can do is to encrypt data which can not be decrypted, even after restoring on another instance of SQL Server unless they have the correct database key loaded and then the correct certificate (if you're using certificate based encryption).

Monday, March 19, 2012

Creating SQL Data base

Hi,
I want to create SQL Data and default user base using Visual Basic. any body help me to create it
thanks for your advise
byeif you have a script file
you can use shell command or winexec api, e.g.

winexec("osql.exe -S -usa -p -iscriptfile", SW_HIDE)

about osql' parameters, to see sql server online help|||You can execute script string in ADODB.Command object.|||The simplest way is:

Dim cn As ADODB.Connection

Set cn = New ADODB.Connection
cn.Open "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=master;Data Source=myserver"
cn.Execute "create database test"
cn.Close
Set cn = Nothing

You can get more fancy with this. If you will use this more than once I would recommend creating a stored procedure that you would execute. This can also be used if you need to pass parameters like database name, location, size ...

If you are using vb.net take a look at the following ms article:

article (http://support.microsoft.com/default.aspx?scid=kb;en-us;Q305079&ID=kb;en-us;Q305079&SD=MSDN)