here is the script to generate the onspaces statement from an existing =
instance, hope it helps
FILE=3D/tmp/spaces
dbaccess sysmaster <<!
set pdqpriority 0;
select d.name, d.is_temp, d.is_sbspace,c.fname, c.chksize * 2 chksize, c.offset * 2 offset, c.mdsize * 2 mdsize
from sysdbspaces d, syschunks c
where d.dbsnum =3D c.dbsnum and d.name !=3D "rootdbs"
into temp x;
unload to $FILE
select 'onspaces -c ',case when is_sbspace =3D 1
then ' -S '
else ' -d '
end ,
name, '-p', fname, '-o', round(offset,0),
'-s', round(chksize,0),
case when is_temp =3D 1
then ' -t '
else ' '
end ,
case when is_sbspace =3D 1
then ' -g 5 -Ms '
else ' '
end ,
case when is_sbspace =3D 1
then mdsize
else null
end ,
case when is_sbspace =3D 1
then '-Df "LOGGING=3DOFF"'
else ' '
end=20
from x
!
ST=3D$?
if [ $ST -ne 0 ]
then
echo "ERROR: Unable to generate, Status =3D $ST"
exit 2
fi
cat $FILE | sed "s:\\.0::g" | sed "s:|: :g" > $FILE.run
-----Original Message-----
From: owner-informix-list@iiug.org
[mailto:owner-informix-list@iiug.org]On Behalf Of sumGirl
Sent: Thursday, October 14, 2004 6:15 PM
To: informix-list@iiug.org
Subject: script to rebuild dbspaces from onstat -d
I need to duplicate my production environment on a new system. Anyone
know of an easy way to take the output of my onstat -d (or maybe
something else I dont know about) and setup my dbspace structure on
the new system prior to my restore?
sending to informix-list