SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


SQL 2000 DBA Toolkit Part 1


SQL 2000 DBA Toolkit Part 1

Author
Message
ricva
ricva
SSC-Enthusiastic
SSC-Enthusiastic (166 reputation)SSC-Enthusiastic (166 reputation)SSC-Enthusiastic (166 reputation)SSC-Enthusiastic (166 reputation)SSC-Enthusiastic (166 reputation)SSC-Enthusiastic (166 reputation)SSC-Enthusiastic (166 reputation)SSC-Enthusiastic (166 reputation)

Group: General Forum Members
Points: 166 Visits: 228
The link to the code does not work. I am hoping to source code in order to see if I can get around the export/import issue I am having.

Thanks



ricva
ricva
SSC-Enthusiastic
SSC-Enthusiastic (166 reputation)SSC-Enthusiastic (166 reputation)SSC-Enthusiastic (166 reputation)SSC-Enthusiastic (166 reputation)SSC-Enthusiastic (166 reputation)SSC-Enthusiastic (166 reputation)SSC-Enthusiastic (166 reputation)SSC-Enthusiastic (166 reputation)

Group: General Forum Members
Points: 166 Visits: 228
Michael,

I appreciate the DBA Toolkit, and it has been very helpful. I continue to have trouble with the encryption and desperately need help.

I need to be able to to set up another server for failover. I have compiled the code for CertMgr (posted earlier) (that uses the machine key). I used this to Export the scrypto params. Then on the failover server I do an import of the same scrypto.params file. I also have a SQL script with the data from the Local_key and Master_Key tables. so the data in these tables on both servers are the same.

My test is to use the decrypt_AES function to see the value in the encrypted column. On the failover server I am getting NULL back.

I also have problems getting data back from ASP.NET using a ADO.NET SQLClient call to a stored procedure. The values in the column is null. Calling the same stored procedure through ASP - ODBC works.

Is the source code for the sprocs available?

Thank-you



alejandrapclopez
alejandrapclopez
Forum Newbie
Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)

Group: General Forum Members
Points: 1 Visits: 12
Hi all,

I have a problem, I encrypted data using AES encryption algorithm with function fn_encrypt_aes, but the results were diferents in differents servers.

how could be the results to be the same in both servers?

Thanks for your help.

Alejandra
boyette
boyette
Forum Newbie
Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)

Group: General Forum Members
Points: 3 Visits: 79
I'm upgrading to SQL 2008 and I want to use something similar to this toolkit on the new SQL 2008 server. Is there something compatible?

Jason



ricva
ricva
SSC-Enthusiastic
SSC-Enthusiastic (166 reputation)SSC-Enthusiastic (166 reputation)SSC-Enthusiastic (166 reputation)SSC-Enthusiastic (166 reputation)SSC-Enthusiastic (166 reputation)SSC-Enthusiastic (166 reputation)SSC-Enthusiastic (166 reputation)SSC-Enthusiastic (166 reputation)

Group: General Forum Members
Points: 166 Visits: 228
Check out transparent data encryption now available in 2008. If this does not meet your needs please read Micheal's article and all the threads. One issue with the toolkit is with replication, or restoring to another server.



garyyeung
garyyeung
Forum Newbie
Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)

Group: General Forum Members
Points: 2 Visits: 17
Hi Mike,

It's a cool Tool kit and I'm now studying the kit and going to propose it to be used in a project enhancement.
To propose, I need to have a prove of licensing and prove of safe of the dlls. I found that there is a statement of licensing posted by you. So, if I modified the install.sql, uninstall.sql and do not include every functions (dlls) to the kit, will the terms break? and is there any offical terms of usage so that I can show to my boss?
For safety, how can I prove to my boss on the safety of dlls?

Million thanks,
Gary.
garyyeung
garyyeung
Forum Newbie
Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)

Group: General Forum Members
Points: 2 Visits: 17
Hi Mike,

