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
  #21  
Old   
Ekrem Önsoy
 
Posts: n/a

Default Re: Truncating logs via osql - 08-26-2008 , 02:32 PM






Quote:
I'm dealing with MSDE here so everything is by commands...
You can download and use SQL Server Management Studio Express if you need a
GUI to manage your MSDE databases. This is a free tool to manage your
databases at a basic level.

http://www.microsoft.com/downloads/d...8-5A0F62BF7796

Do you see open transactions when you run DBCC OPENTRAN command?

--
Ekrem Önsoy




<C.Kelly (AT) noemail (DOT) noemail> wrote

Quote:
thanks for the response... if you look at the last message in this thread
you'll see that something happens with LCS that a transaction doesn't get
committed and blocks others it seems. If you reboot the server the log
file stops growing but there is no way to get back the space. He said PSS
helped him truncate the log file so that's what I'm trying to do.

http://groups.google.com/group/micro...0f55eef45e828/



I'm dealing with MSDE here so everything is by commands... if I use osql
with server/RTC does that put me in the right database? If I type DBCC
SHRINKFILE I just get a 2> after that. Can you if possible give me a step
by step to the commands I would need to type? Thanks so much



"Aaron Bertrand [SQL Server MVP]" <ten.xoc (AT) dnartreb (DOT) noraa> wrote in
message news:C4D8AAE0.10332%ten.xoc (AT) dnartreb (DOT) noraa...
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:

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
  #22  
Old   
Ekrem Önsoy
 
Posts: n/a

Default Re: Truncating logs via osql - 08-26-2008 , 02:32 PM






Quote:
I'm dealing with MSDE here so everything is by commands...
You can download and use SQL Server Management Studio Express if you need a
GUI to manage your MSDE databases. This is a free tool to manage your
databases at a basic level.

http://www.microsoft.com/downloads/d...8-5A0F62BF7796

Do you see open transactions when you run DBCC OPENTRAN command?

--
Ekrem Önsoy




<C.Kelly (AT) noemail (DOT) noemail> wrote

Quote:
thanks for the response... if you look at the last message in this thread
you'll see that something happens with LCS that a transaction doesn't get
committed and blocks others it seems. If you reboot the server the log
file stops growing but there is no way to get back the space. He said PSS
helped him truncate the log file so that's what I'm trying to do.

http://groups.google.com/group/micro...0f55eef45e828/



I'm dealing with MSDE here so everything is by commands... if I use osql
with server/RTC does that put me in the right database? If I type DBCC
SHRINKFILE I just get a 2> after that. Can you if possible give me a step
by step to the commands I would need to type? Thanks so much



"Aaron Bertrand [SQL Server MVP]" <ten.xoc (AT) dnartreb (DOT) noraa> wrote in
message news:C4D8AAE0.10332%ten.xoc (AT) dnartreb (DOT) noraa...
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:

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
  #23  
Old   
Ekrem Önsoy
 
Posts: n/a

Default Re: Truncating logs via osql - 08-26-2008 , 02:32 PM



Quote:
I'm dealing with MSDE here so everything is by commands...
You can download and use SQL Server Management Studio Express if you need a
GUI to manage your MSDE databases. This is a free tool to manage your
databases at a basic level.

http://www.microsoft.com/downloads/d...8-5A0F62BF7796

Do you see open transactions when you run DBCC OPENTRAN command?

--
Ekrem Önsoy




<C.Kelly (AT) noemail (DOT) noemail> wrote

Quote:
thanks for the response... if you look at the last message in this thread
you'll see that something happens with LCS that a transaction doesn't get
committed and blocks others it seems. If you reboot the server the log
file stops growing but there is no way to get back the space. He said PSS
helped him truncate the log file so that's what I'm trying to do.

http://groups.google.com/group/micro...0f55eef45e828/



I'm dealing with MSDE here so everything is by commands... if I use osql
with server/RTC does that put me in the right database? If I type DBCC
SHRINKFILE I just get a 2> after that. Can you if possible give me a step
by step to the commands I would need to type? Thanks so much



"Aaron Bertrand [SQL Server MVP]" <ten.xoc (AT) dnartreb (DOT) noraa> wrote in
message news:C4D8AAE0.10332%ten.xoc (AT) dnartreb (DOT) noraa...
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:

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
  #24  
Old   
Ekrem Önsoy
 
Posts: n/a

Default Re: Truncating logs via osql - 08-26-2008 , 02:32 PM



Quote:
I'm dealing with MSDE here so everything is by commands...
You can download and use SQL Server Management Studio Express if you need a
GUI to manage your MSDE databases. This is a free tool to manage your
databases at a basic level.

http://www.microsoft.com/downloads/d...8-5A0F62BF7796

Do you see open transactions when you run DBCC OPENTRAN command?

--
Ekrem Önsoy




<C.Kelly (AT) noemail (DOT) noemail> wrote

Quote:
thanks for the response... if you look at the last message in this thread
you'll see that something happens with LCS that a transaction doesn't get
committed and blocks others it seems. If you reboot the server the log
file stops growing but there is no way to get back the space. He said PSS
helped him truncate the log file so that's what I'm trying to do.

http://groups.google.com/group/micro...0f55eef45e828/



I'm dealing with MSDE here so everything is by commands... if I use osql
with server/RTC does that put me in the right database? If I type DBCC
SHRINKFILE I just get a 2> after that. Can you if possible give me a step
by step to the commands I would need to type? Thanks so much



"Aaron Bertrand [SQL Server MVP]" <ten.xoc (AT) dnartreb (DOT) noraa> wrote in
message news:C4D8AAE0.10332%ten.xoc (AT) dnartreb (DOT) noraa...
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:

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
  #25  
