Monday, March 26, 2012
ponit in time restore
24/05/2004 and we have the following backups:
FULL 14:00Hi,
POINT_IN_TIME restore will work only if your Recovery mode is FULL for that
database.
If it is FULL then:-
1. Take a backup transaction log in current database
2. Create a new database
3. Restore with full backup file with NORECOVERY (Use below command)
RESTORE database new_dbname from disk='file' with NORECOVERY, MOve
'logical_mdf' to 'physical_mdf',
move 'logical_ldf' to 'physical_ldf'
4. Restore the transaction log backup taken in step-1 with RECOVERY and
STOPAT option
RESTORE log new_dbname from disk='tran_backup_file' with RECOVERY, STOPAT
= ''May 24, 2004 03:44 AM'
Thanks
Hari
MCDBA
"John" <anonymous@.discussions.microsoft.com> wrote in message
news:1222f01c44265$de1f7470$a101280a@.phx.gbl...
> We need to do a point in time restore to 03:44 on
> 24/05/2004 and we have the following backups:
> FULL 14:00
Friday, March 23, 2012
Point-in-time recovery using Log file backups newer than full back
about to give may not be practical, but the answer should help me understand
db and log backups a little better.
Scenario:
Full db backup performed 3 times in a day - morning, afternoon, and evening
(T1, T2, T3 respectively)
Log backup performed in morning (T1) and evening (T3) immediately after the
morning full db backups (no afternoon (T2) log backup)
Then server db drive fails after the evening db and log backups
The evening full backup is unrestorable (bad tape)
The evening log backup is good (stored on another device).
Could I restore the db to the point of failure using the afternoon full db
backup (T2) and the evening log backup (T3)?
db: T1--T2--T3
log: T1--T3
In other words, when restoring the evening log backup, against the afternoon
full db backup, would the restore process read through the evening log backup
to find the transactions begining at T2, or does the log being restored need
to be from a backup that occurs after the full backup was created?
My "guess" is that the restore would read through the T3 log and apply the
transactions that began after the T2 full db backup.If you ask whether you can "skip" a db backup, then the answer it yes. You cannot "skip" a log
backup, though. Perhaps easier with an examples. Say the time goes from top to bottom:
A Db
B Log
C Log
D Db
E Log
F Log
G Db
H Log
I Log
Here are a couple of examples of what you *can* do:
a, b, c, d, e, h, i
d, e, f, h, i
g, h, i
Here's a couple of examples of what you *cannot* do:
a, c, e, f, h, i
a, e, f, h, i
Short answer is that you need an unbroken chain of log backup. Db backups in between do not matter.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"GRakaska" <GRakaska@.discussions.microsoft.com> wrote in message
news:E20FF009-56C4-4B91-A31A-9720FB1404CD@.microsoft.com...
> Hopefully I can ask this question w/o too much confusion. The example I am
> about to give may not be practical, but the answer should help me understand
> db and log backups a little better.
> Scenario:
> Full db backup performed 3 times in a day - morning, afternoon, and evening
> (T1, T2, T3 respectively)
> Log backup performed in morning (T1) and evening (T3) immediately after the
> morning full db backups (no afternoon (T2) log backup)
> Then server db drive fails after the evening db and log backups
> The evening full backup is unrestorable (bad tape)
> The evening log backup is good (stored on another device).
> Could I restore the db to the point of failure using the afternoon full db
> backup (T2) and the evening log backup (T3)?
> db: T1--T2--T3
> log: T1--T3
> In other words, when restoring the evening log backup, against the afternoon
> full db backup, would the restore process read through the evening log backup
> to find the transactions begining at T2, or does the log being restored need
> to be from a backup that occurs after the full backup was created?
> My "guess" is that the restore would read through the T3 log and apply the
> transactions that began after the T2 full db backup.
>|||> A Db
> B Log
> C Log
> D Db
> E Log
> F Log
> G Db
> H Log
> I Log
> Here are a couple of examples of what you *can* do:
> a, b, c, d, e, h, i
> d, e, f, h, i
> g, h, i
I think an error has found it's way in the first row. You can't skip the F,
since that will break the log chain - and you also say that the chain can
not be broken :)
/Sjang|||> I think an error has found it's way in the first row.
Yes, thanks for catching that. It should have been:
a, b, c, e, f, h, i
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Henrik Davidsen" <none@.none.dk> wrote in message news:lBBDj.7440$9m.7234@.fe25.usenetserver.com...
>> A Db
>> B Log
>> C Log
>> D Db
>> E Log
>> F Log
>> G Db
>> H Log
>> I Log
>> Here are a couple of examples of what you *can* do:
>> a, b, c, d, e, h, i
>> d, e, f, h, i
>> g, h, i
>
> I think an error has found it's way in the first row. You can't skip the F,
> since that will break the log chain - and you also say that the chain can
> not be broken :)
> /Sjang
>
>
Point in time restore
I have no Backups at all.
And I dropped a important table completely.
Is there anyway to roll back this command.
I am guessing that the transaction log keeps this inforation and its still there. I think with other 3rd party tools you can recover to a point in time without backups so there must be a way we can do it without 3rd party tools , cant it?
Your 'best' option at this point is to immediately download an eval copy of one of the Third party log tools. Many are fully functioning for 14-30 days.
But since you indicated you have no backups, if by some bad karma your database is in 'Simple' mode and you may be SOL.
|||Is there anyother way without 3rd party tools.its a Full Recovery Model.
what is meant by > you may be SOL. <
|||
Download Lumnigents' Log Exlorer, or ApexSQL's SQLLog -or one of the several other good log tools.
It is just not worth any time and effort to try this without their help.
*SOL = "Sorry, Out of Luck"
|||what is u r backup policy ... if u have full backup and subsequent transaction log backup it is possible to restore to the time just before u deleted the table... Read about STOP AT option in Restore Database...
suppose
(a) 06 Mar 07 you deleted the table at 1000 AM...
(b) U have full backup of 05 Mar 07 20:00 hrs (8 PM)
(c) your database is in Full recovery model
(d) you have no differential backup
(e) you have no TL backup
06 Mar 07 15:00 hrs you found that the data has been delete by mistake and u need to get the databack
(a) first and foremost thing is to take the TL backup
(b) restore the full backup of 05 Mar 07 20:00 hrs as a new database with No REcovery option
(c) Restore the TL with STOPAT 09:55 hrs with Recovery option
this is just a scenario which u can relate and try to get the data back
Madhu
|||I am aware of the stop at option and the scenario you mentioned.But i am thinking of the worst-worst case scenario. What if you have no backups at all.
you deleted a table.
now u need to recover that table. How do you go about doing that without any backups.
If the history is kept in the transactional logs then it seems correct to assume that you can recover a table dropped 5 minutes before from the transactional logs.
Can we achive such a thing without using third party tools. worst case scenario.
Thanks everyone..|||
In simple terms, as I've tried to communicate to you a couple of times -NO!
If you need to do this, get a third party tool.
|||Just out of interest, I've noticed that SQL 2005's RESTORE DATABASE command now has a STOPAT option, however BOL doesn't give much information away as to how/under what circumstances this option can be used.
I gave it quick a test earlier on today but couldn't get it to work. Does anyone have any experience of using it? I was wondering if it could possibly be of use to the original poster of this thread (i.e. by taking a full backup now, and if the log hasn't been backed-up, then is it possible to restore to a point in time earlier than the full backup? - my guess is 'probably not', although in theory surely this should be possible by examining the log and rolling back / undoing all uncommitted and comitted transactions to the point in time specified?).
Thanks
Chris
It seems to me that if you make a 'Full Backup' at this juncture, ALL committed activities would be assumed to be in the database, and the transaction log would be truncated. Then not only would the table to permanently 'gone', but any record of it would no longer be in the transaction log.
The missing element is the previous 'Backup' -it does not exist, therefore, the only vestiges of the missing table (if other than page logging) 'might' be in the existing transaction log. Lunmigent's Log explorer would help find out IF there is any chance of recovering the data.
|||Just one thing, though, taking a full database backup does not truncate the transaction log - this is one of the reasons why I was wondering whether the STOPAT option in the RESTORE DATABASE command would be of use. Agreed that a log-reader tool would be a good tool to invest in / trial if not.
Chris
point in time restore
Recovering to a Point In Time
You can recover to a point in time by recovering only the transactions that occurred before a specific point in time within a transaction log backup, rather than the entire backup. By viewing the header information of each transaction log backup or the information in the backupset table in msdb, you can quickly identify which backup contains the time to which you want to restore the database. You then need only apply transaction log backups up to that point.
You cannot skip specific transactions. This would compromise the integrity of the data in the database. Any transactions that occur after the transaction you want to undo might depend on the data modified by the undone transaction.
If you do not want to restore any modifications made to the database after a specific point in time:
Restore the last database backup without recovering the database.
Apply each transaction log backup in the same sequence in which they were created.
Recover the database at the desired point in time within a transaction log backup.
This process also can be used to restore a database and transaction logs if some transaction log backups created after a point in time are missing or damaged.
Point-in-time recovery is not supported with the Bulk-Logged Recovery model. Bulk-Logged recovery only allows the database to be recovered to the end of a transaction log backup when the log backup contains bulk changes.sql
Wednesday, March 21, 2012
Point in time recovery
My Backup policy is to take transaction log backups every 30 minutes...
what if my server crashes at 10 minutes before a Transaction log backup
takes place...
e.g. Full Backup 1:00 pm
Transaction Log Backup - 1:30 pm
Transaction Log Backup - 2:00 pm
Transaction Log Backup - 2:30 pm
Server Crashes at 2:50 pm ... can we recover the work done form 2:30
pm to 2:50 pm ...
Please help
ThanksNo, you would need an additional tlog backup done after 2:50 to do this.
--
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Double_B" <bharatbutani@.gmail.com> wrote in message
news:1157015968.208121.268170@.m79g2000cwm.googlegroups.com...
> Hi
> My Backup policy is to take transaction log backups every 30 minutes...
> what if my server crashes at 10 minutes before a Transaction log backup
> takes place...
> e.g. Full Backup 1:00 pm
> Transaction Log Backup - 1:30 pm
> Transaction Log Backup - 2:00 pm
> Transaction Log Backup - 2:30 pm
> Server Crashes at 2:50 pm ... can we recover the work done form 2:30
> pm to 2:50 pm ...
> Please help
> Thanks
>|||Start by reading about the NO_TRUNCATE option of the BACKUP LOG command. This is exactly what the
purpose of this option is. Post back if you have further questions.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Double_B" <bharatbutani@.gmail.com> wrote in message
news:1157015968.208121.268170@.m79g2000cwm.googlegroups.com...
> Hi
> My Backup policy is to take transaction log backups every 30 minutes...
> what if my server crashes at 10 minutes before a Transaction log backup
> takes place...
> e.g. Full Backup 1:00 pm
> Transaction Log Backup - 1:30 pm
> Transaction Log Backup - 2:00 pm
> Transaction Log Backup - 2:30 pm
> Server Crashes at 2:50 pm ... can we recover the work done form 2:30
> pm to 2:50 pm ...
> Please help
> Thanks
>|||It backups the log file without truncating it ...
But when the server crashes... how can i use that log file... i mean I
wont be able to take a backup of that log file cause i would not have
access to the server...
Please can someone explain this
Thanks
Tibor Karaszi wrote:
> Start by reading about the NO_TRUNCATE option of the BACKUP LOG command. This is exactly what the
> purpose of this option is. Post back if you have further questions.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Double_B" <bharatbutani@.gmail.com> wrote in message
> news:1157015968.208121.268170@.m79g2000cwm.googlegroups.com...
> > Hi
> >
> > My Backup policy is to take transaction log backups every 30 minutes...
> > what if my server crashes at 10 minutes before a Transaction log backup
> > takes place...
> >
> > e.g. Full Backup 1:00 pm
> > Transaction Log Backup - 1:30 pm
> > Transaction Log Backup - 2:00 pm
> > Transaction Log Backup - 2:30 pm
> >
> > Server Crashes at 2:50 pm ... can we recover the work done form 2:30
> > pm to 2:50 pm ...
> >
> > Please help
> >
> > Thanks
> >|||> But when the server crashes... how can i use that log file... i mean I
> wont be able to take a backup of that log file cause i would not have
> access to the server...
You need to consider a number of scenarios in developing your recovery plan.
Also consider your tolerance for data loss (SLAs) and the cost of preventing
such.
The worst case is that you lose your data center and can recover using only
off-site storage. You will likely lose some data in that scenario unless
you engineer a (very expensive) system to mirror all data real time to an
offsite location. Similarly, you will loose data if you lose your log file
for any reason; you can recover only to your last transaction log backup.
If you lose data file(s) but your log is intact, you'll need to first
recover to the point where SQL Server is running but the database is suspect
due to the data file problem. This may involve correcting hardware
problems, rebuilding the server OS and restoring SQL Server system
databases, depending on the particulars of the recovery scenario. You can
then use the BACKUP LOG...WITH NO_TRUNCATE to extract the last log you'll
need for the restore process.
In any case, you should schedule transaction log backups (stored on a
different server) that are frequent enough to meet your data loss SLAs.
--
Hope this helps.
Dan Guzman
SQL Server MVP
"Double_B" <bharatbutani@.gmail.com> wrote in message
news:1157021648.378785.37920@.b28g2000cwb.googlegroups.com...
> It backups the log file without truncating it ...
> But when the server crashes... how can i use that log file... i mean I
> wont be able to take a backup of that log file cause i would not have
> access to the server...
> Please can someone explain this
> Thanks
>
>
> Tibor Karaszi wrote:
>> Start by reading about the NO_TRUNCATE option of the BACKUP LOG command.
>> This is exactly what the
>> purpose of this option is. Post back if you have further questions.
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://www.solidqualitylearning.com/
>>
>> "Double_B" <bharatbutani@.gmail.com> wrote in message
>> news:1157015968.208121.268170@.m79g2000cwm.googlegroups.com...
>> > Hi
>> >
>> > My Backup policy is to take transaction log backups every 30 minutes...
>> > what if my server crashes at 10 minutes before a Transaction log backup
>> > takes place...
>> >
>> > e.g. Full Backup 1:00 pm
>> > Transaction Log Backup - 1:30 pm
>> > Transaction Log Backup - 2:00 pm
>> > Transaction Log Backup - 2:30 pm
>> >
>> > Server Crashes at 2:50 pm ... can we recover the work done form 2:30
>> > pm to 2:50 pm ...
>> >
>> > Please help
>> >
>> > Thanks
>> >
>|||In addition to Dan's comments:
If the server is really toast, but the log file is intact:
Create a database on some other machine with SQL Server installed. Stop that SQL Server. Remove the
database files. "Slide" in your log file from the crashed database. Start that SQL Server, and the
database is now, of course, suspect. Now do the log backup using NO_TRUNCATE. This way you can
backup the log of a crashed database even if the whole machine goes south, assuming you get to the
ldf file(s).
Another comment:
>> It backups the log file without truncating it ...
Don't let the name of the option fool you. The purpose of this option is exactly what we have
described here. The options is badly named, quite simply. This is why I suggested you to study the
literature about the meaning of this option.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Dan Guzman" <guzmanda@.nospam-online.sbcglobal.net> wrote in message
news:e5OqgLPzGHA.4232@.TK2MSFTNGP04.phx.gbl...
>> But when the server crashes... how can i use that log file... i mean I
>> wont be able to take a backup of that log file cause i would not have
>> access to the server...
> You need to consider a number of scenarios in developing your recovery plan. Also consider your
> tolerance for data loss (SLAs) and the cost of preventing such.
> The worst case is that you lose your data center and can recover using only off-site storage. You
> will likely lose some data in that scenario unless you engineer a (very expensive) system to
> mirror all data real time to an offsite location. Similarly, you will loose data if you lose your
> log file for any reason; you can recover only to your last transaction log backup.
> If you lose data file(s) but your log is intact, you'll need to first recover to the point where
> SQL Server is running but the database is suspect due to the data file problem. This may involve
> correcting hardware problems, rebuilding the server OS and restoring SQL Server system databases,
> depending on the particulars of the recovery scenario. You can then use the BACKUP LOG...WITH
> NO_TRUNCATE to extract the last log you'll need for the restore process.
> In any case, you should schedule transaction log backups (stored on a different server) that are
> frequent enough to meet your data loss SLAs.
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "Double_B" <bharatbutani@.gmail.com> wrote in message
> news:1157021648.378785.37920@.b28g2000cwb.googlegroups.com...
>> It backups the log file without truncating it ...
>> But when the server crashes... how can i use that log file... i mean I
>> wont be able to take a backup of that log file cause i would not have
>> access to the server...
>> Please can someone explain this
>> Thanks
>>
>>
>> Tibor Karaszi wrote:
>> Start by reading about the NO_TRUNCATE option of the BACKUP LOG command. This is exactly what
>> the
>> purpose of this option is. Post back if you have further questions.
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://www.solidqualitylearning.com/
>>
>> "Double_B" <bharatbutani@.gmail.com> wrote in message
>> news:1157015968.208121.268170@.m79g2000cwm.googlegroups.com...
>> > Hi
>> >
>> > My Backup policy is to take transaction log backups every 30 minutes...
>> > what if my server crashes at 10 minutes before a Transaction log backup
>> > takes place...
>> >
>> > e.g. Full Backup 1:00 pm
>> > Transaction Log Backup - 1:30 pm
>> > Transaction Log Backup - 2:00 pm
>> > Transaction Log Backup - 2:30 pm
>> >
>> > Server Crashes at 2:50 pm ... can we recover the work done form 2:30
>> > pm to 2:50 pm ...
>> >
>> > Please help
>> >
>> > Thanks
>> >
>|||Thanks a ton for the help guys...
I just wanted the procedure , of how to move ahead if i had the
transaction log .. I mean as Tibor said ... I would create a new DB ...
then de-tach it & attach the old transcation log file & then take a
backup & then restore that after the full backup of the database ...
Is that that correct way .. or are there some more steps...
Tibor Karaszi wrote:
> In addition to Dan's comments:
> If the server is really toast, but the log file is intact:
> Create a database on some other machine with SQL Server installed. Stop that SQL Server. Remove the
> database files. "Slide" in your log file from the crashed database. Start that SQL Server, and the
> database is now, of course, suspect. Now do the log backup using NO_TRUNCATE. This way you can
> backup the log of a crashed database even if the whole machine goes south, assuming you get to the
> ldf file(s).
>
> Another comment:
> >> It backups the log file without truncating it ...
> Don't let the name of the option fool you. The purpose of this option is exactly what we have
> described here. The options is badly named, quite simply. This is why I suggested you to study the
> literature about the meaning of this option.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Dan Guzman" <guzmanda@.nospam-online.sbcglobal.net> wrote in message
> news:e5OqgLPzGHA.4232@.TK2MSFTNGP04.phx.gbl...
> >> But when the server crashes... how can i use that log file... i mean I
> >> wont be able to take a backup of that log file cause i would not have
> >> access to the server...
> >
> > You need to consider a number of scenarios in developing your recovery plan. Also consider your
> > tolerance for data loss (SLAs) and the cost of preventing such.
> >
> > The worst case is that you lose your data center and can recover using only off-site storage. You
> > will likely lose some data in that scenario unless you engineer a (very expensive) system to
> > mirror all data real time to an offsite location. Similarly, you will loose data if you lose your
> > log file for any reason; you can recover only to your last transaction log backup.
> >
> > If you lose data file(s) but your log is intact, you'll need to first recover to the point where
> > SQL Server is running but the database is suspect due to the data file problem. This may involve
> > correcting hardware problems, rebuilding the server OS and restoring SQL Server system databases,
> > depending on the particulars of the recovery scenario. You can then use the BACKUP LOG...WITH
> > NO_TRUNCATE to extract the last log you'll need for the restore process.
> >
> > In any case, you should schedule transaction log backups (stored on a different server) that are
> > frequent enough to meet your data loss SLAs.
> >
> > --
> > Hope this helps.
> >
> > Dan Guzman
> > SQL Server MVP
> >
> > "Double_B" <bharatbutani@.gmail.com> wrote in message
> > news:1157021648.378785.37920@.b28g2000cwb.googlegroups.com...
> >> It backups the log file without truncating it ...
> >>
> >> But when the server crashes... how can i use that log file... i mean I
> >> wont be able to take a backup of that log file cause i would not have
> >> access to the server...
> >>
> >> Please can someone explain this
> >>
> >> Thanks
> >>
> >>
> >>
> >>
> >> Tibor Karaszi wrote:
> >> Start by reading about the NO_TRUNCATE option of the BACKUP LOG command. This is exactly what
> >> the
> >> purpose of this option is. Post back if you have further questions.
> >>
> >> --
> >> Tibor Karaszi, SQL Server MVP
> >> http://www.karaszi.com/sqlserver/default.asp
> >> http://www.solidqualitylearning.com/
> >>
> >>
> >> "Double_B" <bharatbutani@.gmail.com> wrote in message
> >> news:1157015968.208121.268170@.m79g2000cwm.googlegroups.com...
> >> > Hi
> >> >
> >> > My Backup policy is to take transaction log backups every 30 minutes...
> >> > what if my server crashes at 10 minutes before a Transaction log backup
> >> > takes place...
> >> >
> >> > e.g. Full Backup 1:00 pm
> >> > Transaction Log Backup - 1:30 pm
> >> > Transaction Log Backup - 2:00 pm
> >> > Transaction Log Backup - 2:30 pm
> >> >
> >> > Server Crashes at 2:50 pm ... can we recover the work done form 2:30
> >> > pm to 2:50 pm ...
> >> >
> >> > Please help
> >> >
> >> > Thanks
> >> >
> >>
> >
> >|||Those are the steps basically, but not detach/attach. Rather stop SQL Server, delete the files, copy
over the tlog file in the place of the old tlog file. I know there has been a KB article about this
particular subject, and I'd be surprised if it has been removed.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Double_B" <bharatbutani@.gmail.com> wrote in message
news:1157040981.529433.265080@.i3g2000cwc.googlegroups.com...
> Thanks a ton for the help guys...
> I just wanted the procedure , of how to move ahead if i had the
> transaction log .. I mean as Tibor said ... I would create a new DB ...
> then de-tach it & attach the old transcation log file & then take a
> backup & then restore that after the full backup of the database ...
> Is that that correct way .. or are there some more steps...
>
>
> Tibor Karaszi wrote:
>> In addition to Dan's comments:
>> If the server is really toast, but the log file is intact:
>> Create a database on some other machine with SQL Server installed. Stop that SQL Server. Remove
>> the
>> database files. "Slide" in your log file from the crashed database. Start that SQL Server, and
>> the
>> database is now, of course, suspect. Now do the log backup using NO_TRUNCATE. This way you can
>> backup the log of a crashed database even if the whole machine goes south, assuming you get to
>> the
>> ldf file(s).
>>
>> Another comment:
>> >> It backups the log file without truncating it ...
>> Don't let the name of the option fool you. The purpose of this option is exactly what we have
>> described here. The options is badly named, quite simply. This is why I suggested you to study
>> the
>> literature about the meaning of this option.
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://www.solidqualitylearning.com/
>>
>> "Dan Guzman" <guzmanda@.nospam-online.sbcglobal.net> wrote in message
>> news:e5OqgLPzGHA.4232@.TK2MSFTNGP04.phx.gbl...
>> >> But when the server crashes... how can i use that log file... i mean I
>> >> wont be able to take a backup of that log file cause i would not have
>> >> access to the server...
>> >
>> > You need to consider a number of scenarios in developing your recovery plan. Also consider your
>> > tolerance for data loss (SLAs) and the cost of preventing such.
>> >
>> > The worst case is that you lose your data center and can recover using only off-site storage.
>> > You
>> > will likely lose some data in that scenario unless you engineer a (very expensive) system to
>> > mirror all data real time to an offsite location. Similarly, you will loose data if you lose
>> > your
>> > log file for any reason; you can recover only to your last transaction log backup.
>> >
>> > If you lose data file(s) but your log is intact, you'll need to first recover to the point
>> > where
>> > SQL Server is running but the database is suspect due to the data file problem. This may
>> > involve
>> > correcting hardware problems, rebuilding the server OS and restoring SQL Server system
>> > databases,
>> > depending on the particulars of the recovery scenario. You can then use the BACKUP LOG...WITH
>> > NO_TRUNCATE to extract the last log you'll need for the restore process.
>> >
>> > In any case, you should schedule transaction log backups (stored on a different server) that
>> > are
>> > frequent enough to meet your data loss SLAs.
>> >
>> > --
>> > Hope this helps.
>> >
>> > Dan Guzman
>> > SQL Server MVP
>> >
>> > "Double_B" <bharatbutani@.gmail.com> wrote in message
>> > news:1157021648.378785.37920@.b28g2000cwb.googlegroups.com...
>> >> It backups the log file without truncating it ...
>> >>
>> >> But when the server crashes... how can i use that log file... i mean I
>> >> wont be able to take a backup of that log file cause i would not have
>> >> access to the server...
>> >>
>> >> Please can someone explain this
>> >>
>> >> Thanks
>> >>
>> >>
>> >>
>> >>
>> >> Tibor Karaszi wrote:
>> >> Start by reading about the NO_TRUNCATE option of the BACKUP LOG command. This is exactly what
>> >> the
>> >> purpose of this option is. Post back if you have further questions.
>> >>
>> >> --
>> >> Tibor Karaszi, SQL Server MVP
>> >> http://www.karaszi.com/sqlserver/default.asp
>> >> http://www.solidqualitylearning.com/
>> >>
>> >>
>> >> "Double_B" <bharatbutani@.gmail.com> wrote in message
>> >> news:1157015968.208121.268170@.m79g2000cwm.googlegroups.com...
>> >> > Hi
>> >> >
>> >> > My Backup policy is to take transaction log backups every 30 minutes...
>> >> > what if my server crashes at 10 minutes before a Transaction log backup
>> >> > takes place...
>> >> >
>> >> > e.g. Full Backup 1:00 pm
>> >> > Transaction Log Backup - 1:30 pm
>> >> > Transaction Log Backup - 2:00 pm
>> >> > Transaction Log Backup - 2:30 pm
>> >> >
>> >> > Server Crashes at 2:50 pm ... can we recover the work done form 2:30
>> >> > pm to 2:50 pm ...
>> >> >
>> >> > Please help
>> >> >
>> >> > Thanks
>> >> >
>> >>
>> >
>> >
>|||It would be really helpful if i could get the link to the article
Thanks a ton
Regards
Tibor Karaszi wrote:
> Those are the steps basically, but not detach/attach. Rather stop SQL Server, delete the files, copy
> over the tlog file in the place of the old tlog file. I know there has been a KB article about this
> particular subject, and I'd be surprised if it has been removed.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Double_B" <bharatbutani@.gmail.com> wrote in message
> news:1157040981.529433.265080@.i3g2000cwc.googlegroups.com...
> > Thanks a ton for the help guys...
> >
> > I just wanted the procedure , of how to move ahead if i had the
> > transaction log .. I mean as Tibor said ... I would create a new DB ...
> > then de-tach it & attach the old transcation log file & then take a
> > backup & then restore that after the full backup of the database ...
> >
> > Is that that correct way .. or are there some more steps...
> >
> >
> >
> >
> > Tibor Karaszi wrote:
> >> In addition to Dan's comments:
> >>
> >> If the server is really toast, but the log file is intact:
> >> Create a database on some other machine with SQL Server installed. Stop that SQL Server. Remove
> >> the
> >> database files. "Slide" in your log file from the crashed database. Start that SQL Server, and
> >> the
> >> database is now, of course, suspect. Now do the log backup using NO_TRUNCATE. This way you can
> >> backup the log of a crashed database even if the whole machine goes south, assuming you get to
> >> the
> >> ldf file(s).
> >>
> >>
> >> Another comment:
> >>
> >> >> It backups the log file without truncating it ...
> >>
> >> Don't let the name of the option fool you. The purpose of this option is exactly what we have
> >> described here. The options is badly named, quite simply. This is why I suggested you to study
> >> the
> >> literature about the meaning of this option.
> >>
> >> --
> >> Tibor Karaszi, SQL Server MVP
> >> http://www.karaszi.com/sqlserver/default.asp
> >> http://www.solidqualitylearning.com/
> >>
> >>
> >> "Dan Guzman" <guzmanda@.nospam-online.sbcglobal.net> wrote in message
> >> news:e5OqgLPzGHA.4232@.TK2MSFTNGP04.phx.gbl...
> >> >> But when the server crashes... how can i use that log file... i mean I
> >> >> wont be able to take a backup of that log file cause i would not have
> >> >> access to the server...
> >> >
> >> > You need to consider a number of scenarios in developing your recovery plan. Also consider your
> >> > tolerance for data loss (SLAs) and the cost of preventing such.
> >> >
> >> > The worst case is that you lose your data center and can recover using only off-site storage.
> >> > You
> >> > will likely lose some data in that scenario unless you engineer a (very expensive) system to
> >> > mirror all data real time to an offsite location. Similarly, you will loose data if you lose
> >> > your
> >> > log file for any reason; you can recover only to your last transaction log backup.
> >> >
> >> > If you lose data file(s) but your log is intact, you'll need to first recover to the point
> >> > where
> >> > SQL Server is running but the database is suspect due to the data file problem. This may
> >> > involve
> >> > correcting hardware problems, rebuilding the server OS and restoring SQL Server system
> >> > databases,
> >> > depending on the particulars of the recovery scenario. You can then use the BACKUP LOG...WITH
> >> > NO_TRUNCATE to extract the last log you'll need for the restore process.
> >> >
> >> > In any case, you should schedule transaction log backups (stored on a different server) that
> >> > are
> >> > frequent enough to meet your data loss SLAs.
> >> >
> >> > --
> >> > Hope this helps.
> >> >
> >> > Dan Guzman
> >> > SQL Server MVP
> >> >
> >> > "Double_B" <bharatbutani@.gmail.com> wrote in message
> >> > news:1157021648.378785.37920@.b28g2000cwb.googlegroups.com...
> >> >> It backups the log file without truncating it ...
> >> >>
> >> >> But when the server crashes... how can i use that log file... i mean I
> >> >> wont be able to take a backup of that log file cause i would not have
> >> >> access to the server...
> >> >>
> >> >> Please can someone explain this
> >> >>
> >> >> Thanks
> >> >>
> >> >>
> >> >>
> >> >>
> >> >> Tibor Karaszi wrote:
> >> >> Start by reading about the NO_TRUNCATE option of the BACKUP LOG command. This is exactly what
> >> >> the
> >> >> purpose of this option is. Post back if you have further questions.
> >> >>
> >> >> --
> >> >> Tibor Karaszi, SQL Server MVP
> >> >> http://www.karaszi.com/sqlserver/default.asp
> >> >> http://www.solidqualitylearning.com/
> >> >>
> >> >>
> >> >> "Double_B" <bharatbutani@.gmail.com> wrote in message
> >> >> news:1157015968.208121.268170@.m79g2000cwm.googlegroups.com...
> >> >> > Hi
> >> >> >
> >> >> > My Backup policy is to take transaction log backups every 30 minutes...
> >> >> > what if my server crashes at 10 minutes before a Transaction log backup
> >> >> > takes place...
> >> >> >
> >> >> > e.g. Full Backup 1:00 pm
> >> >> > Transaction Log Backup - 1:30 pm
> >> >> > Transaction Log Backup - 2:00 pm
> >> >> > Transaction Log Backup - 2:30 pm
> >> >> >
> >> >> > Server Crashes at 2:50 pm ... can we recover the work done form 2:30
> >> >> > pm to 2:50 pm ...
> >> >> >
> >> >> > Please help
> >> >> >
> >> >> > Thanks
> >> >> >
> >> >>
> >> >
> >> >
> >|||It would be really helpful if i could get the link to the article
Thanks a ton
Regards
Tibor Karaszi wrote:
> Those are the steps basically, but not detach/attach. Rather stop SQL Server, delete the files, copy
> over the tlog file in the place of the old tlog file. I know there has been a KB article about this
> particular subject, and I'd be surprised if it has been removed.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Double_B" <bharatbutani@.gmail.com> wrote in message
> news:1157040981.529433.265080@.i3g2000cwc.googlegroups.com...
> > Thanks a ton for the help guys...
> >
> > I just wanted the procedure , of how to move ahead if i had the
> > transaction log .. I mean as Tibor said ... I would create a new DB ...
> > then de-tach it & attach the old transcation log file & then take a
> > backup & then restore that after the full backup of the database ...
> >
> > Is that that correct way .. or are there some more steps...
> >
> >
> >
> >
> > Tibor Karaszi wrote:
> >> In addition to Dan's comments:
> >>
> >> If the server is really toast, but the log file is intact:
> >> Create a database on some other machine with SQL Server installed. Stop that SQL Server. Remove
> >> the
> >> database files. "Slide" in your log file from the crashed database. Start that SQL Server, and
> >> the
> >> database is now, of course, suspect. Now do the log backup using NO_TRUNCATE. This way you can
> >> backup the log of a crashed database even if the whole machine goes south, assuming you get to
> >> the
> >> ldf file(s).
> >>
> >>
> >> Another comment:
> >>
> >> >> It backups the log file without truncating it ...
> >>
> >> Don't let the name of the option fool you. The purpose of this option is exactly what we have
> >> described here. The options is badly named, quite simply. This is why I suggested you to study
> >> the
> >> literature about the meaning of this option.
> >>
> >> --
> >> Tibor Karaszi, SQL Server MVP
> >> http://www.karaszi.com/sqlserver/default.asp
> >> http://www.solidqualitylearning.com/
> >>
> >>
> >> "Dan Guzman" <guzmanda@.nospam-online.sbcglobal.net> wrote in message
> >> news:e5OqgLPzGHA.4232@.TK2MSFTNGP04.phx.gbl...
> >> >> But when the server crashes... how can i use that log file... i mean I
> >> >> wont be able to take a backup of that log file cause i would not have
> >> >> access to the server...
> >> >
> >> > You need to consider a number of scenarios in developing your recovery plan. Also consider your
> >> > tolerance for data loss (SLAs) and the cost of preventing such.
> >> >
> >> > The worst case is that you lose your data center and can recover using only off-site storage.
> >> > You
> >> > will likely lose some data in that scenario unless you engineer a (very expensive) system to
> >> > mirror all data real time to an offsite location. Similarly, you will loose data if you lose
> >> > your
> >> > log file for any reason; you can recover only to your last transaction log backup.
> >> >
> >> > If you lose data file(s) but your log is intact, you'll need to first recover to the point
> >> > where
> >> > SQL Server is running but the database is suspect due to the data file problem. This may
> >> > involve
> >> > correcting hardware problems, rebuilding the server OS and restoring SQL Server system
> >> > databases,
> >> > depending on the particulars of the recovery scenario. You can then use the BACKUP LOG...WITH
> >> > NO_TRUNCATE to extract the last log you'll need for the restore process.
> >> >
> >> > In any case, you should schedule transaction log backups (stored on a different server) that
> >> > are
> >> > frequent enough to meet your data loss SLAs.
> >> >
> >> > --
> >> > Hope this helps.
> >> >
> >> > Dan Guzman
> >> > SQL Server MVP
> >> >
> >> > "Double_B" <bharatbutani@.gmail.com> wrote in message
> >> > news:1157021648.378785.37920@.b28g2000cwb.googlegroups.com...
> >> >> It backups the log file without truncating it ...
> >> >>
> >> >> But when the server crashes... how can i use that log file... i mean I
> >> >> wont be able to take a backup of that log file cause i would not have
> >> >> access to the server...
> >> >>
> >> >> Please can someone explain this
> >> >>
> >> >> Thanks
> >> >>
> >> >>
> >> >>
> >> >>
> >> >> Tibor Karaszi wrote:
> >> >> Start by reading about the NO_TRUNCATE option of the BACKUP LOG command. This is exactly what
> >> >> the
> >> >> purpose of this option is. Post back if you have further questions.
> >> >>
> >> >> --
> >> >> Tibor Karaszi, SQL Server MVP
> >> >> http://www.karaszi.com/sqlserver/default.asp
> >> >> http://www.solidqualitylearning.com/
> >> >>
> >> >>
> >> >> "Double_B" <bharatbutani@.gmail.com> wrote in message
> >> >> news:1157015968.208121.268170@.m79g2000cwm.googlegroups.com...
> >> >> > Hi
> >> >> >
> >> >> > My Backup policy is to take transaction log backups every 30 minutes...
> >> >> > what if my server crashes at 10 minutes before a Transaction log backup
> >> >> > takes place...
> >> >> >
> >> >> > e.g. Full Backup 1:00 pm
> >> >> > Transaction Log Backup - 1:30 pm
> >> >> > Transaction Log Backup - 2:00 pm
> >> >> > Transaction Log Backup - 2:30 pm
> >> >> >
> >> >> > Server Crashes at 2:50 pm ... can we recover the work done form 2:30
> >> >> > pm to 2:50 pm ...
> >> >> >
> >> >> > Please help
> >> >> >
> >> >> > Thanks
> >> >> >
> >> >>
> >> >
> >> >
> >
Point in time recovery
My Backup policy is to take transaction log backups every 30 minutes...
what if my server crashes at 10 minutes before a Transaction log backup
takes place...
e.g. Full Backup 1:00 pm
Transaction Log Backup - 1:30 pm
Transaction Log Backup - 2:00 pm
Transaction Log Backup - 2:30 pm
Server Crashes at 2:50 pm ... can we recover the work done form 2:30
pm to 2:50 pm ...
Please help
ThanksNo, you would need an additional tlog backup done after 2:50 to do this.
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Double_B" <bharatbutani@.gmail.com> wrote in message
news:1157015968.208121.268170@.m79g2000cwm.googlegroups.com...
> Hi
> My Backup policy is to take transaction log backups every 30 minutes...
> what if my server crashes at 10 minutes before a Transaction log backup
> takes place...
> e.g. Full Backup 1:00 pm
> Transaction Log Backup - 1:30 pm
> Transaction Log Backup - 2:00 pm
> Transaction Log Backup - 2:30 pm
> Server Crashes at 2:50 pm ... can we recover the work done form 2:30
> pm to 2:50 pm ...
> Please help
> Thanks
>|||Start by reading about the NO_TRUNCATE option of the BACKUP LOG command. Thi
s is exactly what the
purpose of this option is. Post back if you have further questions.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Double_B" <bharatbutani@.gmail.com> wrote in message
news:1157015968.208121.268170@.m79g2000cwm.googlegroups.com...
> Hi
> My Backup policy is to take transaction log backups every 30 minutes...
> what if my server crashes at 10 minutes before a Transaction log backup
> takes place...
> e.g. Full Backup 1:00 pm
> Transaction Log Backup - 1:30 pm
> Transaction Log Backup - 2:00 pm
> Transaction Log Backup - 2:30 pm
> Server Crashes at 2:50 pm ... can we recover the work done form 2:30
> pm to 2:50 pm ...
> Please help
> Thanks
>|||It backups the log file without truncating it ...
But when the server crashes... how can i use that log file... i mean I
wont be able to take a backup of that log file cause i would not have
access to the server...
Please can someone explain this
Thanks
Tibor Karaszi wrote:[vbcol=seagreen]
> Start by reading about the NO_TRUNCATE option of the BACKUP LOG command. T
his is exactly what the
> purpose of this option is. Post back if you have further questions.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Double_B" <bharatbutani@.gmail.com> wrote in message
> news:1157015968.208121.268170@.m79g2000cwm.googlegroups.com...|||> But when the server crashes... how can i use that log file... i mean I
> wont be able to take a backup of that log file cause i would not have
> access to the server...
You need to consider a number of scenarios in developing your recovery plan.
Also consider your tolerance for data loss (SLAs) and the cost of preventing
such.
The worst case is that you lose your data center and can recover using only
off-site storage. You will likely lose some data in that scenario unless
you engineer a (very expensive) system to mirror all data real time to an
offsite location. Similarly, you will loose data if you lose your log file
for any reason; you can recover only to your last transaction log backup.
If you lose data file(s) but your log is intact, you'll need to first
recover to the point where SQL Server is running but the database is suspect
due to the data file problem. This may involve correcting hardware
problems, rebuilding the server OS and restoring SQL Server system
databases, depending on the particulars of the recovery scenario. You can
then use the BACKUP LOG...WITH NO_TRUNCATE to extract the last log you'll
need for the restore process.
In any case, you should schedule transaction log backups (stored on a
different server) that are frequent enough to meet your data loss SLAs.
Hope this helps.
Dan Guzman
SQL Server MVP
"Double_B" <bharatbutani@.gmail.com> wrote in message
news:1157021648.378785.37920@.b28g2000cwb.googlegroups.com...
> It backups the log file without truncating it ...
> But when the server crashes... how can i use that log file... i mean I
> wont be able to take a backup of that log file cause i would not have
> access to the server...
> Please can someone explain this
> Thanks
>
>
> Tibor Karaszi wrote:
>|||In addition to Dan's comments:
If the server is really toast, but the log file is intact:
Create a database on some other machine with SQL Server installed. Stop that
SQL Server. Remove the
database files. "Slide" in your log file from the crashed database. Start th
at SQL Server, and the
database is now, of course, suspect. Now do the log backup using NO_TRUNCATE
. This way you can
backup the log of a crashed database even if the whole machine goes south, a
ssuming you get to the
ldf file(s).
Another comment:
Don't let the name of the option fool you. The purpose of this option is exa
ctly what we have
described here. The options is badly named, quite simply. This is why I sugg
ested you to study the
literature about the meaning of this option.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Dan Guzman" <guzmanda@.nospam-online.sbcglobal.net> wrote in message
news:e5OqgLPzGHA.4232@.TK2MSFTNGP04.phx.gbl...[vbcol=seagreen]
> You need to consider a number of scenarios in developing your recovery pla
n. Also consider your
> tolerance for data loss (SLAs) and the cost of preventing such.
> The worst case is that you lose your data center and can recover using onl
y off-site storage. You
> will likely lose some data in that scenario unless you engineer a (very ex
pensive) system to
> mirror all data real time to an offsite location. Similarly, you will loo
se data if you lose your
> log file for any reason; you can recover only to your last transaction log
backup.
> If you lose data file(s) but your log is intact, you'll need to first reco
ver to the point where
> SQL Server is running but the database is suspect due to the data file pro
blem. This may involve
> correcting hardware problems, rebuilding the server OS and restoring SQL S
erver system databases,
> depending on the particulars of the recovery scenario. You can then use t
he BACKUP LOG...WITH
> NO_TRUNCATE to extract the last log you'll need for the restore process.
> In any case, you should schedule transaction log backups (stored on a diff
erent server) that are
> frequent enough to meet your data loss SLAs.
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "Double_B" <bharatbutani@.gmail.com> wrote in message
> news:1157021648.378785.37920@.b28g2000cwb.googlegroups.com...
>|||Thanks a ton for the help guys...
I just wanted the procedure , of how to move ahead if i had the
transaction log .. I mean as Tibor said ... I would create a new DB ...
then de-tach it & attach the old transcation log file & then take a
backup & then restore that after the full backup of the database ...
Is that that correct way .. or are there some more steps...
Tibor Karaszi wrote:[vbcol=seagreen]
> In addition to Dan's comments:
> If the server is really toast, but the log file is intact:
> Create a database on some other machine with SQL Server installed. Stop th
at SQL Server. Remove the
> database files. "Slide" in your log file from the crashed database. Start
that SQL Server, and the
> database is now, of course, suspect. Now do the log backup using NO_TRUNCA
TE. This way you can
> backup the log of a crashed database even if the whole machine goes south,
assuming you get to the
> ldf file(s).
>
> Another comment:
>
> Don't let the name of the option fool you. The purpose of this option is e
xactly what we have
> described here. The options is badly named, quite simply. This is why I su
ggested you to study the
> literature about the meaning of this option.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Dan Guzman" <guzmanda@.nospam-online.sbcglobal.net> wrote in message
> news:e5OqgLPzGHA.4232@.TK2MSFTNGP04.phx.gbl...|||Those are the steps basically, but not detach/attach. Rather stop SQL Server
, delete the files, copy
over the tlog file in the place of the old tlog file. I know there has been
a KB article about this
particular subject, and I'd be surprised if it has been removed.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Double_B" <bharatbutani@.gmail.com> wrote in message
news:1157040981.529433.265080@.i3g2000cwc.googlegroups.com...
> Thanks a ton for the help guys...
> I just wanted the procedure , of how to move ahead if i had the
> transaction log .. I mean as Tibor said ... I would create a new DB ...
> then de-tach it & attach the old transcation log file & then take a
> backup & then restore that after the full backup of the database ...
> Is that that correct way .. or are there some more steps...
>
>
> Tibor Karaszi wrote:
>|||It would be really helpful if i could get the link to the article
Thanks a ton
Regards
Tibor Karaszi wrote:[vbcol=seagreen]
> Those are the steps basically, but not detach/attach. Rather stop SQL Serv
er, delete the files, copy
> over the tlog file in the place of the old tlog file. I know there has bee
n a KB article about this
> particular subject, and I'd be surprised if it has been removed.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Double_B" <bharatbutani@.gmail.com> wrote in message
> news:1157040981.529433.265080@.i3g2000cwc.googlegroups.com...|||It would be really helpful if i could get the link to the article
Thanks a ton
Regards
Tibor Karaszi wrote:[vbcol=seagreen]
> Those are the steps basically, but not detach/attach. Rather stop SQL Serv
er, delete the files, copy
> over the tlog file in the place of the old tlog file. I know there has bee
n a KB article about this
> particular subject, and I'd be surprised if it has been removed.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Double_B" <bharatbutani@.gmail.com> wrote in message
> news:1157040981.529433.265080@.i3g2000cwc.googlegroups.com...
Wednesday, March 7, 2012
Please helpLog file will not reduce in SQL 2000 database
My Database plan is as follows:
Full Database backup every night, Full recovery mode.
T-Log backups , every 4 hours.
both are appended to media,
there are no active transactions,
but Log file will not shrink or reduce in size.
what would you suggest.
Thanks,Pls refer the below links,
http://support.microsoft.com/kb/110139 and http://support.microsoft.com/kb/873235
if you need to shrink the tran log you can perform as below,
Backup log DATABASENAME with truncate_only and then shrink the log file using DBCC shrinkfile command refer BOL for the syntax ! but it is not recommended to shrink file often
Thanxx
Deepak
|||
I guess you mean the physical LDF file does not reduce in size? While a backup of the log file truncates the contents of the log, it will not give that space back to the operating system. This is by design. In almost all cases, there is no point in shrinking the physical file every time it is backed up as it will almost certainly need to grow again in the near future.
To actually increase the size of the file, SQL Server has to request space from the OS and this is quite a "costly" operation in terms of resources. Therefore, you want to minimise the amount of times the log file has to grow and the easiest way of doing this is to keep it at its "optimum" size.ie your log file should be sized according to how large it will typically grow.
If your Transcation Log is huge (maybe due to a one off reindex or data purge) then you can physically shrink it by issuing a DBCC SHRINKFILE statement. Check Books Online for details.
HTH!
Monday, February 20, 2012
please help! log backups not being copied to destination server
*No domain accounts being used due to advice from
yesterday.*
Im trying to get Log Shipping going between 2 sql boxes.
The tlog backups arent being transferred to the
destination server. The primary box is in a domain and the
secondary is in a workgroup. As of this morning for the
purposes of this test, all sql services on both boxes are
running in local admin accounts that have the same name
and password. No domain accounts being used. After some
time the I get a red x because they are out of sync.
Nothing in the error log.
I can go into Query Analyzer logged in as the same account
that the services on both boxes are running in and copy a
file to the share without having to set up a linked server
login for him:
declare @.path varchar(200),
@.cmd varchar(200)
set @.cmd = 'copy C:\FIN\ds01
\SystemOnlyDBFiles\MSSQL\BACKUP\bla.txt '
set @.path = '\\backupsql1\BACKUP\bla.txt'
set @.cmd = @.cmd + @.path
exec master..xp_cmdshell @.cmd
Any ideas from anybody?
ThanksThe sql server agent on the destination server wasn't
running. I didnt realize it needed to be. Thanks to all
who may have been trying to figure it out.
Chris
>--Original Message--
>sql2k sp3
>*No domain accounts being used due to advice from
>yesterday.*
>Im trying to get Log Shipping going between 2 sql boxes.
>The tlog backups arent being transferred to the
>destination server. The primary box is in a domain and
the
>secondary is in a workgroup. As of this morning for the
>purposes of this test, all sql services on both boxes are
>running in local admin accounts that have the same name
>and password. No domain accounts being used. After some
>time the I get a red x because they are out of sync.
>Nothing in the error log.
>I can go into Query Analyzer logged in as the same
account
>that the services on both boxes are running in and copy a
>file to the share without having to set up a linked
server
>login for him:
>declare @.path varchar(200),
>@.cmd varchar(200)
>set @.cmd = 'copy C:\FIN\ds01
>\SystemOnlyDBFiles\MSSQL\BACKUP\bla.txt '
>set @.path = '\\backupsql1\BACKUP\bla.txt'
>set @.cmd = @.cmd + @.path
>exec master..xp_cmdshell @.cmd
>Any ideas from anybody?
>Thanks
>.
>