We help IT Professionals succeed at work.

Encryption keys in SQL Server dropped unexpectedly

In SQL Server 2008, I created some keys using syntax like this:
CREATE ASYMMETRIC KEY a1
WITH ALGORITHM = RSA_2048
ENCRYPTION BY PASSWORD= N'[password]';

CREATE SYMMETRIC KEY s1
WITH ALGORITHM = AES_256
ENCRYPTION BY ASYMMETRIC KEY a1

Everything was working fine with these keys.  Then I tried to use them a few days later, and they're no longer there.  I was then able to create new keys with the same names.  So obviously, the keys got dropped.  I thought that any key is supposed to be permanent, unless the key name begins with a "#" sign????  I did not issue any "begin transaction" commands either.  Do I need to "commit" in some way so that the key remains past my session?  How do I get the keys to be treated as permanent ones and to persist past the current session?
Comment
Watch Question

Commented:
Nevermind.  The keys "disappeared" because when I booted back up, I was in the Master database.  The application was unable to use the keys for a different reason.  Once I changed back to the correct database, they were there.