Sql logdan restore işlemi

Sql logdan restore işlemi

Sql logdan restore işlemi
Restore backup with log

Sql logdan restore işlemi
Sql logdan restore işlemi

DECLARE @Path nvarchar(260)
SET @Path = ‘D:/backup/back_data/LOG/TEST’ –Log backupýnýzý buraya yazýn

IF RIGHT(@Path, 1) <> ‘/’
SET @Path = @Path + ‘/’
IF OBJECT_ID(‘tempdb..#’) IS NOT NULL
DROP TABLE #
CREATE TABLE #(
id int IDENTITY,
directory nvarchar(260),
depth int,
IsFile bit)
INSERT # EXEC master.dbo.xp_dirtree
@path = @path,
@depth = 0,
@file = 1

DECLARE @depth int, @depthMax int
UPDATE # SET directory = @Path + directory WHERE depth = 1

DECLARE @RestorePath nvarchar(4000)
DECLARE C CURSOR FOR SELECT directory FROM #
OPEN C
FETCH NEXT FROM C INTO @RestorePath
WHILE @@FETCH_STATUS=0
BEGIN
RESTORE LOG back_data FROM DISK=@RestorePath
WITH NORECOVERY
FETCH NEXT FROM C INTO @RestorePath
END
CLOSE C
DEALLOCATE C

Ayrıca Buna Bakabilirsiniz

SQL Server: Login failed for User ‘NT AUTHORITY\ANONYMOUS LOGON

SQL Server: Login failed for User ‘NT AUTHORITY\ANONYMOUS LOGON’ Merhaba bu hata www.sqlogren.com sitesindeki en …