Microsoft
Software
Hardware
Network
Question : "Transaction Log Backup" - T-SQL commands help needed in SQL Server 2000 / 2005 / 2008 !
Hi,
I have the following table. I want a simple example on "TRANSACTION LOG BACKUP" how it works. Can you please provide me the T-SQL commands needed to achieve this ?
USE Sample
GO
-- Create a table
CREATE TABLE T
(
X int,
Y int
)
GO
-- Insert some data
INSERT INTO T VALUES (1, 20)
GO
INSERT INTO T VALUES (2, 30)
GO
INSERT INTO T VALUES (3, 40)
GO
INSERT INTO T VALUES (4, 50)
GO
INSERT INTO T VALUES (5, 60)
GO
INSERT INTO T VALUES (6, 70)
GO
INSERT INTO T VALUES (7, 80)
GO
I want to take Transaction Log Backup. Please provide me commands. I have the following command. I am not sure whether it is correct or not.
-- Backup transaction log
USE Master
GO
BACKUP LOG Sample TO DISK = 'D:\Sample_tran1.bak' WITH INIT
GO
What does mean by INIT here ? Is it needed ? Also please provide me how to restore the transaction log using T-SQL commands.
INSERT INTO T VALUES (8, 90)
GO
INSERT INTO T VALUES (9, 100)
GO
Now i want to take the "Transaction Log Backup" here.
-- Backup transaction log
USE Master
GO
BACKUP LOG Sample TO DISK = 'D:\Sample_tran2.bak' WITH INIT
GO
Appreciate your time and patience !
Thanks
Answer : "Transaction Log Backup" - T-SQL commands help needed in SQL Server 2000 / 2005 / 2008 !
why do you want to restore the log?
you can't restore a transaction log backup without restoring a full database backup first
Random Solutions
Outlook 2007 Junk Mail Filter Not Working
Vista resumes randomly from Sleep/Hibernate
left outer join not working
image map in html for signature in outlook
Need fix for explorer restarting every 5 seconds
Restore exchange ntbackup to other location ; restore mails
Activesync does not work with ATT 8525
workspace - where do I find it ?
ovraw & ovkey
Environment variables of a process : Linux