ONPARAMS on NT
Posted in 2000
A Windows NT admin (IDS 7.30) tried to move the physical/logical logs off rootdbs: first creating a dbspace with onspaces -c -d logsdbs -p e:/logs/logsdbs_dat.000 -s 20000, then onparams -p -s 200000 -d e:/logs/plogs. Both commands just printed the usage/help screen with no error. Respondents identified the mistakes: onspaces on NT requires the -o offset flag (use -o 0 for cooked files), and onparams -d expects the dbspace name (plogs), not a file path. They also noted ONCONFIG's PHYSDBS need not be edited by hand (onparams updates it), that LOGSMAX must be big enough, and that new logical logs require a level-0 backup plus onmode -l/-c before dropping the old ones. The poster had not yet retested, so no confirmed outcome is recorded.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Topics: Storage & Space Management, Server Administration
If I want to move my logs to another locations, shouldn't I be able to do it
like this (while in quiescent mode)?
(create a dbspace to put 'em in)
1.
onspaces -c -d plogs -p e:/logs/plogs_dat.000 -s 200000
(put 'em in the new dbspace)
2.
onparams -p -s 200000 -d e:/logs/plogs -y
and then of course, make appropriate changes in onconfig.ol_informix
If the above is correct what steps could I have left out? If it's wrong,
would someone care to show me where I went wrong (besides dating the wrong
kind of men)?
Thanks,
Wynne
Informix Dynamic Server Version 7.30.TC7
Windows NT SP4
Since you imply that the commands didn't work, please post the error message
you received. Also, see comments below
--
R. Mitchell
"Impy" <wlinden@stritch.edu> wrote in message
news:8sdq4r$jpnei$1@ID-51564.news.cis.dfn.de...
> If I want to move my logs to another locations, shouldn't I be able to do
it
> like this (while in quiescent mode)?
>
> (create a dbspace to put 'em in)
>
> 1.
> onspaces -c -d plogs -p e:/logs/plogs_dat.000 -s 200000>
> (put 'em in the new dbspace)
>
> 2.
> onparams -p -s 200000 -d e:/logs/plogs -yTry using your dbspace name, plogs, rather than the path.
> and then of course, make appropriate changes in onconfig.ol_informix
>
> If the above is correct what steps could I have left out? If it's wrong,
> would someone care to show me where I went wrong (besides dating the wrong
> kind of men)?
HTH
Bob
> Thanks,
> Wynne
>
> Informix Dynamic Server Version 7.30.TC7
> Windows NT SP4
>
>
Thanks for your response and tip. I didn't receive an error message. I was
returned to the help screen of the command, telling me that something is
wrong with my syntax, but not what...
"R. Mitchell" <bmitchell@htscm.com> wrote in message
news:iUMG5.94$BX3.1267@client...
> Since you imply that the commands didn't work, please post the error
message
> you received. Also, see comments below
>
> --
> R. Mitchell
>
> "Impy" <wlinden@stritch.edu> wrote in message
> news:8sdq4r$jpnei$1@ID-51564.news.cis.dfn.de...
> > If I want to move my logs to another locations, shouldn't I be able to
do
> it
> > like this (while in quiescent mode)?
> >
> > (create a dbspace to put 'em in)
> >
> > 1.
> > onspaces -c -d plogs -p e:/logs/plogs_dat.000 -s 200000> >
> > (put 'em in the new dbspace)
> >
> > 2.
> > onparams -p -s 200000 -d e:/logs/plogs -y> Try using your dbspace name, plogs, rather than the path.
> > and then of course, make appropriate changes in onconfig.ol_informix
> >
> > If the above is correct what steps could I have left out? If it's wrong,
> > would someone care to show me where I went wrong (besides dating the
wrong
> > kind of men)?
> HTH
>
> Bob
> > Thanks,
> > Wynne
> >
> > Informix Dynamic Server Version 7.30.TC7
> > Windows NT SP4
> >
> >
>
>
I may be a little dense, but which command failed, onspaces or onparams?
--
R. Mitchell
"Impy" <wlinden@stritch.edu> wrote in message
news:8shlor$kecot$1@ID-51564.news.cis.dfn.de...
> Thanks for your response and tip. I didn't receive an error message. I was
> returned to the help screen of the command, telling me that something is
> wrong with my syntax, but not what...
>
> "R. Mitchell" <bmitchell@htscm.com> wrote in message
> news:iUMG5.94$BX3.1267@client...
> > Since you imply that the commands didn't work, please post the error
> message
> > you received. Also, see comments below
> >
> > --
> > R. Mitchell
> >
> > "Impy" <wlinden@stritch.edu> wrote in message
> > news:8sdq4r$jpnei$1@ID-51564.news.cis.dfn.de...
> > > If I want to move my logs to another locations, shouldn't I be able to
> do
> > it
> > > like this (while in quiescent mode)?
> > >
> > > (create a dbspace to put 'em in)
> > >
> > > 1.
> > > onspaces -c -d plogs -p e:/logs/plogs_dat.000 -s 200000> > >
> > > (put 'em in the new dbspace)
> > >
> > > 2.
> > > onparams -p -s 200000 -d e:/logs/plogs -y> > Try using your dbspace name, plogs, rather than the path.
>
>
> > > and then of course, make appropriate changes in onconfig.ol_informix
> > >
> > > If the above is correct what steps could I have left out? If it's
wrong,
> > > would someone care to show me where I went wrong (besides dating the
> wrong
> > > kind of men)?
> > HTH
> >
> > Bob
> > > Thanks,
> > > Wynne
> > >
> > > Informix Dynamic Server Version 7.30.TC7
> > > Windows NT SP4
> > >
> > >
> >
> >
>
>
You're not dense, I'm was trying to hard to make a long story - short . I
wrote out my initial request for help about 20 times before I finally sent
it. I edited out too many details, obviously.
Part I
Ok, first I tried creating a dbspace.
I went to the e: drive, using a korn shell, I created a directory called
logs
next, using the touch command I created a file called logsdbs_dat.000
I could see in the logs directory that there was now a 0 byte file with the
name logsdbs_dat.000
Then I went back to the d: drive where my original db and logs are located.
I then typed in: onspaces -c -d logsdbs -p e:/logs/logsdbs_dat.000 -s 20000
This returned the, now infamous, help screen for onspaces.
Part II
Frustrated, I went back to the e: drive to look at the file I had created
with touch command and noticed that someone (by the date of the file, my
predecessor) had already created what appeared to be a dbspace named
plogs_dat.000
So, I thought, what the heck, I don't have anything to lose, I have a fresh
a backup, why don't I just try using _that_ dbspace to see if I can get
onparams to move my logs:
onparams -p -s 200000 -d e:/logs/plogs -y
My onparams attempts didn't work either (no error message either just a
helpful help screen). That is why I included my onparams command in my
original message . Maybe it just wasn't a valid dbspace or maybe I had the
syntax wrong but if I had the syntax wrong I wanted to know now. See my
conclusion for the reason.
Conclusion:
Since I'm only allowed to take the system off line for regular maintenance
(and screwing it up) once a week, I didn't want to come here ask about
onspaces, apply what I learned this week only to find out that I would have
to wait yet another week to figure out what I did wrong with onparams. Did
that make any sense?
Thanks!
And by the way, on your comment...about not using the drive letter. I feel
silly asking this but does informix "sense" dbspaces regardless of the
location? I ask because the db is on the d drive and I was trying to move
the logs to the e drive.
"R. Mitchell" <bmitchell@htscm.com> wrote in message
news:aQ_G5.28$dO4.416@client...
> I may be a little dense, but which command failed, onspaces or onparams?
>
> --
> R. Mitchell
>
> "Impy" <wlinden@stritch.edu> wrote in message
> news:8shlor$kecot$1@ID-51564.news.cis.dfn.de...
> > Thanks for your response and tip. I didn't receive an error message. I
was
> > returned to the help screen of the command, telling me that something is
> > wrong with my syntax, but not what...
> >
> > "R. Mitchell" <bmitchell@htscm.com> wrote in message
> > news:iUMG5.94$BX3.1267@client...
> > > Since you imply that the commands didn't work, please post the error
> > message
> > > you received. Also, see comments below
> > >
> > > --
> > > R. Mitchell
> > >
> > > "Impy" <wlinden@stritch.edu> wrote in message
> > > news:8sdq4r$jpnei$1@ID-51564.news.cis.dfn.de...
> > > > If I want to move my logs to another locations, shouldn't I be able
to
> > do
> > > it
> > > > like this (while in quiescent mode)?
> > > >
> > > > (create a dbspace to put 'em in)
> > > >
> > > > 1.
> > > > onspaces -c -d plogs -p e:/logs/plogs_dat.000 -s 200000> > > >
> > > > (put 'em in the new dbspace)
> > > >
> > > > 2.
> > > > onparams -p -s 200000 -d e:/logs/plogs -y> > > Try using your dbspace name, plogs, rather than the path.
> >
> >
> > > > and then of course, make appropriate changes in onconfig.ol_informix
> > > >
> > > > If the above is correct what steps could I have left out? If it's
> wrong,
> > > > would someone care to show me where I went wrong (besides dating the
> > wrong
> > > > kind of men)?
> > > HTH
> > >
> > > Bob
> > > > Thanks,
> > > > Wynne
> > > >
> > > > Informix Dynamic Server Version 7.30.TC7
> > > > Windows NT SP4
> > > >
> > > >
> > >
> > >
> >
> >
>
>
> > onparams -p -s 200000 -d e:/logs/plogs -y> Try using your dbspace name, plogs, rather than the path.
Bob,
Does this apply to NT? I ask because the example I followed from the Admin
IDS for NT book showed the path as well. Thanks.
> HTH
> Bob
> > Informix Dynamic Server Version 7.30.TC7
> > Windows NT SP4
I think you need the -o option on the onspaces. Add -o 0 at the end as
shown below. Also in NT I think your file path should be
e:\\logs\\plogs_dat.000 as shown below.
onspaces -c -d plogs -p e:\\logs\\plogs_dat.000 -s 200000 -o 0
When you move the physical and logical logs you do not need or want to
modify ONCONFIG, you do want to make sure the LOGSMAX parameter is
sufficient for the number of logical logs you plan to have.
Once you have added the logical logs you need to run a level 0 backup to
mark them as free, might be a couple of options here you also need to bump
the logs up using onmode -l and force a check point onmode -c until you are
into the new logs. You can then delete the old logs from rootdbs. The
Informix manual has good info on this as I recall.
Dave
Impy <wlinden@stritch.edu> wrote in message
news:8sdq4r$jpnei$1@ID-51564.news.cis.dfn.de...
> If I want to move my logs to another locations, shouldn't I be able to do
it
> like this (while in quiescent mode)?
>
> (create a dbspace to put 'em in)
>
> 1.
> onspaces -c -d plogs -p e:/logs/plogs_dat.000 -s 200000>
> (put 'em in the new dbspace)
>
> 2.
> onparams -p -s 200000 -d e:/logs/plogs -y>
> and then of course, make appropriate changes in onconfig.ol_informix
>
> If the above is correct what steps could I have left out? If it's wrong,
> would someone care to show me where I went wrong (besides dating the wrong
> kind of men)?
>
> Thanks,
> Wynne
>
> Informix Dynamic Server Version 7.30.TC7
> Windows NT SP4
>
>
"David Bader" <baderd@home.com> wrote in message
news:lmkH5.5770$d5.84990@news1.sttls1.wa.home.com...
> I think you need the -o option on the onspaces. Add -o 0 at the end as
> shown below. Also in NT I think your file path should be
> e:\\logs\\plogs_dat.000 as shown below.
Following the example in the manual, I used a korn shell and I believe the
forward slashes are correct under those cirumstances. I think leaving off
the -o is where I went wrong though. I thought I had the option to leave it
off if I was using the default of 0. Thanks.
> onspaces -c -d plogs -p e:\\logs\\plogs_dat.000 -s 200000 -o 0>
> When you move the physical and logical logs you do not need or want to
> modify ONCONFIG, you do want to make sure the LOGSMAX parameter is
> sufficient for the number of logical logs you plan to have.
huh? I have a line in the onconfig file that says
# Physical Log Configuration
PHYSDBS rootdbs # Location (dbspace) of physical log
Are you saying after I move the phyiscal log I don't need to correct this
line?
> Once you have added the logical logs you need to run a level 0 backup to
> mark them as free, might be a couple of options here you also need to bump
> the logs up using onmode -l and force a check point onmode -c until you
are
> into the new logs. You can then delete the old logs from rootdbs. The
> Informix manual has good info on this as I recall.
Thanks, I hadn't got that far yet since I couldn't get past onspaces.
Replies included below.
Impy <wlinden@stritch.edu> wrote in message
news:8skk9m$ks1r7$1@ID-51564.news.cis.dfn.de...
>
> "David Bader" <baderd@home.com> wrote in message
> news:lmkH5.5770$d5.84990@news1.sttls1.wa.home.com...
> > I think you need the -o option on the onspaces. Add -o 0 at the end as
> > shown below. Also in NT I think your file path should be
> > e:\\logs\\plogs_dat.000 as shown below.
>
> Following the example in the manual, I used a korn shell and I believe the
> forward slashes are correct under those cirumstances. I think leaving off
> the -o is where I went wrong though. I thought I had the option to leave
it
> off if I was using the default of 0. Thanks.
>
> > onspaces -c -d plogs -p e:\\logs\\plogs_dat.000 -s 200000 -o 0> >
> > When you move the physical and logical logs you do not need or want to
> > modify ONCONFIG, you do want to make sure the LOGSMAX parameter is
> > sufficient for the number of logical logs you plan to have.
>
> huh? I have a line in the onconfig file that says
>
> # Physical Log Configuration
> PHYSDBS rootdbs # Location (dbspace) of physical log
>
> Are you saying after I move the phyiscal log I don't need to correct this
> line?
>
You do not need to modify this. The onparams command will take care of it.
>
> > Once you have added the logical logs you need to run a level 0 backup to
> > mark them as free, might be a couple of options here you also need to
bump
> > the logs up using onmode -l and force a check point onmode -c until you
> are
> > into the new logs. You can then delete the old logs from rootdbs. The
> > Informix manual has good info on this as I recall.
>
> Thanks, I hadn't got that far yet since I couldn't get past onspaces.
>
The first few times I had to do this it was a little bit of a pain, just
getting it right. When I followed the directions correctly it worked as it
should. Good luck..
Dave
>
>
>
The details turned out to be very important, and your reasons do make sense.
By the way, my comments are based on my own trial-and-error experiences
using IDS on NT 4.0. If anything I say is incorrect, I hope some of our
colleagues will jump in and correct me.
I have never been able to create a dbspace on NT without including the -o
(Offset) parameter. Since I have been using cooked files, the offset is
always 0, but still has been necessary. Adding that into your command gives
you: onspaces -c -d logsdbs -p e:/logs/logsdbs_dat.000 -o 0 -s 20000. If
you still get an error, try using the "MS-DOS name" (8.3) for your file in
the -p parameter. (Also, I have always used the "\\" instead of "/" for NT
paths. Don't even know if it makes a difference.)
As far as your question regarding Informix "sensing" dbspaces, when you
issue the command to create a new dbspace, you are giving the space a name
and linking that name to a file or raw partition. The -p (PATH) parameter
identifies the path and filename of the first chunk of the new dbspace. If
you run the onstat -d command, the first portion lists the dbspaces by
number and name and the number of chunks in the dbspace, the second portion
lists the chunks by chunk number, dbspace number the chunk belongs to, and
path and filename of the chunk. So Informix doesn't "sense" the location, it
specifically tracks it by name. If you add chunks to the dbspace, those
links are also stored by the engine.
HTH
--
R. Mitchell
"Impy" <wlinden@stritch.edu> wrote in message
news:8si8jk$k102p$1@ID-51564.news.cis.dfn.de...
> You're not dense, I'm was trying to hard to make a long story - short . I
> wrote out my initial request for help about 20 times before I finally sent
> it. I edited out too many details, obviously.
>
> Part I
> Ok, first I tried creating a dbspace.
> I went to the e: drive, using a korn shell, I created a directory called
> logs
> next, using the touch command I created a file called logsdbs_dat.000
> I could see in the logs directory that there was now a 0 byte file with
the
> name logsdbs_dat.000
> Then I went back to the d: drive where my original db and logs are
located.
> I then typed in: onspaces -c -d logsdbs -p e:/logs/logsdbs_dat.000 -s
20000
>
> This returned the, now infamous, help screen for onspaces.
> Part II
> Frustrated, I went back to the e: drive to look at the file I had created
> with touch command and noticed that someone (by the date of the file, my
> predecessor) had already created what appeared to be a dbspace named
> plogs_dat.000
>
> So, I thought, what the heck, I don't have anything to lose, I have a
fresh
> a backup, why don't I just try using _that_ dbspace to see if I can get
> onparams to move my logs:
> onparams -p -s 200000 -d e:/logs/plogs -y>
> My onparams attempts didn't work either (no error message either just a
> helpful help screen). That is why I included my onparams command in my
> original message . Maybe it just wasn't a valid dbspace or maybe I had the
> syntax wrong but if I had the syntax wrong I wanted to know now. See my
> conclusion for the reason.
> Conclusion:
> Since I'm only allowed to take the system off line for regular maintenance
> (and screwing it up) once a week, I didn't want to come here ask about
> onspaces, apply what I learned this week only to find out that I would
have
> to wait yet another week to figure out what I did wrong with onparams. Did
> that make any sense?
>
> Thanks!
>
> And by the way, on your comment...about not using the drive letter. I feel
> silly asking this but does informix "sense" dbspaces regardless of the
> location? I ask because the db is on the d drive and I was trying to move
> the logs to the e drive.
>
Related threads
- Spam from "me"
- Re: Informix DBA Opportunity
- Re: Spam from "me"
- RE: Informix free
- Re: Gil Figueroa, Keynote Speaker