Solved

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

Posted on 2009-03-30
7
1,531 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
[Webinar] Disaster Recovery and Cloud Management

Learn from Unigma and CloudBerry industry veterans which providers are best for certain use cases and how to lower cloud costs, how to grow your Managed Services practice in IaaS clouds, and how to utilize public cloud for Disaster Recovery

 
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

Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

Question has a verified solution.

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

Suggested Solutions

INTRODUCTION: While tying your database objects into builds and your enterprise source control system takes a third-party product (like Visual Studio Database Edition or Red-Gate's SQL Source Control), you can achieve some protection using a sing…
In this article I will describe the Detach & Attach method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

895 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

17 Experts available now in Live!

Get 1:1 Help Now