YZlat
asked on
Database backup using stored proc
I want to create a stored procedure that will perform full backup of my database. I am getting the following error
Error 170: Line 4: Incorrect syntax near 'E:\Backups\mydb.bak'
Can anyone help?
Error 170: Line 4: Incorrect syntax near 'E:\Backups\mydb.bak'
Can anyone help?
CREATE PROCEDURE dbo.spBackupMyDB
AS
BACKUP DATABASE mydb
TO DISK 'E:\Backups\mydb.bak'
GO
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER