Plex 2E

  • 1.  Environments in Run Time

    Posted Nov 12, 2015 10:47 AM

    Good afternoon,

    I have the next case: In SQL Server is possible use more than one Environment in the run time, for example, there are 3 companies which use common files that are on Environment and they also have own files which are in another Environment. Can we run the system using more than one Environment?

     

    We are using SQL Server and Plex 7.00. we must change the ini?

     

    In AS400 we are using JOBD. We appreciate your support, thank you.

     

    Thank you.



  • 2.  Re: Environments in Run Time
    Best Answer

    Posted Nov 12, 2015 05:55 PM

    Hi Rolofg -

     

    If I understand the problem correctly you need to access 2 different databases from the same Plex Environment. One connection for the common files and another one to the company database. Then you will have an Environment per company. 

     

    You need to define two logical DB Connections: one for the common files, one for the company files using the triples TBL DB connection NME and VIW DB connection NME. 

     

    All common tables and views point let's say to  "CommonResources" , all company tables to "CompanyResources".

     

    I assume you have a Plex .Net Server installed. Configuration would be something like :

     

    configdb.jpg

     

    HTH

     

    Lorenz



  • 3.  Re: Environments in Run Time

    Posted Nov 16, 2015 01:30 PM

    Hello Lorenz, thanks for your answer. Your answer is very helpful. I never used the Plex.Net Server but I have installed the Plex.Net Server. I go to test with your indications. I inform you the results.



  • 4.  Re: Environments in Run Time

    Posted Nov 13, 2015 02:58 AM

    There is a sample model supplied by CA

     

    C:\Users\Public\Documents\CA\Plex\7.1\Samples\Multiple DB

     

    What variants are you using? WinC and ODBC ?



  • 5.  Re: Environments in Run Time

    Posted Nov 16, 2015 01:36 PM

    Thanks George, I go to test the sample model.

    I use BackOffice variant.

    Is good the next configuration?



  • 6.  Re: Environments in Run Time

    Community Manager
    Posted Nov 16, 2015 11:13 AM

    Rolando,

     

    Did the suggestions that George and Lorenz made help you solve your challenge?



  • 7.  Re: Environments in Run Time

    Posted Nov 16, 2015 01:38 PM

    Hello Lenn, the answers are very helpful. I go to test and post the results.

     

    Thanks, good day.



  • 8.  Re: Environments in Run Time

    Posted Nov 16, 2015 02:40 PM

    I asked you the variants as you will not want to do    .net   if you had not before ! why bother with Plex.Net Server ???

     

    What is your architecture?

     

    CA Plex Help "Connecting to Multiple Databases"

     

    "The database connection used by a given function can be specified at design-time (by means of DB connection name triples) or it can be switched dynamically at run-time using a SetDatabaseConnectionName API. Database connections are stored as logical names whose details are kept in the application's config file (for C# applications), .properties file (for Java applications), INI file (for Windows C++ clients) or the registry (for Windows C++ servers)."

     

     

    I use extensively 'SetDatabaseConnectionName' the manual method in AutoTestBox - Stella Tools (CA Plex Developer Tools)

    OR

    design time using DB connection name triples which unlike Lorenz I guess you are using either of these two   INI file (for Windows C++ clients) or the registry (for Windows C++ servers)."