storesdemo
Posted in 2017
A new 12.10 user ran dbaccessdemo and asked where the stores demo database landed. Answer: it goes into the rootdbs by default unless you pass -dbspace <name>. To move it, he just needed to drop the database and re-run the script, but the drop appeared to do nothing in DB-Access — because you can't drop the database you're currently connected to (and the error on the bottom line can be hidden by terminal settings); connect to sysmaster first. He resolved it with 'dbaccessdemo storesdemo -log -dbspace datadbs'. A later post warned to always specify the server (e.g. dbaccess sysmaster@myinstance) when dropping databases.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Topics: Installation, Setup & Upgrades, Storage & Space Management, Server Administration
Hi, I'm still trying to connect a few dots here... I just installed 12.10.FC9. I ran dbaccessdemo, and it created the demo database. Where does this get stored? Does it automatically find my datadbs chunk?
original post:
Hi, I'm still trying to connect a few dots here...
I just installed 12.10.FC9.
I ran dbaccessdemo, and it created the demo database.
Where does this get stored? Does it automatically find my datadbs chunk?
Response:
If you don''t give dbaccessdemo the flag to tell it which dbspace you want to
use (which then modifies the create database syntax generated by the script),
it should default to the root dbspace. You can see that if you look up the
create database syntax in the online documentation.
Jacques Renaut
HCL Informix Support
By default, this will be created in the rootdbs. But you can override this by passing the dbaccessdemo script the parameter: -dbspace <dbspacename> -----Original Message----- From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of BENJI LONG Sent: Wednesday, November 15, 2017 9:32 AM To: ids@iiug.org Subject: storesdemo [40196] Hi, I'm still trying to connect a few dots here... I just installed 12.10.FC9. I ran dbaccessdemo, and it created the demo database. Where does this get stored? Does it automatically find my datadbs chunk? **************************************************************************** *** Forum Note: Use "Reply" to post a response in the discussion forum.
ok, thanks for the replies guys. I think I have a dbaccess document. I'll take
a browse through that.
Hi, if I want to delete it all out of the rootdbs, and put it in my datadbs,
do I just drop the database in the dbaccess menu, or is there more to it than
that?
ie, I know it created a database, but did it load other files when I typed
dbaccess?
Just dropping the database is sufficient.
On Wed, Nov 15, 2017 at 10:09 AM, BENJI LONG <ruggedmouse@hotmail.com>
wrote:
> Hi, if I want to delete it all out of the rootdbs, and put it in my
> datadbs,
> do I just drop the database in the dbaccess menu, or is there more to it
> than
> that?
>
> ie, I know it created a database, but did it load other files when I typed
> dbaccess?
>
>
> ************************************************************
> *******************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--
Jonathan Leffler <jonathan.leffler@gmail.com> #include <disclaimer.h>
Guardian of DBD::Informix - v2015.1101 - http://dbi.perl.org
"Blessed are we who can laugh at ourselves, for we shall never cease to be
amused."
Hi, for some reason, it will not drop.
I typed dbaccess and then database>Select>highlighted the database name>hit
enter, and highlight Drop, hit enter, and it asks me for confirmation. I
choose y and hit enter, and it doesn't do anything.
I got it. I think I had selected the database, and it wouldn't let me drop it, and so I just chose drop first, and then got it...at least that is what I think it was doing.
If the database won't drop via the menu, drop it via the SQL command
language.
Make sure you have no database selected, or some other database than the
one you're trying to drop selected.
DROP DATABASE victim;
That should drop it. Or, if you like shell hacks, then:
dbaccess - - <<'EOF'
DROP DATABASE victim;EOF
If you have the database as the current database when you try to drop it,
it may fail to drop. I'd be willing to accept an argument that such
behaviour is a bug; DB-Access should note that it is trying to drop a
database that is currently open and close the current database before
dropping it.
On Wed, Nov 15, 2017 at 10:24 AM, BENJI LONG <ruggedmouse@hotmail.com>
wrote:
> Hi, for some reason, it will not drop.
> I typed dbaccess and then database>Select>highlighted the database name>hit
> enter, and highlight Drop, hit enter, and it asks me for confirmation. I
> choose y and hit enter, and it doesn't do anything.
>
>
> ************************************************************
> *******************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--
Jonathan Leffler <jonathan.leffler@gmail.com> #include <disclaimer.h>
Guardian of DBD::Informix - v2015.1101 - http://dbi.perl.org
"Blessed are we who can laugh at ourselves, for we shall never cease to be
amused."
Ships passing in the night ⦠I just sent an email suggesting that 'current database' might be the problem. There should either be a coherent error message ('Cannot drop database "whatever"; it is currently in use by some process' or equivalent), or the operation should succeed. You shouldn't get silent, unexplained failure. On Wed, Nov 15, 2017 at 10:33 AM, BENJI LONG <ruggedmouse@hotmail.com> wrote: > I got it. I think I had selected the database, and it wouldn't let me drop > it, > and so I just chose drop first, and then got it...at least that is what I > think it was doing. > > > ************************************************************ > ******************* > Forum Note: Use "Reply" to post a response in the discussion forum. > > -- Jonathan Leffler <jonathan.leffler@gmail.com> #include <disclaimer.h> Guardian of DBD::Informix - v2015.1101 - http://dbi.perl.org "Blessed are we who can laugh at ourselves, for we shall never cease to be amused."
Make sure that you are not connected to storesdemo in the current session or
from anywhere else.
Sent from my HTC
----- Reply message -----
From: "BENJI LONG" <ruggedmouse@hotmail.com>
To: <ids@iiug.org>
Subject: storesdemo [40202]
Date: Wed, Nov 15, 2017 11:24
Hi, for some reason, it will not drop.
I typed dbaccess and then database>Select>highlighted the database name>hit
enter, and highlight Drop, hit enter, and it asks me for confirmation. I
choose y and hit enter, and it doesn't do anything.
*******************************************************************************
Forum Note: Use "Reply" to post a response in the discussion forum.
Where does the error display? I'm not seeing that.
Certain terminal configurations can hide the error message which is shown on the bottom line. In any case you can't the database to which you are connected. Connect to to sysmaster and try again. Additionaly... the script will drp the existent database before creating it again... you can just run it again with the parameter to specify the dbspace. Regards On Nov 15, 2017 7:16 PM, "BENJI LONG" <ruggedmouse@hotmail.com> wrote: > Where does the error display? I'm not seeing that. > > > ************************************************************ > ******************* > Forum Note: Use "Reply" to post a response in the discussion forum. > >
see new AUTOLOCATE configuration parameter - in docs as well as in your onconfig.
Hi I got it to work with this code:
dbaccessdemo storesdemo log dbspace datadbs
I had a look at database>info in dbaccess, and it shows it in one chunk on
datadbs.
Thanks for all the help on this.
NO! NO! NO! Dangerous advice!
echo "DROP DATABASE victim;" | dbaccess sysmaster@myinstance
Never rely on $INFORMIXSERVER pointing to the right server when dropping
databases unless in a play environment e.g personal laptop vm!
PS Had to check the sysdbopen could not make you switch databases before I
wrote this!
Regards,
David.
> On 15 November 2017 at 18:37 Jonathan Leffler <jonathan.leffler@gmail.com>
wrote:
>
>
> If the database won't drop via the menu, drop it via the SQL command
> language.
>
> Make sure you have no database selected, or some other database than the
> one you're trying to drop selected.
>
> DROP DATABASE victim;>
> That should drop it. Or, if you like shell hacks, then:
>
> dbaccess - - <<'EOF'
> DROP DATABASE victim;> EOF
>
> If you have the database as the current database when you try to drop it,
> it may fail to drop. I'd be willing to accept an argument that such
> behaviour is a bug; DB-Access should note that it is trying to drop a
> database that is currently open and close the current database before
> dropping it.
>
> On Wed, Nov 15, 2017 at 10:24 AM, BENJI LONG <ruggedmouse@hotmail.com>
> wrote:
>
> > Hi, for some reason, it will not drop.
> > I typed dbaccess and then database>Select>highlighted the database name>hit
> > enter, and highlight Drop, hit enter, and it asks me for confirmation. I
> > choose y and hit enter, and it doesn't do anything.
> >
> >
> > ************************************************************
> > *******************
> > Forum Note: Use "Reply" to post a response in the discussion forum.
> >
> >
>
> --
> Jonathan Leffler <jonathan.leffler@gmail.com> #include <disclaimer.h>
> Guardian of DBD::Informix - v2015.1101 - http://dbi.perl.org
> "Blessed are we who can laugh at ourselves, for we shall never cease to be
> amused."
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>