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 7908367
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T11:54:12+00:00 2026-06-03T11:54:12+00:00

I have created a database emailDatabase , its stored in C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA

  • 0

I have created a database emailDatabase, its stored in

C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA

In Visual Studio, I use the Server Explorer, click the add new connection button.

The add connection dialog box appears.

Under server name I use the dropdown box and select DEV-5\SQLEXPRESS. I use Windows authentication.

In the Connect to section at the bottom, the dropdown displays: Master, Model, msdb and tempdb and does not display my emailDatabase.

So I select Attach Database File and click browse and follow

local C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA

and select my email database.

The following error occurs :

emailDatabase
You don not have permission to open this file.
Contact file owner or an administrator to obtain permission.

I think my problem is i saved my database wrong, I need to make a back up or something like that. if that’s the case please tel me how to make a backup and so on. I really need to move forward from this problem.

When I created my database I right-clicked on databases in SQL Server Management Studio and said new database, then I added columns with a query. then file save all.

How can I get a copy of my database file with all the permissions I need to use it in visual Studio??

  • 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-06-03T11:54:16+00:00Added an answer on June 3, 2026 at 11:54 am

    When you create a database on the server (using SQL Server Management Studio), you don’t have to (and should not!) fiddle around with the database file(s) anymore – let the server handle that for you.

    Instead: do a Add Connection in Visual Studio and then specify the server instance (DEV-5\SQLEXPRESS) and the database name (emailDatabase) in your connection dialog.

    With this, you’re connecting and using a SQL Server database the way it’s intended to be used – on the SQL Server instance itself. This is much easier, and much less hassle, than having to struggle with “free-floating” .mdf files and attaching them to your solutions and stuff like that….

    enter image description here

    So here – fill in DEV-5\SQLEXPRESS into your “Server name” dropdown, and then use the “Select or enter database name” option and enter your database name (or pick it from the dropdown) – it should be there!

    DO NOT use the “Attach a database file” option – this is the free-floating .mdf “feature” which is rather clumsy and hard to use and error-prone – again: I recommend not using that…

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

Sidebar

Related Questions

I have created database in microsoft sql server 2005 can i use that particular
I have a database that I have created using SQL Server Developer 2008. I
I have created one user named tuser with create database rights in SQL server
I have created a database with 8 tables in SQL Server Management Studio on
i have created a database in sql server. Now i want to create a
I have created a database diagram in sql server which is consist of number
I have created a database in SQL server Compact Edition. I tried to attach
I have created a database program where I am able to add the data
I have created a database with SQL Server Management Studio, I would like to
I have created a database that stores data from the internet.When there is internet

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.