Dbspace script
Posted in 2007
Topics: Storage & Space Management, Server Administration
Hi,
Is there a script or utility that can review your current layout of dbspaces
and then create a script of "onspaces" commands to duplicate the
environment?
I'm sure one of Art's utilities - or someone else - has that ability
at the IIUG downloadable tools area.
Bob Roussey
Unix / Informix Administration
Spirit Airlines
Robert.Roussey@SpiritAir.com
-----Original Message-----
From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of
Demeis, Tony (MOH)
Sent: Tuesday, March 20, 2007 8:06 AM
To: ids@iiug.org
Subject: Dbspace script [8680]
Hi,
Is there a script or utility that can review your current layout of
dbspaces
and then create a script of "onspaces" commands to duplicate the
environment?
Please visit
http://www.iiug.org/software/index_DBA.html
and search for dup_spaces . I think you are searching for this script
only.
Thanks,
Amitava
"Demeis, Tony (MOH)" <Tony.Demeis@moh.gov.on.ca>
Sent by: ids-bounces@iiug.org
20/03/2007 17:36
Please respond to
ids@iiug.org
To
ids@iiug.org
cc
Subject
Dbspace script [8680]
Hi,
Is there a script or utility that can review your current layout of
dbspaces
and then create a script of "onspaces" commands to duplicate the
environment?
*******************************************************************************
Forum Note: Use "Reply" to post a response in the discussion forum.
Hi,
I use the following query:
unload to "/tmp/mkspaces.sh" delimiter ";"
select "onspaces -c -d " || trim(d.name)
|| case when is_temp = 1 then " -t " else " " end
|| " -p " || trim(c.fname)
|| " -o " || c.offset * 2 || " -s " || c.chksize * 2
from sysdbspaces d, syschunks c
where d.fchunk = c.chknum
and d.is_blobspace = 0
and d.is_sbspace = 0
and d.dbsnum > 1
union all
select "onspaces -a " || trim(d.name)
|| " -p " || trim(c.fname)
|| " -o " || c.offset * 2 || " -s " || c.chksize * 2
from sysdbspaces d, syschunks c
where d.dbsnum = c.dbsnum
and d.nchunks > 1
and d.fchunk <> c.chknum
and d.is_blobspace = 0
and d.is_sbspace = 0;
You should change the name of the output file in the first line.
This has not been updated to include the page size spec, nor does it cover
blobspaces. I don't think that would be terribly hard to accomplish
however.
Cheers,
Dick Snoke
IBM Software Group - ChannelWorks
dsnoke@us.ibm.com
(404) 487-1595
"Demeis, Tony (MOH)" <Tony.Demeis@moh.gov.on.ca>
Sent by: ids-bounces@iiug.org
03/20/2007 08:06 AM
Please respond to
ids@iiug.org
To
ids@iiug.org
cc
Subject
Dbspace script [8680]
Hi,
Is there a script or utility that can review your current layout of
dbspaces
and then create a script of "onspaces" commands to duplicate the
environment?
*******************************************************************************
Forum Note: Use "Reply" to post a response in the discussion forum.
I had written one long time back .. It used to work with 7.x and 9.x ..=
its
not been tested against 10 or 11.
HTH
(See attached file: create_onspaces.ksh)
Thanx much,
Rajib Sarkar
Sr. Technical Analyst
DB2 UDB RPD Team
IBM Data Management Group
http://www.ibm.com/software/data/db2/udb/support/
From his neck down a man is worth a couple of dollars a day, from his n=
eck
up he is worth anything that his brain can produce. -- T. Edison
=
From: "Demeis, Tony (MOH)" <Tony.Demeis@moh.gov.on.ca> =
=
To: ids@iiug.org =
=
Date: 03/20/2007 05:07 AM =
=
Subject: Dbspace script [8680] =
=
Hi,
Is there a script or utility that can review your current layout of
dbspaces
and then create a script of "onspaces" commands to duplicate the
environment?
***********************************************************************=
********
Forum Note: Use "Reply" to post a response in the discussion forum.
=