Improve company productivity with a Business Account.Sign Up

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

Automatic backup in SQL Server Express

How can do the Automatic backup in SQL Server Express ?
0
egovernment
Asked:
egovernment
1 Solution
 
venk_rCommented:
Use the below script

DECLARE @Path NVARCHAR(1000), @FileName NVARCHAR(255), @FullPath NVARCHAR(1255)
SET @Path = '\\db1\E$\SQLServer\2008\Backups\'
SET @FileName = 'Express_' + REPLACE(CONVERT(VARCHAR(10), GETDATE(), 101), '/', '') + '.bak'
SET @FullPath = @Path + @FileName

BACKUP DATABASE Express
TO DISK = @FullPath
WITH INIT

And scehedule them using SQL JOBS

0
 
Kevin CrossChief Technology OfficerCommented:
SQL EXPRESS edition does not have SQL Agent; therefore, you cannot schedule it that way. Now you, could create a .SQL file containing the code above that you run through SQLCMD.exe. You can try to schedule that using Windows Scheduled Tasks.
0
 
Kevin CrossChief Technology OfficerCommented:
0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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.

 
venk_rCommented:
I agree.
0
 
Éric MoreauSenior .Net ConsultantCommented:
0
 
Field Marshall BobCommented:
I have multiple small DB's I backup with the method mwvisa1 suggested.
0
 
egovernmentAuthor Commented:
I will review the all answers
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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