Shifting the Logical Logs
Posted in 2011
A user on IDS 11.50 asked how to move the logical and physical logs to a new dbspace on different disks. Art Kagel advised that the physical log is simple: onparams -p -s <newdbspace> -s <newsize>. For the logical logs, he suggested generating an infrastructure script (dbschema -c, as SQL via the SQL admin API run in sysadmin, or as a shell script of onspaces/onparams commands), editing the dbspace references, and running it. The poster found -c missing in 11.50; Art confirmed it is an 11.70 feature and pointed to myschema --infrastructure=cmd/sql from his utils2_ak package in the IIUG repository. The poster's own plan (add new logs with onparams -a, drop old ones with onparams -d) was essentially correct, though his questions about quiescent mode and restarting went unanswered.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Topics: Storage & Space Management, Logging & Checkpoints
I am using 11.5. I need to shift the logical and physical logs from one dbspace to another. (I am moving them to new physical disks). Can anyone give me any pointers as to how to go about this, especially any gotcha's that I need to be careful of? Many thanks
Moving the physical log is trivial. Just run:
onparams -p -s <newdbspace> -s <newsize>
The logical logs are a little more involved, however, since you are using
11.50, you can use the new dbschema -c feature.
dbschema -c -q >infrastructure_script.sql - generates an SQL script thatuses the SQL API that you can use to recreate your servers disk structures
(dbspaces, chunks, logical and physical logs).
dbschema -c -q -ns >infrastructure_script.sh - generates a shell script todo the same thing using onspaces and onparams commands.
Once you have to script you want, edit it to extract just the section for
the logical log processing (everything from after the physical log to the
end of the file) and edit it to change the dbspace references in the 'add
log' API commands or the onparams -a commandlines. Then just execute the
modified infrastructure_script.sh shell script or run dbaccess sysmaster - <
infrastructure_script.sql
Art
Art S. Kagel
Advanced DataTools (www.advancedatatools.com)
Blog: http://informix-myview.blogspot.com/
Disclaimer: Please keep in mind that my own opinions are my own opinions and
do not reflect on my employer, Advanced DataTools, the IIUG, nor any other
organization with which I am associated either explicitly, implicitly, or by
inference. Neither do those opinions reflect those of other individuals
affiliated with any entity with which I am affiliated nor those of the
entities themselves.
On Tue, Aug 9, 2011 at 4:47 PM, RAY BURNS
<ray.burns@velocityglobal.co.nz>wrote:
> I am using 11.5. I need to shift the logical and physical logs from one
> dbspace to another. (I am moving them to new physical disks). Can anyone
> give
> me any pointers as to how to go about this, especially any gotcha's that I
> need to be careful of?
>
> Many thanks
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--20cf3071c6ee1e77d804aa190bf9
Hi Art,
May be dbaccess sysadmin ... ?
On 8/9/2011 22:14, Art Kagel wrote:
> Moving the physical log is trivial. Just run:
>
> onparams -p -s<newdbspace> -s<newsize>>
> The logical logs are a little more involved, however, since you are using
> 11.50, you can use the new dbschema -c feature.
> dbschema -c -q>infrastructure_script.sql - generates an SQL script that> uses the SQL API that you can use to recreate your servers disk structures
> (dbspaces, chunks, logical and physical logs).
> dbschema -c -q -ns>infrastructure_script.sh - generates a shell script to> do the same thing using onspaces and onparams commands.
>
> Once you have to script you want, edit it to extract just the section for
> the logical log processing (everything from after the physical log to the
> end of the file) and edit it to change the dbspace references in the 'add
> log' API commands or the onparams -a commandlines. Then just execute the
> modified infrastructure_script.sh shell script or run dbaccess sysmaster -<
> infrastructure_script.sql
>
> Art
>
> Art S. Kagel
> Advanced DataTools (www.advancedatatools.com)
> Blog: http://informix-myview.blogspot.com/
>
> Disclaimer: Please keep in mind that my own opinions are my own opinions and
> do not reflect on my employer, Advanced DataTools, the IIUG, nor any other
> organization with which I am associated either explicitly, implicitly, or by
> inference. Neither do those opinions reflect those of other individuals
> affiliated with any entity with which I am affiliated nor those of the
> entities themselves.
>
> On Tue, Aug 9, 2011 at 4:47 PM, RAY BURNS
> <ray.burns@velocityglobal.co.nz>wrote:
>
>> I am using 11.5. I need to shift the logical and physical logs from one
>> dbspace to another. (I am moving them to new physical disks). Can anyone
>> give
>> me any pointers as to how to go about this, especially any gotcha's that I
>> need to be careful of?
>>
>> Many thanks
>>
>>
>>
>>
>
*******************************************************************************
>> Forum Note: Use "Reply" to post a response in the discussion forum.
>>
>>
> --20cf3071c6ee1e77d804aa190bf9
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
Yes, sorry, the API functions have to be run out of sysadmin not sysmaster.
Art
Art S. Kagel
Advanced DataTools (www.advancedatatools.com)
Blog: http://informix-myview.blogspot.com/
Disclaimer: Please keep in mind that my own opinions are my own opinions and
do not reflect on my employer, Advanced DataTools, the IIUG, nor any other
organization with which I am associated either explicitly, implicitly, or by
inference. Neither do those opinions reflect those of other individuals
affiliated with any entity with which I am affiliated nor those of the
entities themselves.
On Wed, Aug 10, 2011 at 3:03 AM, Henri MOUKOURI <h.moukouri@moukouri.net>wrote:
> Hi Art,
>
> May be dbaccess sysadmin ... ?
>
> On 8/9/2011 22:14, Art Kagel wrote:
> > Moving the physical log is trivial. Just run:
> >
> > onparams -p -s<newdbspace> -s<newsize>> >
> > The logical logs are a little more involved, however, since you are using
> > 11.50, you can use the new dbschema -c feature.
> > dbschema -c -q>infrastructure_script.sql - generates an SQL script that> > uses the SQL API that you can use to recreate your servers disk
> structures
> > (dbspaces, chunks, logical and physical logs).
> > dbschema -c -q -ns>infrastructure_script.sh - generates a shell script to> > do the same thing using onspaces and onparams commands.
> >
> > Once you have to script you want, edit it to extract just the section for
> > the logical log processing (everything from after the physical log to the
> > end of the file) and edit it to change the dbspace references in the 'add
> > log' API commands or the onparams -a commandlines. Then just execute the
> > modified infrastructure_script.sh shell script or run dbaccess sysmaster
> -<
> > infrastructure_script.sql
> >
> > Art
> >
> > Art S. Kagel
> > Advanced DataTools (www.advancedatatools.com)
> > Blog: http://informix-myview.blogspot.com/
> >
> > Disclaimer: Please keep in mind that my own opinions are my own opinions
> and
> > do not reflect on my employer, Advanced DataTools, the IIUG, nor any
> other
> > organization with which I am associated either explicitly, implicitly, or
> by
> > inference. Neither do those opinions reflect those of other individuals
> > affiliated with any entity with which I am affiliated nor those of the
> > entities themselves.
> >
> > On Tue, Aug 9, 2011 at 4:47 PM, RAY BURNS
> > <ray.burns@velocityglobal.co.nz>wrote:
> >
> >> I am using 11.5. I need to shift the logical and physical logs from one
> >> dbspace to another. (I am moving them to new physical disks). Can anyone
> >> give
> >> me any pointers as to how to go about this, especially any gotcha's that
> I
> >> need to be careful of?
> >>
> >> Many thanks
> >>
> >>
> >>
> >>
> >
>
>
*******************************************************************************
> >> Forum Note: Use "Reply" to post a response in the discussion forum.
> >>
> >>
> > --20cf3071c6ee1e77d804aa190bf9
> >
> >
> >
>
>
*******************************************************************************
> > Forum Note: Use "Reply" to post a response in the discussion forum.
> >
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--20cf3079bbf8977f4904aa26ea44
Art,
Thanks for your response. Unfortunately I do not appear to have a "-c" option.
I get this :
DBSCHEMA Database Schema UtilityINFORMIX-SQL Version 11.50.FC5WE
USAGE:
dbschema [-q] [-t tabname] [-s user] [-p user] [-r rolename] [-f procname]
[-hd tabname] -d dbname [-w passwd] [-seq sequence] [-l [num]]
[-u [ia] udtname [all]] [-it [Type]] [-ss [-si]] [filename]
[-sl length]
I am definitely running 11.50.FC5WE, but no -c option.
Reading between the lines, I'm guessing I have to create the new dbspace
(onspaces etc), then create new logical logs (onparams -a) in the new dbspace
and then drop all the old logical logs (onparams -d). If so, is this best to
be done in quescient mode? Is it wise to restart the engine afterwards? I plan
to do all this immediately after a level 0 backup.
Yeah, my bad. The -c option is a new 11.70 feature. Myschema supports the
feature for 11.50 though. The commandlines would be:
myschema --infrastructure=cmd infrastructure.sh
-or-
myschema --infrastructure=sql infrastructure.sql
Myschema is included in the package utils2_ak which you can download from
the IIUG Software Repository.
Art
Art S. Kagel
Advanced DataTools (www.advancedatatools.com)
Blog: http://informix-myview.blogspot.com/
Disclaimer: Please keep in mind that my own opinions are my own opinions and
do not reflect on my employer, Advanced DataTools, the IIUG, nor any other
organization with which I am associated either explicitly, implicitly, or by
inference. Neither do those opinions reflect those of other individuals
affiliated with any entity with which I am affiliated nor those of the
entities themselves.
On Wed, Aug 10, 2011 at 3:53 PM, RAY BURNS
<ray.burns@velocityglobal.co.nz>wrote:
> Art,
>
> Thanks for your response. Unfortunately I do not appear to have a "-c"
> option.
> I get this :
>
> DBSCHEMA Database Schema UtilityINFORMIX-SQL Version 11.50.FC5WE
>
> USAGE:
>
> dbschema [-q] [-t tabname] [-s user] [-p user] [-r rolename] [-f procname]
>
> [-hd tabname] -d dbname [-w passwd] [-seq sequence] [-l [num]]
>
> [-u [ia] udtname [all]] [-it [Type]] [-ss [-si]] [filename]
>
> [-sl length]
>
> I am definitely running 11.50.FC5WE, but no -c option.
> Reading between the lines, I'm guessing I have to create the new dbspace
> (onspaces etc), then create new logical logs (onparams -a) in the new
> dbspace
> and then drop all the old logical logs (onparams -d). If so, is this best
> to
> be done in quescient mode? Is it wise to restart the engine afterwards? I
> plan
> to do all this immediately after a level 0 backup.
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--bcaec51b9a497bdf9504aa2ceaf7