Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3783214
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T11:11:34+00:00 2026-05-19T11:11:34+00:00

We get a T-SQL (SQL Server 2008 R2) error on BACKUP CERTIFICATE: ERROR_NUMBER 15151,

  • 0

We get a T-SQL (SQL Server 2008 R2) error on BACKUP CERTIFICATE:
ERROR_NUMBER 15151, SEVERITY 16, STATE 1, PROCEDURE -, LINE 8, MESSAGE: Cannot find the certificate ‘certificate1’, because it does not exist or you do not have permission.

We can see the certificate in master.sys.certificates.

Our pseudo-code:

  • copy an unattached template_db to db1

  • attach db1

  • create certificate1 (in stored procedure in master db)

  • generate @password

  • CREATE DATABASE ENCRYPTION KEY … ENCRYPTION BY SERVER CERTIFICATE ‘+@certificate_name +… (in stored procedure in db1)

  • turn on Transparent Database Encryption for db1 using certificate1.
    (N’ALTER DATABASE ‘+@db_name+N’ SET ENCRYPTION ON’)

  • N’BACKUP CERTIFICATE ‘+@certificate_name+N’
    TO FILE = ”’+@certificate_file_path+N”’
    WITH PRIVATE KEY (
    FILE = ”’+@private_key_file_path+N”’,
    ENCRYPTION BY PASSWORD = ”’+@password+N””

To try to work-around the error, we tested three ways with the BACKUP CERTIFICATE code in a different databases each time, including db1 and master. All get the same error.

Any ideas? Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T11:11:35+00:00Added an answer on May 19, 2026 at 11:11 am

    We tried again, running BACKUP CERTIFICATE in the master DB, and it worked this time.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I get the error message in SQL Server 2008 (when introducing a new FK):
I get the following error message in SQL Server 2005: User '<username>' does not
I get the following error when I execute SP in SQL Server 2008 Management
I'm trying to backup a database in SQL Server 2008 and have the database
When i attempt to deploy a SQL Server Report, i get the following error:
I am trying to get the FullText Search working in SQL Server 2008 R2.
I have been trying for a long time to get SQL Server Express on
Is it possible to get notifications using SQL Server Reporting Services ? Say for
I think I should mention I'm trying to get Entity Framework\SQL server to do
In SQL server you can use the DATENAME function to get the day of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.