dbTalk Databases Forums  

Truncating logs via osql

microsoft.public.sqlserver.tools microsoft.public.sqlserver.tools


Discuss Truncating logs via osql in the microsoft.public.sqlserver.tools forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
 
Posts: n/a

Default Truncating logs via osql - 08-25-2008 , 05:16 PM






I have an LCS2005 standard server where the rtc.ldf is 3.5GB and the rtc.mdf
is
300MBs. I need to free up some space on the server so I want to truncate the
logs. I have done this with other programs and the full SQL server before
but never on
the integrated SQL that comes with LCS. I need a step by step if someone can
help out.

As far as know I need to use oslq and run some commands. If I run
"osql -E -S servername\RTC" and hit enter and I get a 1>

What commands should I run at this point? Any help will be greatly
appreciated. Tx

PS: I posted in this in the livecomm newsgroup, but this is a managed one so
I'm posting here.



Reply With Quote
  #2  
Old   
Aaron Bertrand [SQL Server MVP]
 
Posts: n/a

Default Re: Truncating logs via osql - 08-25-2008 , 05:30 PM






You need to enter the context of the correct database and then issue DBCC
SHRINKFILE. However, before getting any further, please read:

http://www.karaszi.com/SQLServer/info_dont_shrink.asp

My guess is that you are in FULL recovery mode and either (a) you mean to
be, but aren't taking log backups for some reason, or (b) you should be in
simple. In full recovery mode, taking regular log backups will prevent the
log from growing that large; in simple recovery mode, the log will manage
itself.

Anyway, have a full read of the article above.

A




On 8/25/08 6:16 PM, in article uo5rtAwBJHA.3512 (AT) TK2MSFTNGP05 (DOT) phx.gbl,
"C.Kelly (AT) noemail (DOT) noemail" <C.Kelly (AT) noemail (DOT) noemail> wrote:

Quote:
I have an LCS2005 standard server where the rtc.ldf is 3.5GB and the rtc.mdf
is
300MBs. I need to free up some space on the server so I want to truncate the
logs. I have done this with other programs and the full SQL server before
but never on
the integrated SQL that comes with LCS. I need a step by step if someone can
help out.

As far as know I need to use oslq and run some commands. If I run
"osql -E -S servername\RTC" and hit enter and I get a 1

What commands should I run at this point? Any help will be greatly
appreciated. Tx

PS: I posted in this in the livecomm newsgroup, but this is a managed one so
I'm posting here.




Reply With Quote
  #3  
Old   
Aaron Bertrand [SQL Server MVP]
 
Posts: n/a

Default Re: Truncating logs via osql - 08-25-2008 , 05:30 PM



You need to enter the context of the correct database and then issue DBCC
SHRINKFILE. However, before getting any further, please read:

http://www.karaszi.com/SQLServer/info_dont_shrink.asp

My guess is that you are in FULL recovery mode and either (a) you mean to
be, but aren't taking log backups for some reason, or (b) you should be in
simple. In full recovery mode, taking regular log backups will prevent the
log from growing that large; in simple recovery mode, the log will manage
itself.

Anyway, have a full read of the article above.

A




On 8/25/08 6:16 PM, in article uo5rtAwBJHA.3512 (AT) TK2MSFTNGP05 (DOT) phx.gbl,
"C.Kelly (AT) noemail (DOT) noemail" <C.Kelly (AT) noemail (DOT) noemail> wrote:

Quote:
I have an LCS2005 standard server where the rtc.ldf is 3.5GB and the rtc.mdf
is
300MBs. I need to free up some space on the server so I want to truncate the
logs. I have done this with other programs and the full SQL server before
but never on
the integrated SQL that comes with LCS. I need a step by step if someone can
help out.

As far as know I need to use oslq and run some commands. If I run
"osql -E -S servername\RTC" and hit enter and I get a 1

What commands should I run at this point? Any help will be greatly
appreciated. Tx

PS: I posted in this in the livecomm newsgroup, but this is a managed one so
I'm posting here.




Reply With Quote
  #4  
Old   
Aaron Bertrand [SQL Server MVP]
 
Posts: n/a

Default Re: Truncating logs via osql - 08-25-2008 , 05:30 PM



You need to enter the context of the correct database and then issue DBCC
SHRINKFILE. However, before getting any further, please read:

http://www.karaszi.com/SQLServer/info_dont_shrink.asp

My guess is that you are in FULL recovery mode and either (a) you mean to
be, but aren't taking log backups for some reason, or (b) you should be in
simple. In full recovery mode, taking regular log backups will prevent the
log from growing that large; in simple recovery mode, the log will manage
itself.

Anyway, have a full read of the article above.

A




On 8/25/08 6:16 PM, in article uo5rtAwBJHA.3512 (AT) TK2MSFTNGP05 (DOT) phx.gbl,
"C.Kelly (AT) noemail (DOT) noemail" <C.Kelly (AT) noemail (DOT) noemail> wrote:

