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
Access data type issue
Symantec update of their AV files
Lost msdcs records on DNS server
Network Problems are preventing connection to the Microsoft Exchange Server Computer
Wake computer to run Ghost backups
need ajax/php test script
Cfform validation not working
Exchange email problem
Adobe Photoshop Bridge will not load and error starting the Adobe Updater on program start.
XLP to XLS file conversion