Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
clarkbaker1964
Constraint Violating Yak Guru
428 Posts |
Posted - 2005-07-21 : 19:46:11
|
I would like to store a memory variable that holds an encryption key can these be created and used accross all stored procedures.I was going to store the key in a file on the server but it really only needs to be loaded when the servers services are restarted.suggestions? You can do anything at www.zombo.com |
|
|
Bustaz Kool
Master Smack Fu Yak Hacker
1834 Posts |
Posted - 2005-07-21 : 19:58:34
|
| Why not store it in a table in a known database. I hate to suggest Master or MSDB (and certainly not TempDB) but a database of your creation or even Model could be used.Another approach would be to return the value from a system function or system stored procedure that you create. This could be created on the Master or your own "DBA" database.HTH=================================================================The most tyrannical of governments are those which make crimes of opinions, for everyone has an inalienable right to his thoughts. -Baruch Spinoza, philosopher (1632-1677) |
 |
|
|
clarkbaker1964
Constraint Violating Yak Guru
428 Posts |
Posted - 2005-07-22 : 00:22:08
|
That would be a pretty strait forward approach. But I prefer not to read from the table repetitively to get a known value. I would hard code the password but sql server sp encryption is week!!! and maintenance would be troublesome if the encryption key needed to change.I remember someone had posted an article about creating server variables that could persist and be loaded at startup.Help in this area would be appreciated. You can do anything at www.zombo.com |
 |
|
|
Thrasymachus
Constraint Violating Yak Guru
483 Posts |
Posted - 2005-07-22 : 08:46:49
|
| take a look at this threadhttp://www.sqlteam.com/forums/topic.asp?TOPIC_ID=52599Sean RoussyPlease backup all of your databases including master, msdb and model on a regular basis. I am tired of telling people they are screwed. The job you save may be your own.I am available for consulting work. Just email me through the forum. |
 |
|
|
Bustaz Kool
Master Smack Fu Yak Hacker
1834 Posts |
Posted - 2005-07-22 : 11:04:16
|
| create function dbo.GetKeyreturns binary(16)with encryptionasbeginreturn 0x4d79456e6372797074696f6e4b65793fendNo table access. Encryption on functions is stronger than on sprocs, views and triggers.HTH=================================================================The most tyrannical of governments are those which make crimes of opinions, for everyone has an inalienable right to his thoughts. -Baruch Spinoza, philosopher (1632-1677) |
 |
|
|
|
|
|