Solved

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

Posted on 2009-03-30
7
1,535 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
Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

 
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

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

820 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