سلام دوستان
من با دستور بکاپ از دیتابیسم بکاپ میگیرم
مشکلم اینه که هر بار روی همون فایل ذخیره میشه
ولی من میخوام هر دفعه یه فایل جدید بسازه
به نظرتون چیکار باید بکنم؟
ممنون
Printable View
سلام دوستان
من با دستور بکاپ از دیتابیسم بکاپ میگیرم
مشکلم اینه که هر بار روی همون فایل ذخیره میشه
ولی من میخوام هر دفعه یه فایل جدید بسازه
به نظرتون چیکار باید بکنم؟
ممنون
با سلام
شما می توانید هر بار یک نام جدید ساخته و backup تون رو با اون نام ذخیره کنید.
یک مثال :
استفاده از تاریخ برای نام backup.
declare @cd varchar(150) = concat('C:\tmp\jobtest\' , CURRENT_TIMESTAMP , '.bak')
backup database testDB
to disk=@cd;
go
موفق باشید.