Quote:
I have an LCS2005 standard server where the rtc.ldf is 3.5GB and the rtc.mdf
is
300MBs. I need to free up some space on the server so I want to truncate the
logs. I have done this with other programs and the full SQL server before
but never on
the integrated SQL that comes with LCS. I need a step by step if someone can
help out.

As far as know I need to use oslq and run some commands. If I run
"osql -E -S servername\RTC" and hit enter and I get a 1

What commands should I run at this point? Any help will be greatly
appreciated. Tx

PS: I posted in this in the livecomm newsgroup, but this is a managed one so
I'm posting here.




Reply With Quote
  #5  
Old   
Aaron Bertrand [SQL Server MVP]
 
Posts: n/a

Default Re: Truncating logs via osql - 08-25-2008 , 05:30 PM



You need to enter the context of the correct database and then issue DBCC
SHRINKFILE. However, before getting any further, please read:

http://www.karaszi.com/SQLServer/info_dont_shrink.asp

My guess is that you are in FULL recovery mode and either (a) you mean to
be, but aren't taking log backups for some reason, or (b) you should be in
simple. In full recovery mode, taking regular log backups will prevent the
log from growing that large; in simple recovery mode, the log will manage
itself.

Anyway, have a full read of the article above.

A




On 8/25/08 6:16 PM, in article uo5rtAwBJHA.3512 (AT) TK2MSFTNGP05 (DOT) phx.gbl,
"C.Kelly (AT) noemail (DOT) noemail" <C.Kelly (AT) noemail (DOT) noemail> wrote:

Quote:
I have an LCS2005 standard server where the rtc.ldf is 3.5GB and the rtc.mdf
is
300MBs. I need to free up some space on the server so I want to truncate the
logs. I have done this with other programs and the full SQL server before
but never on
the integrated SQL that comes with LCS. I need a step by step if someone can
help out.

As far as know I need to use oslq and run some commands. If I run
"osql -E -S servername\RTC" and hit enter and I get a 1

What commands should I run at this point? Any help will be greatly
appreciated. Tx

PS: I posted in this in the livecomm newsgroup, but this is a managed one so
I'm posting here.




Reply With Quote
  #6  
Old   
Aaron Bertrand [SQL Server MVP]
 
Posts: n/a

Default Re: Truncating logs via osql - 08-25-2008 , 05:30 PM



You need to enter the context of the correct database and then issue DBCC
SHRINKFILE. However, before getting any further, please read:

http://www.karaszi.com/SQLServer/info_dont_shrink.asp

My guess is that you are in FULL recovery mode and either (a) you mean to
be, but aren't taking log backups for some reason, or (b) you should be in
simple. In full recovery mode, taking regular log backups will prevent the
log from growing that large; in simple recovery mode, the log will manage
itself.

Anyway, have a full read of the article above.

A




On 8/25/08 6:16 PM, in article uo5rtAwBJHA.3512 (AT) TK2MSFTNGP05 (DOT) phx.gbl,
"C.Kelly (AT) noemail (DOT) noemail" <C.Kelly (AT) noemail (DOT) noemail> wrote:

Quote:
I have an LCS2005 standard server where the rtc.ldf is 3.5GB and the rtc.mdf
is
300MBs. I need to free up some space on the server so I want to truncate the
logs. I have done this with other programs and the full SQL server before
but never on
the integrated SQL that comes with LCS. I need a step by step if someone can
help out.

As far as know I need to use oslq and run some commands. If I run
"osql -E -S servername\RTC" and hit enter and I get a 1

What commands should I run at this point? Any help will be greatly
appreciated. Tx

PS: I posted in this in the livecomm newsgroup, but this is a managed one so
I'm posting here.




Reply With Quote
  #7  
Old   
Aaron Bertrand [SQL Server MVP]
 
Posts: n/a

Default Re: Truncating logs via osql - 08-25-2008 , 05:30 PM



You need to enter the context of the correct database and then issue DBCC
SHRINKFILE. However, before getting any further, please read:

http://www.karaszi.com/SQLServer/info_dont_shrink.asp

My guess is that you are in FULL recovery mode and either (a) you mean to
be, but aren't taking log backups for some reason, or (b) you should be in
simple. In full recovery mode, taking regular log backups will prevent the
log from growing that large; in simple recovery mode, the log will manage
itself.

Anyway, have a full read of the article above.

A




On 8/25/08 6:16 PM, in article uo5rtAwBJHA.3512 (AT) TK2MSFTNGP05 (DOT) phx.gbl,
"C.Kelly (AT) noemail (DOT) noemail" <C.Kelly (AT) noemail (DOT) noemail> wrote:

Quote:
I have an LCS2005 standard server where the rtc.ldf is 3.5GB and the rtc.mdf
is
300MBs. I need to free up some space on the server so I want to truncate the
logs. I have done this with other programs and the full SQL server before
but never on
the integrated SQL that comes with LCS. I need a step by step if someone can
help out.