I'm studying the tool kit and got a question of using password for the key. I have used different password for creating master and local keys but I found that whenever the password used for encrypt the data and decrypt the data is the same, the password for keys are meaningless. Like the example below, all the key materials and passwords are different for the master key and local key. But still, I can get the right encryption and decryption by that key as below.
exec create_master_key 'PWMaster', 'pw1', 'pw2'
exec create_local_key 'PWMaster', 'PWLocal', 'pw3'

DECLARE @encry AS VARBINARY(128)
DECLARE @decry AS VARCHAR(128)
select @encry = dbo.fn_encrypt_aes(CAST('Data to be encrypt' AS VARBINARY), 'PWLocal', 'pw4', 128)
select @decry = dbo.fn_decrypt_aes(@encry, 'PWLocal', 'pw4', 128)
Print @encry
Print @decry

Have I made any stupid mess up of the concept? Can you please remind me? Thanks so much.

Gary.
Mark Salvador
Mark Salvador
Forum Newbie
Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)

Group: General Forum Members
Points: 7 Visits: 260
I am also having the same problem. I used the web site to encrypt/decryt credit card details but when i checked it with other machine, for example in Query Analyzer, it shows NULL result.

Is it possible to remove this "per local machine" and to make it accessible to everyone?

Can I also request for the source code for AES algorithm? Desperately need solution on this.

Thanks,

Mark
homebrew01
homebrew01
SSCarpal Tunnel
SSCarpal Tunnel (4.9K reputation)SSCarpal Tunnel (4.9K reputation)SSCarpal Tunnel (4.9K reputation)SSCarpal Tunnel (4.9K reputation)SSCarpal Tunnel (4.9K reputation)SSCarpal Tunnel (4.9K reputation)SSCarpal Tunnel (4.9K reputation)SSCarpal Tunnel (4.9K reputation)

Group: General Forum Members
Points: 4895 Visits: 9108
Will BlowFish or TwoFish work with image data ?? I downloaded the latest SQL toolkit and Tried running TwoFish after modifying it to handle image data converted to varbinary(max). The data came back as NULL, instead of encrypted. Either I did something wrong (very likely), or there's some limitation in the DLL for length, or there's some other problem I don't understand.

--modified fn_encrypt_twofish in the hopes it will work with bigger data
CREATE FUNCTION [dbo].[fn_encrypt_twofish_max] (@plaintext VARBINARY(max),
@localkeyname VARCHAR(128),
@password VARCHAR(128),
@keybits INT)
RETURNS VARBINARY(max)
AS
BEGIN
DECLARE @masterkey VARBINARY(64)
DECLARE @localkey VARBINARY(80)
SELECT @masterkey = m.[Key], @localkey = l.[Key]
FROM dbo.Local_Key_Vault l, dbo.Master_Key_Vault m
WHERE l.[name] = @localkeyname
AND l.[master_key_name] = m.[name]
DECLARE @enctext VARBINARY(max)
EXEC dbo.xp_encrypt_twofish @plaintext, @enctext OUTPUT, @password, @masterkey, @localkey, @keybits
RETURN @enctext
END


and then ran
-- Encrypt data
UPDATE MyTable
SET VoiceData = cast(master.dbo.fn_encrypt_twofish_max(VoiceData ,
'Local Key 1', NULL, 32) AS VARBINARY(max))



Thoughts ?

TIA



Mike C
Mike C
SSCrazy
SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)

Group: General Forum Members
Points: 2667 Visits: 1168
Mark Salvador (2/3/2010)
I am also having the same problem. I used the web site to encrypt/decryt credit card details but when i checked it with other machine, for example in Query Analyzer, it shows NULL result.

Is it possible to remove this "per local machine" and to make it accessible to everyone?

Can I also request for the source code for AES algorithm? Desperately need solution on this.

Thanks,

Mark


Hi Mark,

The code uses the local machine encryption key to protect your data encryption keys. You can conceivably remove this limitation, but you'd have to modify the code yourself to do this. The source code (including the source for all algorithms used) is posted here: http://www.sqlservercentral.com/Forums/Topic199534-236-14.aspx

Thanks
Mike C
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search