two dbspaces, the same database name
Posted in 2000
Topics: Storage & Space Management
Hello, I have one question, for example, I have two dbspaces, 1st name is "dbspaces1", it has a database called "sales_store", 2nd name is "dbspaces2", it has a database called "sales_store". The 2 database has different database , but the database has the same name. Which command I must use to swicth to different dbspace, or which enviroment name must to be set? Thanks for your help.
You ran into an Informix bug. You simply cannot create databases with same name even if it is in different dbspaces. In article <8u6cbq$34e2@imsp212.netvigator.com>, <tfhkcyt2000@taifuji.com> wrote: > Hello, > > I have one question, for example, I have two dbspaces, > 1st name is "dbspaces1", it has a database called "sales_store", > 2nd name is "dbspaces2", it has a database called "sales_store". > > The 2 database has different database , but the database has the > same name. > > Which command I must use to swicth to different dbspace, > or which enviroment name must to be set? > > Thanks for your help. > > Sent via Deja.com http://www.deja.com/ Before you buy.
Assuming you mean two instances of informix (you wouldn't be able to create
two databases with the same name in a single instance). You'll then have two
INFORMIXSERVER settings
setenv INFORMIXSERVER=dbspaces1and
setenv INFORMIXSERVER=dbspaces2
and their appropriate entries in sqlhosts, and /etc/services if you use socs
as well.
Then when you run up dbaccess or isql or whatever, you will have exported
the appropriate variable in your environment.
In an sql or 4gl session, you would issue the command
database sales_store@dbspaces1
or
database sales_store@dbspaces2
But of course you would use a better INFORMIXSERVER name, such as testshm
and liveshm, or somesuch.
Malc
<tfhkcyt2000@taifuji.com> wrote in message
news:8u6cbq$34e2@imsp212.netvigator.com...
> Hello,
>
> I have one question, for example, I have two dbspaces,
> 1st name is "dbspaces1", it has a database called "sales_store",
> 2nd name is "dbspaces2", it has a database called "sales_store".
>
> The 2 database has different database , but the database has the
> same name.
>
> Which command I must use to swicth to different dbspace,
> or which enviroment name must to be set?
>
> Thanks for your help.
>
>