Solved

detach & reattach error logs?

Posted on 2006-11-16
4
337 Views
Last Modified: 2010-05-18
the reason i'm asking this question is that i found (by dropping error logs) my DB size decreases substantially.  

they're not needed immediately, but i'd like to save them (for now) and if possible reload into the database.   is this even possible?
0
Comment
Question by:nespa
  • 2
  • 2
4 Comments
 
LVL 75

Expert Comment

by:Aneesh Retnakaran
ID: 17962167
I have answered this part for ur previous question...
You can set the option how soon you can recycle it, by default it is unlimited. In order to recycle it , right click on the SQLServerLog from EM, and set the option there
0
 
LVL 1

Author Comment

by:nespa
ID: 17962225
yes, my question evolved a bit (and i noticed your response came in just after i accepted the last question - thanks for the last bit).  

but i started a new question... here's my problem:

1) DB size is out of control.  i'm performing many things including archival of unnecessary data.
2) When i delete the error logs it clears a lot of space
3) These error logs may be needed for viewing later... I'd like to analyze them when I have more time
4) However right now I want them *out* of the DB, to free space.

Is this possible?   Is it possible to detach an error log, archive it (as files only), then re-attach it later & use sp_readerrorlog to read it?   that would help me out.
0
 
LVL 75

Accepted Solution

by:
Aneesh Retnakaran earned 500 total points
ID: 17962238
you can change the path of the default path, i got this from another newsgroup

In Enterprise Manager, right click the server and choose
Properties. Click on the startup parameters button and
add a new one. For example to move it to c:\errorlog
you would add a new parameter

-ec:\errorlog\ERRORLOG


Then remove the old -e parameter (be careful it's the right one!)
Stop and restart the SQL Service and it's done.


You can backup up your previous settings before doing this by
exporting the following registry key (default instance)


HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\MSSQLServer\Parameters

0
 
LVL 1

Author Comment

by:nespa
ID: 17962280
excellent - great find.   thanks!
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
Via a live example, show how to shrink a transaction log file down to a reasonable size.

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now