Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

detach & reattach error logs?

Posted on 2006-11-16
4
Medium Priority
?
349 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 2000 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
MSSQL DB-maintenance also needs implementation of multiple activities. However, unprecedented errors can hamper the database management. In that case, deploying Stellar SQL Database Toolkit ensures fast and accurate database and backup repair as wel…
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.
Suggested Courses

810 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