Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1548
  • Last Modified:

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

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
secarrol
Asked:
secarrol
4 Solutions
 
wolfman007Commented:
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
 
thiyagukCommented:
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
 
St3veMaxCommented:
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
NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

 
Mark WillsTopic AdvisorCommented:
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
 
jmoss111Commented:
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
 
Mark WillsTopic AdvisorCommented:
In fact it was young Jim who put me onto it and have used it since...
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now