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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T14:18:24+00:00 2026-06-02T14:18:24+00:00

I try to convert a .mdf file to a .bak file, I have been

  • 0

I try to convert a .mdf file to a .bak file, I have been reading this guide: http://forums.asp.net/p/1448416/3870094.aspx

BACKUP DATABASE [NameOfDatabase] TO DISK = N'D:\path\filename.bak' WITH NOFORMAT, NOINIT, NAME = N'NameOfDatabase-Full Database Backup', SKIP, NOREWIND, NOUNLOAD, STATS = 10

Replace NameOfDatabase with…. name of your database.

Replace D:\path\filename.bak with place you want to backup with

Replace Name = N database name for cosmetic indexing reasons…

But I get an error message when I run it.

In Visual Studio 2010 in Server Explorer I select Data Connection/myDatabase.mdf and rightclick Stored Procedure and choose “add new stored Procedure”. There I write:

BACKUP DATABASE [myDatabase] TO DISK = N'C:\db\dbCopy.bak' WITH NOFORMAT, NOINIT, NAME = N'dbCopy-Full Database Backup', SKIP, NOREWIND, NOUNLOAD, STATS = 10

When I select the text and run selection I get this error message:

Executing selected script from mssql:://Home\e1d5110c-dd6f-4d/C:\USERS\myHome\DESKTOP\myPage\APP_DATA\MYDATABASE.MDF/dbo/Stored Procedure/dbo/StoredProcedure1

Database 'myDatabase' does not exist. Make sure that the name is entered correctly.
BACKUP DATABASE is terminating abnormally.
No rows affected.
(0 row(s) returned)

What am I doing wrong? If I change ‘myDatabase’ to ‘C:\USERS\myHome\DESKTOP\myPage\APP_DATA\MYDATABASE.MDF’ I get this message:

Database 'C:\USERS\myHome\DESKTOP\myPage\APP_DATA\MYDATABASE.MDF' does not exist. Make sure that the name is entered correctly.
BACKUP DATABASE is terminating abnormally.
No rows affected.
(0 row(s) returned)
  • 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-02T14:18:27+00:00Added an answer on June 2, 2026 at 2:18 pm

    You need to attach the database first before you can back it up. Do you have an LDF file as well? You might need one, or it might be happy to build its own afresh – I’m not sure.

    The simplest way to do this all is through SQL Server Management Studio. If you don’t have it (e.g. you’re using SQL Server Express) then you should definitely download it and install it. Log in to your SQL Server instance in Management Studio then

    • right-click on ‘user databases’, ‘attach’ then select your MDF file
    • right-click on the attached database and ‘tasks’, ‘back up’; use ‘remove’ and ‘add’ in the destination box if you want to change the filename.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have to do this task in SSIS, I will try to convert the
When I try to convert an HTTP POST response to JSONArray I get the
I have XML-file with settings like this <?xml version=1.0 encoding=utf-8 ?> <configuration> <configSections> <sectionGroup
I try to convert cs file to DLL file .. when I am using
I try to convert a string : 3033547640189791162 with this method : NSNumber *
Here is my target format: 19 AUG 2011 And I try to convert this
I have a string with value 20.616378139 and when i try to convert using
I have a list with 7,200,000 elements in it. When I try to convert
I am using this adobe example under reading and writing objects to try and
dr[po_amt].ToString() = 1,936.10; when i try to convert this to int32 using the below

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.