Solved

How do I create a .bak file from SQL Server Express 2008?

Posted on 2009-03-30
7
1,529 Views
Last Modified: 2012-05-06
Hi guys,

I have been working on an ASP.NET website for a while and am ready to put it online.  My hosting provider will only let me import a .bak file and SQL Server Express 2008 doesn't seem to support backups.  Is there a work around or an easy way to do it?

Any help would be grealty appreciated!

Sean
0
Comment
Question by:secarrol
7 Comments
 
LVL 14

Accepted Solution

by:
wolfman007 earned 125 total points
ID: 24017285
You can backup your database in two ways:

Use Management Studio Express (available separately or as part of Express advanced from this download page) which has the Backup option on the right click menu for each database under Tasks.

http://www.microsoft.com/downloads/details.aspx?FamilyId=7522A683-4CB2-454E-B908-E805E9BD4E28&displaylang=en

Use T-SQL to manually write your backup script. You can learn about the T-SQL backup command in this BOL topic.

http://msdn.microsoft.com/en-us/library/aa225964(SQL.80).aspx

-- Create a logical backup device for the full MyNwind backup.

USE master

EXEC sp_addumpdevice 'disk', 'MyNwind_1', 'c:\Program Files\Microsoft SQL Server\MSSQL\BACKUP\MyNwind_1.dat'
 

-- Back up the full MyNwind database.

BACKUP DATABASE MyNwind TO MyNwind_1

Open in new window

0
 
LVL 7

Assisted Solution

by:thiyaguk
thiyaguk earned 125 total points
ID: 24017374
You can use either sqlserver management studio or backup statement like this

USE AdventureWorks;
GO
BACKUP DATABASE AdventureWorks
TO DISK = 'Z:\SQLServerBackups\AdventureWorks.Bak'
   WITH FORMAT,
      MEDIANAME = 'Z_SQLServerBackups',
      NAME = 'Full Backup of AdventureWorks';

Refer :
http://msdn.microsoft.com/en-us/library/ms191304.aspx
0
 
LVL 13

Assisted Solution

by:St3veMax
St3veMax earned 125 total points
ID: 24017794
BACKUP DATABASE X TO DISK = 'C:\MyBackup.bak' WITH STATS = 1

The above is as simple as it needs to be for a one-time backup. The WITH STATS bit is a Percentage Complete message.

HTH
0
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
LVL 51

Assisted Solution

by:Mark Wills
Mark Wills earned 125 total points
ID: 24024808
You can use SSMSE to do ad-hoc / manual backups (SQl Server Management Studio), you can also write code. The difficulty is in scheduling it to run every night and managing different versions.

There is a brilliant little utility that can schedule and run backups and keeps control on the number of backups etc... have played with it a bit on 2005, doesnt mention 2008, but cannot see any reason why it wouldn't work.

Check out : http://www.lazycoding.com/products.aspx

Failing that, there is a complete example using code and batch routines at codeplex : http://www.codeplex.com/ExpressMaint

And another example with scheduling : http://www.mssqltips.com/tip.asp?tip=1486


0
 
LVL 18

Expert Comment

by:jmoss111
ID: 24032677
I've been using SQL Scheduler from lazycoding.com for quite awhile and it's great for backups as well as scheduling jobs; I highly recommend and you can't beat  the price which is free.

I'm not looking for points, just making a statement.

Regards,

Jim
0
 
LVL 51

Expert Comment

by:Mark Wills
ID: 24032875
In fact it was young Jim who put me onto it and have used it since...
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

In SQL Server, when rows are selected from a table, does it retrieve data in the order in which it is inserted?  Many believe this is the case. Let us try to examine for ourselves with an example. To get started, use the following script, wh…
Naughty Me. While I was changing the database name from DB1 to DB_PROD1 (yep it's not real database name ^v^), I changed the database name and notified my application fellows that I did it. They turn on the application, and everything is working. A …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now