[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 217
  • 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
Learn to develop an Android App

Want to increase your earning potential in 2018? Pad your resume with app building experience. Learn how with this hands-on course.

 
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

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

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