azhar_SE_nextbridge
azhar_SE_nextbridge

Reputation: 304

Stored Procedure are not executed due to master key restriction

I have complete backup of a database and restored it on my SQL Server successfully, but a problem shows up when I try to execute a stored procedure in that database.

Error message :

Please create a master key in the database or open the master key in the session before performing this operation.

I searched for this error and find out that I should create master key here on my server with decrypt information but how can I find this decrypt key?

How to solve this issue is the master is only provided by the one who created that once?

Thanks

Upvotes: 0

Views: 2481

Answers (1)

ceth
ceth

Reputation: 45325

If you have a backup of master key, you can restore it.

If you don't have a backup of master key and can not make it, you can try to it with password:

OPEN MASTER KEY DECRYPTION BY PASSWORD = ‘your_password'
ALTER MASTER KEY ADD ENCRYPTION BY SERVICE MASTER KEY

I think it is impossible to get data if you don't have a backup of master have and don't konw the password

Upvotes: 1

Related Questions