As far as know I need to use oslq and run some commands. If I run
"osql -E -S servername\RTC" and hit enter and I get a 1

What commands should I run at this point? Any help will be greatly
appreciated. Tx

PS: I posted in this in the livecomm newsgroup, but this is a managed one so
I'm posting here.




Reply With Quote
  #8  
Old   
Aaron Bertrand [SQL Server MVP]
 
Posts: n/a

Default Re: Truncating logs via osql - 08-25-2008 , 05:30 PM



You need to enter the context of the correct database and then issue DBCC
SHRINKFILE. However, before getting any further, please read:

http://www.karaszi.com/SQLServer/info_dont_shrink.asp

My guess is that you are in FULL recovery mode and either (a) you mean to
be, but aren't taking log backups for some reason, or (b) you should be in
simple. In full recovery mode, taking regular log backups will prevent the
log from growing that large; in simple recovery mode, the log will manage
itself.

Anyway, have a full read of the article above.

A




On 8/25/08 6:16 PM, in article uo5rtAwBJHA.3512 (AT) TK2MSFTNGP05 (DOT) phx.gbl,
"C.Kelly (AT) noemail (DOT) noemail" <C.Kelly (AT) noemail (DOT) noemail> wrote:

Quote:
I have an LCS2005 standard server where the rtc.ldf is 3.5GB and the rtc.mdf
is
300MBs. I need to free up some space on the server so I want to truncate the
logs. I have done this with other programs and the full SQL server before
but never on
the integrated SQL that comes with LCS. I need a step by step if someone can
help out.

As far as know I need to use oslq and run some commands. If I run
"osql -E -S servername\RTC" and hit enter and I get a 1

What commands should I run at this point? Any help will be greatly
appreciated. Tx

PS: I posted in this in the livecomm newsgroup, but this is a managed one so
I'm posting here.




Reply With Quote
  #9  
Old   
Aaron Bertrand [SQL Server MVP]
 
Posts: n/a

Default Re: Truncating logs via osql - 08-25-2008 , 05:30 PM



You need to enter the context of the correct database and then issue DBCC
SHRINKFILE. However, before getting any further, please read:

http://www.karaszi.com/SQLServer/info_dont_shrink.asp

My guess is that you are in FULL recovery mode and either (a) you mean to
be, but aren't taking log backups for some reason, or (b) you should be in
simple. In full recovery mode, taking regular log backups will prevent the
log from growing that large; in simple recovery mode, the log will manage
itself.

Anyway, have a full read of the article above.

A




On 8/25/08 6:16 PM, in article uo5rtAwBJHA.3512 (AT) TK2MSFTNGP05 (DOT) phx.gbl,
"C.Kelly (AT) noemail (DOT) noemail" <C.Kelly (AT) noemail (DOT) noemail> wrote:

Quote:
I have an LCS2005 standard server where the rtc.ldf is 3.5GB and the rtc.mdf
is
300MBs. I need to free up some space on the server so I want to truncate the
logs. I have done this with other programs and the full SQL server before
but never on
the integrated SQL that comes with LCS. I need a step by step if someone can
help out.

As far as know I need to use oslq and run some commands. If I run
"osql -E -S servername\RTC" and hit enter and I get a 1

What commands should I run at this point? Any help will be greatly
appreciated. Tx

PS: I posted in this in the livecomm newsgroup, but this is a managed one so
I'm posting here.




Reply With Quote
  #10  
Old   
Aaron Bertrand [SQL Server MVP]
 
Posts: n/a

Default Re: Truncating logs via osql - 08-25-2008 , 05:30 PM



You need to enter the context of the correct database and then issue DBCC
SHRINKFILE. However, before getting any further, please read:

http://www.karaszi.com/SQLServer/info_dont_shrink.asp

My guess is that you are in FULL recovery mode and either (a) you mean to
be, but aren't taking log backups for some reason, or (b) you should be in
simple. In full recovery mode, taking regular log backups will prevent the
log from growing that large; in simple recovery mode, the log will manage
itself.

Anyway, have a full read of the article above.

A




On 8/25/08 6:16 PM, in article uo5rtAwBJHA.3512 (AT) TK2MSFTNGP05 (DOT) phx.gbl,
"C.Kelly (AT) noemail (DOT) noemail" <C.Kelly (AT) noemail (DOT) noemail> wrote:

Quote:
I have an LCS2005 standard server where the rtc.ldf is 3.5GB and the rtc.mdf
is
300MBs. I need to free up some space on the server so I want to truncate the
logs. I have done this with other programs and the full SQL server before
but never on
the integrated SQL that comes with LCS. I need a step by step if someone can
help out.

As far as know I need to use oslq and run some commands. If I run
"osql -E -S servername\RTC" and hit enter and I get a 1

What commands should I run at this point? Any help will be greatly
appreciated. Tx

PS: I posted in this in the livecomm newsgroup, but this is a managed one so
I'm posting here.




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.