Re: The newbie rolls along
- From: "GWood" <sorry@xxxxxxxxxxx>
- Date: Fri, 19 May 2006 18:12:01 GMT
Thanks Mark
Can I assume these calls don't require a database restart to recognize the
changes?
"Mark A. Parsons" <user@xxxxxxxxxxx> wrote in message
news:F%8bg.173919$7a.68579@xxxxxxxxxxx
To 'grow' the transaction log you have a couple options:some
1 - add a new chunk of disk space to the database (alter database) as
log-only space; problem with this is that, officially, you cannot shrink a
database (ie, you can't drop that chunk of disk from the database after
you're done with it)
2 - use 'sp_extendsegment' to grow the logsegment onto a disk fragment
currently used for data (assumes you actually have a data segment with
extra/free room), do your data modification thang, then runmoved
'sp_dropsegment' to remove the logsegment from that disk fragment; the log
will continue to use space on that disk fragment until a) the log has
back onto one of the old fragments and b) the log has beenpretty
truncated/cleared from that temporary disk fragment
GWood wrote:
Well, for two weeks of intense self-education, the progress has been
ingood. The code I am writing spins through all tables in all databases
onour particular server, and seems to generate and execute DML correctly
tothe desired tables. The version is 11.9.2
The current problem is one of transaction logs. There are about 70
databases in this installation (vendor package), and each database seems
tableshave a different sized transation log. My code is able to process table
rows in chunks by checking a "master" table, but some of the database
tablehave large numbers of associated rows even with the most restrictive
criteria. The transaction logs in some of these databases seems tiny!
To help understand the issue, consider that I have a KEYLIST table that
contains the key values for all the rows to be removed from an INVOICE
identifier on(names are for illustration only). The KEYLIST table has a row
init, so I can process the INVOICE table in a loop, such as
Loop
Delete from INVOICE where EXISTS
( select KEYLIST.keyval
FROM KEYLIST where KEYLIST.keyval = INVOICE.keyval
and KEYLIST row_identifier between n1 and n2)
Adjust n1 and n2
end Loop
I am adjusting n1 and n2 within reason to try to avoid busting the log
files. I keep the span as large as possible since there are 80K+ rows
n1+10.KEYLIST, and I have a limited time window for this code to execute (data
conversion schedule - sigh).
I have found one "INVOICE" table that will impact 90K rows when n2 is
factor,So I'm getting close to having to process row by row. With the time
thatI'm looking for alternatives.
So, my question is: Can I programatically adjust the log file size as I
start to process in each database? I would bump the log size up for the
duraction of my processing, then restore it after the final commit for
database.
Any ideas appreciated.
Gary
.
- Follow-Ups:
- Re: The newbie rolls along
- From: Mark A. Parsons
- Re: The newbie rolls along
- References:
- The newbie rolls along
- From: GWood
- Re: The newbie rolls along
- From: Mark A. Parsons
- The newbie rolls along
- Prev by Date: Re: How to confirm a dataserver has is running !
- Next by Date: Re: The newbie rolls along
- Previous by thread: Re: The newbie rolls along
- Next by thread: Re: The newbie rolls along
- Index(es):
Relevant Pages
|
|