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

  • SEARCH
  • Home
  • 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 7418045
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T07:48:43+00:00 2026-05-29T07:48:43+00:00

I am using C# and SMO to successfully detach and attach an SQL server

  • 0

I am using C# and SMO to successfully detach and attach an SQL server database.

I was wondering if it is possible to password protect the detached database? Preferably via C# other suggestions also welcome. I am not too familiar with SQL Users and permissions.

(Background: We use a transfer database to transfer information to offsite units without internet connections via contractors. These databases have sensitive information. We would like that the information not be accessed by a savvy contractor)

  • 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-29T07:48:43+00:00Added an answer on May 29, 2026 at 7:48 am

    What you describe does not have anything to do with SQL Server / SMO or whatever – just encrypt the files you want to transfer with some password and a good algorithm (like AES256) and keep the password secret between you and the offsite unit. Use a new cryptographically strong password for every transfer (never use a password twice!).

    IF you want to verify that the file has not been tampered with create a digital signature for every encrypted file you transfer (use an asymmetric algorithm for that like RSA). you keep the private key a secret from everyone… for verification of the signature(s) the public key is sufficient – the public key can be known to the whole world without compromising your security.

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

Sidebar

Related Questions

I have a function to restore sql server database using Microsoft.SqlServer.Management.Smo.Restore. There is an
I am automating login creations on a SQL Server 2008 database using SMO in
I'm enumerating all databases of an SQL Server 2005 instance using SMO like as
I am using SMO to create databases and tables on a SQL Server. I
I am trying to create a empty database in SQL server using powershell and
I am using help of SqlServer.Management.Smo to rename an attached MS-SQL database. Dim db
My application connects to several SQL Server instances (Using SMO and ADO.net), these connections
I need to create a new login in SQL Server 2005 using SMO. I
I'm attempting to use the SQL Server SMO library from Python 2.7 using pyWin32.
I need to backup database (using SQL Server 2008 R2). Size of db is

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.