Thanks Mike C for this information but still I am not able to retrieve my data. I was able to take the backup of master key and certificate to the database where these were deleted. But when I try to fetch the data this gives me NULL value for encrypted data.
Following script was used to create master key and certificate:
CREATE MASTER KEY
ENCRYPTION BY PASSWORD = 'Cheeku'
CREATE CERTIFICATE TestCertificate
WITH SUBJECT = 'This is a test certificate',
EXPIRY_DATE = '10/31/2009';
Following script was used to take backup of Master Key and Certificate:
-- New DB is created. Followoing command is issued from the new database testcopy.
backup master key to file = 'C:\Documents and Settings\v-ajohri\Database Backup\mk.dat'
encryption by password = 'Cheeku'
backup certificate TestCErtificate to file = 'C:\Documents and Settings\v-ajohri\Database Backup\cert21.dat'
-- Restoring the certificate to the test database.
RESTORE MASTER KEY FROM FILE = 'C:\Documents and Settings\v-ajohri\Database Backup\mk.dat'
DECRYPTION BY PASSWORD = 'Cheeku'
ENCRYPTION BY PASSWORD = 'Cheeku'
CREATE certificate TestCertificate from file = 'C:\Documents and Settings\v-ajohri\Database Backup\cert21.dat'
-LK