Friday, March 23, 2012

How to make a db readonly to accept tran logs?

Hi experts,
Pls let me know , how to make normal db to readonly + accept tran logs
Rgds
Srinivas Varanasi.1) Backup the database
2) Restore the backup with the appropriate options.

Note that while this does exactly what you asked for, but it makes absolutely no sense. Can you describe what you want in a bit more detail, so that someone can give you a more usable answer?

-PatP|||Srini, you need to do this on the full restore:

RESTORE database_name
FROM DISK = 'blah.bak'
WITH
MOVE 'logical data file' TO 'c:\mssql\data\blah.mdf',
MOVE 'logical log file' TO 'c:\mssql\log\blah.ldf',
STANDBY = 'c:\mssql\standby\blah.ldf'

The standby creates a standby file and makes the database read-only. You can then restore your tlog backups.

No comments:

Post a Comment