MicroStation V8i Key-in: difference between DBCONMGR and ACTIVE DATABASE?

Hi Experts,

When I attempted to connect to Oracle database, I tried two different Key-in commands

-- DBCONMGR Oracle username/password@dbserver

-- ACTIVE DATABASE username/password@dbserver

Seems to me they both work. Anybody know what is the difference (outcomes, dependencies, etc.) between these two commands?

I believe there must be some difference on some aspect, such as the outcome, and their dependencies. Otherwise MicroStation doesn't need to provide two different ways.

Thank you!

Sui

  • I am hoping that the DB connection and Key-ins didn't change

    MicroStation tends to be pretty stable as the years creep past.  There are many legacy curiosities, including key-ins, that remain to support ways of working than have been surpassed by newer technologies.

     
    Regards, Jon Summers
    LA Solutions

  • Hi Jon, thank you for the information of the -wd switch and configuration.

    For Allan Brown's 2001 post, I am not taking the whole to find an answer. Instead I just tried to take infromation fromt the comments in the key-in, assuming the Key-ins commands works in the same way for different contexts (basic, C#, MicroStation UI, etc.), and it inspired me to find the oracle.cfg file.

    The reason I am trying to check the difference between DBCONMGR and ACTIVE DATABASE was because I am looking at an existing project (under V8i SS4) that using both ways to connect to database, and try to figure why it was done in two different ways in two places.

    A things that is not 100% matching my question is, as you mentioned, the post was in 2001, so I am hoping that the DB connection and Key-ins didn't change in V8i for this part...

    Thank you.

    Sui

  • In Google I found this page that gave me a clue

    That post is rather old: it looks like it dates from 2001.   wrote those comments: he was Bentley's DB guru; I don't know if he's still around or who fulfills that role these days.

    Those comments were intended to help someone writing MicroStation BASIC, which had no intrinsic DB capability.  If you don't need to change databases during a MicroStation session, you can specify the -wd switch when you start MicroStation. 

    The -wd switch directs MicroStation to load a configuration file that in turn loads the related DB driver.  That's one of the *.cfg files you've found in folder ..\MicroStation\config\database.

    If only one person is using a DB, then you could put that switch in their user configuration file (*.ucf).  If people in a particular project are using it, then add the switch to a project configuration file (*.pcf).  If everybody uses a DB connection, then add the switch to a site or organisation configuration (*.cfg) file.

     
    Regards, Jon Summers
    LA Solutions

  • Hi Jon, I checked around the MicroStation help document again but still cannot find reference about their difference, even though I know how to use them to connection to database. I understand it must be historical reason for these syntax to be there, but still want to distinguish them to understand when to use what.

    In Google I found this page that gave me a clue. https://groups.google.com/forum/#!msg/comp.cad.microstation/5UYWCsqeNgI/1cXGgvwdQhYJ

    Part of the description in a post of this page is:

    To connect to an Access database execute the following key-ins:
    mdl load dbconmgr              <= load the database connection manager
    dbconmgr odbc                  <= tell it what configuration file to
    load
    db=<your_datasource_name>      <= connect to the database

    To connect back to the oracle database do:
    mdl load dbconmgr              <= make sure the dbconmgr is loaded
    dbconmgr oracle                <= load the oracle configuration file
    db=user/password@dbname        <= pass the connection string to the
    oracle db.

    I cannot verify the correctness of the comments in this post, but assume it is correct. With this post together some checking in MicroStation file system, the differences I tell is:

    -- the DBCONMGR command is a MicroStation tool to manage database connections. It can be used to load different database configuration files. "DBCONMGR Oracle..." means it is using the ...\MicroStation\config\database\oracle.cfg file. The "Oracle" can also be replaced with odbc/oledb/budbc for difference technologies.

    -- the "ACTIVE DATABASE" is only for taking the database credential and do the connection, but do not select the underlying technology.

    As a summary, "ACTIVE DATABASE"'s behavior depends on the technology context selected by "DBCONMGR".

    Is my summary correct? Did I miss anything?

    Thank you!

    Sui

  • When I attempted to connect to Oracle database, I tried two different Key-in commands: seems to me they both work

    There's quite a bit about database connections in MicroStation help.

    MicroStation has been around for several decades (see the History of MicroStation).  The DB interface started as a rather clunky affair in IGDS and has evolved to use Microsoft's later technology (OLE-DB etc).  Probably some key-ins are supported for legacy purposes, even if they seem redundant these days.

     
    Regards, Jon Summers
    LA Solutions