Pointing local VL Web to Production Database

This Q&A forum allows users to post and respond to "How Do I Do ....." questions. Please do not use to report (suspected) errors - you must use your regional help desk for this. The information contained in this forum has not been validated by LANSA and, as such, LANSA cannot guarantee the accuracy of the information.
Post Reply
jyoung
Posts: 694
Joined: Thu Jan 21, 2016 6:43 am
Location: Oklahoma City, OK USA

Pointing local VL Web to Production Database

Post by jyoung »

Is there anyway to "point" my local VL Web to the Production (IBMi) database?

In Java, .NET. NodeJS etc. I could change the connection string to query production data and I am looking for something similar in VL Web.

Occasionally issues come up that is directly related to data on Production and in order to apply / confirm a fix, I need Production data. What I have been doing is pulling down subsets of the Production db into SQL Server; however when you get a lot of relationships involved that becomes a really tedious process.

It would be nice to say "go look over here for your data instead of the local database". So that I can confirm I fixed the issue BEFORE I deploy it to Production.

Thanks,
Joe
MarkD
Posts: 692
Joined: Wed Dec 02, 2015 9:56 am

Re: Pointing local VL Web to Production Database

Post by MarkD »

By default IBM i data base tables are located by using the web job’s current library list.

You could permanently change the library list that the web job starts with, which would impact all users.

I think a more common technique for doing this is to dynamically alter the web job’s library list of each individual web transactions – which allows for different databases to be used based on user profile, company being used, etc.

In the VLF-ONE context a technique for doing this descried here:
http://docs.lansa.com/14/en/lansa048/in ... f449887781
http://docs.lansa.com/14/en/lansa048/in ... s_0540.htm

Although this is VLF-ONE documentation the concept is entirely applicable to any VL-Web IBM i situation.
jyoung
Posts: 694
Joined: Thu Jan 21, 2016 6:43 am
Location: Oklahoma City, OK USA

Re: Pointing local VL Web to Production Database

Post by jyoung »

Sorry Mark, I am referring to getting my local Visual LANSA IDE running on Windows pointed to the production database on an IBMi instead of the local SQL server.
atostaine
Posts: 696
Joined: Wed Jan 20, 2016 7:38 am

Re: Pointing local VL Web to Production Database

Post by atostaine »

Surely someone in support knows the answer, but if I had to figure it out, I'd start by ending my IDE, ending the SQL server, and trying to run the VL-WEB app. Maybe you will get an error that helps you figure out where the connection string is.

HTH
Art Tostaine
MarkD
Posts: 692
Joined: Wed Dec 02, 2015 9:56 am

Re: Pointing local VL Web to Production Database

Post by MarkD »

You want your server modules to run on your PC (localhost) under IIS, but to access your IBM i's database tables instead of your local SQL server tables.

I don't think you could do this with modifying the code in your server modules (or hopefully in a common initialization method).

I understand how you could use CONNECT_SERVER and CONNECT_FILE http://docs.lansa.com/14/en/lansa015/in ... server.htm, but that's a solid connect/disconnect hit to take on every server module interaction, so it would only be for testing.

You might also be able to use http://docs.lansa.com/14/en/lansa015/in ... server.htm if you installed the IBM supplied ODBC drivers for the IBM i server - which is something I don't know anything much about.

Alternatively, set up a parallel IBM i based test LANSA system and check your changes into, and do final tests from, that environment.
Post Reply