See Microsoft help for details on syntax of the individual stored procedures and valid range of parameters. To do this in t-sql, you can use the following system stored procedures to schedule a daily job. The Script will execute on time which you select on Trigger tab on daily basis the above path may be insted 100 write 90 "C:\Program Files\Microsoft SQL Server\90\Tools\Binn\SQLCMD.EXE" -S ADMIN-PC -i "C:\Users\admin\Desktop\DBScript\DBBackUpSQL.sql" īutton Put "C:\Program Files\Microsoft SQL Server\100\Tools\Binn\SQLCMD.EXE" -S ADMIN-PC -i "C:\Users\admin\Desktop\DBScript\DBBackUpSQL.sql" in the program/script text box(make sure Match your files path and Put the double quoted path in start-> search box and if it find then click it and see the backup is there or not) If You want daily backup // following sql script store in C:\Users\admin\Desktop\DBScript\DBBackUpSQL.sql DECLARE NVARCHAR(512) SET = 'Databasename' SET = 'C:\DBBackup\DBData\DBBackUp' Convert(varchar(8), GETDATE(), 112) '_' Replace((Convert(varchar(8), GETDATE(), 108)),':','-') '.bak' BACKUP DATABASE TO DISK = WITH NOFORMAT,Ĭreate task-> select Triggers tab Select New.
0 Comments
Leave a Reply. |