[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

detach & reattach error logs?

Posted on 2006-11-16
4
Medium Priority
?
346 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
It is possible to export the data of a SQL Table in SSMS and generate INSERT statements. It's neatly tucked away in the generate scripts option of a database.
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
Via a live example, show how to shrink a transaction log file down to a reasonable size.

650 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