Old   
Ekrem Önsoy
 
Posts: n/a

Default Re: Truncating logs via osql - 08-26-2008 , 02:32 PM



Quote:
I'm dealing with MSDE here so everything is by commands...
You can download and use SQL Server Management Studio Express if you need a
GUI to manage your MSDE databases. This is a free tool to manage your
databases at a basic level.

http://www.microsoft.com/downloads/d...8-5A0F62BF7796

Do you see open transactions when you run DBCC OPENTRAN command?

--
Ekrem Önsoy




<C.Kelly (AT) noemail (DOT) noemail> wrote

Quote:
thanks for the response... if you look at the last message in this thread
you'll see that something happens with LCS that a transaction doesn't get
committed and blocks others it seems. If you reboot the server the log
file stops growing but there is no way to get back the space. He said PSS
helped him truncate the log file so that's what I'm trying to do.

http://groups.google.com/group/micro...0f55eef45e828/



I'm dealing with MSDE here so everything is by commands... if I use osql
with server/RTC does that put me in the right database? If I type DBCC
SHRINKFILE I just get a 2> after that. Can you if possible give me a step
by step to the commands I would need to type? Thanks so much



"Aaron Bertrand [SQL Server MVP]" <ten.xoc (AT) dnartreb (DOT) noraa> wrote in
message news:C4D8AAE0.10332%ten.xoc (AT) dnartreb (DOT) noraa...
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:

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
  #26  
Old   
Ekrem Önsoy
 
Posts: n/a

Default Re: Truncating logs via osql - 08-26-2008 , 02:32 PM



Quote:
I'm dealing with MSDE here so everything is by commands...
You can download and use SQL Server Management Studio Express if you need a
GUI to manage your MSDE databases. This is a free tool to manage your
databases at a basic level.

http://www.microsoft.com/downloads/d...8-5A0F62BF7796

Do you see open transactions when you run DBCC OPENTRAN command?

--
Ekrem Önsoy




<C.Kelly (AT) noemail (DOT) noemail> wrote

Quote:
thanks for the response... if you look at the last message in this thread
you'll see that something happens with LCS that a transaction doesn't get
committed and blocks others it seems. If you reboot the server the log
file stops growing but there is no way to get back the space. He said PSS
helped him truncate the log file so that's what I'm trying to do.

http://groups.google.com/group/micro...0f55eef45e828/



I'm dealing with MSDE here so everything is by commands... if I use osql
with server/RTC does that put me in the right database? If I type DBCC
SHRINKFILE I just get a 2> after that. Can you if possible give me a step
by step to the commands I would need to type? Thanks so much



"Aaron Bertrand [SQL Server MVP]" <ten.xoc (AT) dnartreb (DOT) noraa> wrote in
message news:C4D8AAE0.10332%ten.xoc (AT) dnartreb (DOT) noraa...
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:

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
  #27  
Old   
Ekrem Önsoy
 
Posts: n/a

Default Re: Truncating logs via osql - 08-26-2008 , 02:32 PM



Quote:
I'm dealing with MSDE here so everything is by commands...
You can download and use SQL Server Management Studio Express if you need a
GUI to manage your MSDE databases. This is a free tool to manage your
databases at a basic level.

http://www.microsoft.com/downloads/d...8-5A0F62BF7796

Do you see open transactions when you run DBCC OPENTRAN command?

--
Ekrem Önsoy




<C.Kelly (AT) noemail (DOT) noemail> wrote

Quote:
thanks for the response... if you look at the last message in this thread
you'll see that something happens with LCS that a transaction doesn't get
committed and blocks others it seems. If you reboot the server the log
file stops growing but there is no way to get back the space. He said PSS
helped him truncate the log file so that's what I'm trying to do.

http://groups.google.com/group/micro...0f55eef45e828/



I'm dealing with MSDE here so everything is by commands... if I use osql
with server/RTC does that put me in the right database? If I type DBCC
SHRINKFILE I just get a 2> after that. Can you if possible give me a step
by step to the commands I would need to type? Thanks so much



"Aaron Bertrand [SQL Server MVP]" <ten.xoc (AT) dnartreb (DOT) noraa> wrote in
message news:C4D8AAE0.10332%ten.xoc (AT) dnartreb (DOT) noraa...
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:

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
  #28  
Old   
Ekrem Önsoy
 
Posts: n/a

Default Re: Truncating logs via osql - 08-26-2008 , 02:32 PM



Quote:
I'm dealing with MSDE here so everything is by commands...
You can download and use SQL Server Management Studio Express if you need a
GUI to manage your MSDE databases. This is a free tool to manage your
databases at a basic level.

http://www.microsoft.com/downloads/d...8-5A0F62BF7796

Do you see open transactions when you run DBCC OPENTRAN command?

--
Ekrem Önsoy




<C.Kelly (AT) noemail (DOT) noemail> wrote

Quote:
thanks for the response... if you look at the last message in this thread
you'll see that something happens with LCS that a transaction doesn't get
committed and blocks others it seems. If you reboot the server the log
file stops growing but there is no way to get back the space. He said PSS
helped him truncate the log file so that's what I'm trying to do.

http://groups.google.com/group/micro...0f55eef45e828/



I'm dealing with MSDE here so everything is by commands... if I use osql
with server/RTC does that put me in the right database? If I type DBCC
SHRINKFILE I just get a 2> after that. Can you if possible give me a step
by step to the commands I would need to type? Thanks so much



"Aaron Bertrand [SQL Server MVP]" <ten.xoc (AT) dnartreb (DOT) noraa> wrote in
message news:C4D8AAE0.10332%ten.xoc (AT) dnartreb (DOT) noraa...
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:

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.