Search the knowledge base by keyword

Search in knowledge base

ecaldima.com | Support | Contact

TEC-3 – Schedule a backup of the Ecaldima Database

Here

Version(s)

From ECALDIMA 2.0

Description

Schedule a backup of the Ecaldima database using SQL and the Ecaldima Scheduler

Use

SQL Server Express does not have the SQL Server agent to schedule backups. A backup can be scheduled from the query scheduler. In the menu Parameters / Tools / Scheduled queries, create a new query and copy the query:

-- Copy the script under this line
Declare @FileName nvarchar(500)
Declare @Date nvarchar(50)
Declare @TaskName nvarchar(100)
Declare @DatabaseName nvarchar(50)
SELECT @Date = CONVERT(nvarchar(50), getdate(),112)
SELECT @FileName = 'C:\Backup Ecaldima' + @Date + '.bak' 
SELECT @DatabaseName = 'ECALDIMA' 
SELECT @TaskName = @DatabaseName + N'-Full ' + @Date

BACKUP DATABASE @DatabaseName TO DISK = @FileName WITH NOFORMAT, INIT, NAME = @TaskName, SKIP, NOREWIND, NOUNLOAD, STATS = 10

--Copy to this line

Change the FileName and DatabaseName variable to suit your installation

Was this article useful?
1.5 out Of 5 Stars

1 rating

5 Estrellas 0%
4 Estrellas 0%
3 Estrellas 0%
2 Estrellas 0%
1 Estrellas 100%
5
How can we improve this article?
Please submit the reason for your vote so that we can improve the article.
KB Ecaldima