Hi,
I'm using SQL 7 with database 1 GB and transaction log 4 GB.
I tried everything to shrink the log files but no succeed. I read somewhere
that detaching the database, deleting the log file and then reattaching is
the solution.
Can I be sure that all the data that was in the log file is now in the db
with this process?
Thanks in advance,
Haim BeyhanAs sp_detach_db issues Checkoint command first, this should be safe. But
befor doing this, check the article at
http://www.winnetmag.com/Article/Ar...337/14337.html.
Dejan Sarka, SQL Server MVP
Associate Mentor
Solid Quality Learning
More than just Training
www.SolidQualityLearning.com
"Haim Beyhan" <haimb@.enigma.com> wrote in message
news:uRU6eyCLEHA.4080@.TK2MSFTNGP12.phx.gbl...
> Hi,
> I'm using SQL 7 with database 1 GB and transaction log 4 GB.
> I tried everything to shrink the log files but no succeed. I read
somewhere
> that detaching the database, deleting the log file and then reattaching is
> the solution.
> Can I be sure that all the data that was in the log file is now in the db
> with this process?
> Thanks in advance,
> Haim Beyhan
>|||Hi,
Before detaching, can you try this:-
1. Backup the transaction log
Backup log <dbname> to disk='c:\backup\dbname.trn'
2. DBCCSHRINKFILE('logical_log_file_name','
truncateonly')
Ensure that no open transactions are in the database. Check this using DBCC
OPENTRAN('dbname')
If this is not working out, go with Dejan Sarka's suggestion.
Thanks
Hari
MCDBA
"Haim Beyhan" <haimb@.enigma.com> wrote in message
news:uRU6eyCLEHA.4080@.TK2MSFTNGP12.phx.gbl...
> Hi,
> I'm using SQL 7 with database 1 GB and transaction log 4 GB.
> I tried everything to shrink the log files but no succeed. I read
somewhere
> that detaching the database, deleting the log file and then reattaching is
> the solution.
> Can I be sure that all the data that was in the log file is now in the db
> with this process?
> Thanks in advance,
> Haim Beyhan
>|||Thanks for the reply.
Haim
"Dejan Sarka" <dejan_please_reply_to_newsgroups.sarka@.avtenta.si> wrote in
message news:%23bYwx2CLEHA.3880@.TK2MSFTNGP09.phx.gbl...
> As sp_detach_db issues Checkoint command first, this should be safe. But
> befor doing this, check the article at
> http://www.winnetmag.com/Article/Ar...337/14337.html.
> --
> Dejan Sarka, SQL Server MVP
> Associate Mentor
> Solid Quality Learning
> More than just Training
> www.SolidQualityLearning.com
> "Haim Beyhan" <haimb@.enigma.com> wrote in message
> news:uRU6eyCLEHA.4080@.TK2MSFTNGP12.phx.gbl...
> somewhere
is[vbcol=seagreen]
db[vbcol=seagreen]
>|||Thank you for the reply.
I tried your steps and it did not help. then I tried Dejan's suggestion.
The server created a new log file after the database is reattached.
I hope everything is on the db.
Haim
"Hari" <hari_prasad_k@.hotmail.com> wrote in message
news:%23v4%23dNDLEHA.1120@.TK2MSFTNGP11.phx.gbl...
> Hi,
> Before detaching, can you try this:-
> 1. Backup the transaction log
> Backup log <dbname> to disk='c:\backup\dbname.trn'
> 2. DBCCSHRINKFILE('logical_log_file_name','
truncateonly')
> Ensure that no open transactions are in the database. Check this using
DBCC
> OPENTRAN('dbname')
> If this is not working out, go with Dejan Sarka's suggestion.
> Thanks
> Hari
> MCDBA
>
> "Haim Beyhan" <haimb@.enigma.com> wrote in message
> news:uRU6eyCLEHA.4080@.TK2MSFTNGP12.phx.gbl...
> somewhere
is[vbcol=seagreen]
db[vbcol=seagreen]
>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment