?
Solved

detach & reattach error logs?

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

Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

Question has a verified solution.

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

Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
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.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…
Suggested Courses

752 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