DB2/NT Development App vs.Test App vs. Production App

We are encountering a situation where we are using a unique owner name 
(DEVLDBA.tablenames) for our DB2/NT tables in our development 
environment.  We don't want to change the DW SQL <owner name> when we 
move the application to test(TESTDBA.tablenames)environment and again 
when we move to production(PRODDBA.tablenames).

Any suggestions on how to accomplish this? Thanks.
0
Joseph
12/12/1997 4:42:44 PM
sybase.powerbuilder.database 9855 articles. 1 followers. Follow

4 Replies
778 Views

Similar Articles

[PageSpeed] 37

The key to this is having datawindows created without qualifying the table
names.  This is done by default whenever you create a datawindow against
tables owned by the current user.  For instance, if your developers all
login as DEVLDBA and create datawindows, none of the tables will be
qualified with the owner DEVLDBA.

What really happens is that PowerBuilder does not qualify table names
owned by the entry in the UserID field of the profile.  Typically, you do
not specify this when making an ODBC connection; however, it will be
populated with the value of the UID in your ConnectString after
connecting.  You can change this value to DEVLDBA and your developers can
login with their own UserIDs.  This should cause you to generate SQL where
tables owned by DEVLDBA are not qualified; however, since they are not
qualified, the current userid will be used as the default qualifier when
the SQL is sent to the database.  The end result: you'll be able to paint
the SQL the way you want, but you won't be able to run it.

Another option is setting PBTableOwner='No' in the PBODB050.INI file.
This has the result that NONE of the tables will be qualified.  In my
opinion, this causes more confusion that anything else, since now you
can't differentiate tables of the same name but different owners when the
tables are listed.

Yet another option is to define synonyms (aliases in NT) for all your
developers.  They would develop datawindows against the alias (which they
own) and the table names would be unqualified.  Since the alias points to
the real table (owned by either DEVLDBA/TESTDBA/PRODDBA), they would be
able to run the SQL.  Note, however, each user would have to have a
clearly delineated role.  For instance, in order for user JOE to access
TESTDBA versus DEVLDBA tables, all the aliases would have to be dropped
and recreated.

Since you are using DB2/NT, why don't you create three separate databases,
one each for DEVLDBA, TESTDBA, and PRODDBA?  You could then have exactly
the table tables (include owners) in each database, use fully qualified
SQL and avoid many of the problems you've already recognized.

Hopefully, this will provide you some ideas.  There's a number of ways to
accomplish the end result you want, but the avenue is dependent upon your
development environment and policies.

Jim O'Neil
Powersoft Technical Support
joneil@sybase.com



Joseph Zuchowicz wrote:

> We are encountering a situation where we are using a unique owner name
> (DEVLDBA.tablenames) for our DB2/NT tables in our development
> environment.  We don't want to change the DW SQL <owner name> when we
> move the application to test(TESTDBA.tablenames)environment and again
> when we move to production(PRODDBA.tablenames).
>
> Any suggestions on how to accomplish this? Thanks.



0
Jim
12/15/1997 2:15:49 PM
Jim O'Neil [Powersoft] wrote in message <34953B95.9345C894@powersoft.com>...
>Yet another option is to define synonyms (aliases in NT) for all your
>developers.  They would develop datawindows against the alias (which they
>own) and the table names would be unqualified.  Since the alias points to
>the real table (owned by either DEVLDBA/TESTDBA/PRODDBA), they would be
>able to run the SQL.  Note, however, each user would have to have a
>clearly delineated role.  For instance, in order for user JOE to access
>TESTDBA versus DEVLDBA tables, all the aliases would have to be dropped
>and recreated.
>
>Since you are using DB2/NT, why don't you create three separate databases,
>one each for DEVLDBA, TESTDBA, and PRODDBA?  You could then have exactly
>the table tables (include owners) in each database, use fully qualified
>SQL and avoid many of the problems you've already recognized.

This is what we do in our shop...we have multiple DB2/NT database but with
same tables and owners so in our PB application will run just fine in any of
the databases that we created.

David Officer
dofficer@hcitech.com


0
David
12/15/1997 9:16:50 PM
Jim, I am a little confused on your response.  

I am trying to determine which approach you recommended would work for 
our environment.  Your recommendation to create three "separate" 
databases is what we are planning.  We will have a Development, Test and 
Production database each residing on their own separate server.  Each 
database will have tables created with uniquely qualified owner names 
(DEVLDBA.tablenames, QADBA.tablenames and PRODDBA.tablenames).

You stated that we could have fully qualified SQL in our DataWindows.  
Does this mean using the PBODB050.INI parameter PBTableOwner=N?

We want our application SQL not to be qualified with an owner name so 
that the same application code(SQL) can be used against the 3 separate 
databases.

Below are some statements and questions from one of our programmers.  
Your input would be helpful.



Our problem is two fold...
1) during table creation under the painter, how to control the ownerid 
	assigned.
2) at run time, we want to be able to have the application accessing 
	either the development databases(DB2D), the QA databases(DB2Q) or 
	the production databases(DB2P).

Our DB2/2 environment consists of four sub-systems.  These major 
sub-systems are used to distinguish the database contents as follows:
        
DB2D                                                    
Devldba.(tablename)
Convdba.(tablename)

DB2Q
Qadba.(tablename)
Regrdba.(talename)

DB2P
Proddba.(tablename)  
Trngdba.(tablename)

All application tables are initially created under the ownerid Devldba.  
The are migrated to the other ownerids (within the subsystem) and to the 
other sub-systems.

We will configure an ODBC connection to each of the individual 
sub-systems.  A profile will be set up in Powerbuilder for each 
ownerid/subsystem combination.  This will allow access to any of the 
database tables.

When the application is being created in development, the developer will 
need to connect to the combination for DB2D/Devldba.(tablename).  Two 
issues here that I am not sure of
     1) if the developer creates a new table, how will Devldba be 	
		assigned as the owner id
     2) a new datawindow should not reference the ownerid.  When this SQL 		
		generated is executed during the application execution, 
		we want it to use the ownerid of its associated 		
		connection(transaction object....ie SQLCA)

These are the issues that we face.  We may be overlooking something very 
basic in our anaylsis of the way PowerBuilder handles a development table 
and a production table at application execution time.
0
Joseph
12/16/1997 8:11:12 PM
PBTableOwner='No' will cause all SQL to not be qualified.  By default, tables
not owned by the current user will be qualified when building datawindows.
For, example if I login as JONEIL and create a datawindow against
JONEIL.EMPLOYEE, the syntax will be SELECT * FROM EMPLOYEE.  If instead I
create a datawindow against DBA.EMPLOYEE, the syntax will be SELECT * FROM
DBA.EMPLOYEE.  When I login as JONEIL, the UserID of the profile is also set
to JONEIL, if I override that by setting it to XYZ, then I believe the SQL
for building a datawindow against JONEIL.EMPLOYEE would then be SELECT * FROM
JONEIL.EMPLOYEE.  All these techniques, are of course, to get fully qualified
SQL in your datawindows, which you are already getting if none of your
developers actually own the tables they are building datawindows against.

The note below seems to indicate you are leaning toward having none of the
datawindows contain owner names, so the easiest way to do that is to have the
developer login as the table owner.  If that's not possible,  setting
PBTableOwner='No' will accomplish the same thing; however, since the user
logged in does not own the table, the datawindow will not retrieve
correctly.  It will, of course, work in a runtime context where the user logs
in as the table owner - but again this requires all your users to login with
the same id, which causes you to lose accounting capabilities (unless you
build some sort of additional tracking scheme on top of all this.)

My suggestion was to have separate physical databases, say DB2DEV, DB2QA, and
DB2PROD; within each database you would have exactly the same table names and
owners.  So you would have a DBA.EMPLOYEE in DB2DEV, a DBA.EMPLOYEE in DB2QA,
and a DBA.EMPLOYEE in DB2PROD.  Whenever your developers create a datawindow
in DB2DEV the SQL will read SELECT * FROM DBA.EMPLOYEE.  Since that table
exists in your other databases as well, the datawindow will easily port and
users can login with their own ids (assuming they have been granted
privileges to the DBA.* tables), you would merely have to set up three
datasources and set your ConnectString appropriately.

Your note below mentions four subsystems but I only see three, plus I don't
understand the two schemas in each - does DEVLDBA and CONVDBA own identical
sets of tables?  From what I understand, you are going to set up 6 profiles
each with a different login ID, that will work if all the SQL is unqualified;
however, again from the DBMS side everyone will come in with the same user id
(DEVLDBA, CONVDBA, etc.).  To answer question 1, if a developer creates a
table, the default owner will be whatever user id he's logged in with, you
can change this in the table properties to be whatever you want (as long as
it's a legal table owner name).  Question 2 is answered in the first
paragraph.

Jim O'Neil
Powersoft Technical Support
joneil@sybase.com

Joseph Zuchowicz wrote:

> Jim, I am a little confused on your response.
>
> I am trying to determine which approach you recommended would work for
> our environment.  Your recommendation to create three "separate"
> databases is what we are planning.  We will have a Development, Test and
> Production database each residing on their own separate server.  Each
> database will have tables created with uniquely qualified owner names
> (DEVLDBA.tablenames, QADBA.tablenames and PRODDBA.tablenames).
>
> You stated that we could have fully qualified SQL in our DataWindows.
> Does this mean using the PBODB050.INI parameter PBTableOwner=N?
>
> We want our application SQL not to be qualified with an owner name so
> that the same application code(SQL) can be used against the 3 separate
> databases.
>
> Below are some statements and questions from one of our programmers.
> Your input would be helpful.
>
> Our problem is two fold...
> 1) during table creation under the painter, how to control the ownerid
>         assigned.
> 2) at run time, we want to be able to have the application accessing
>         either the development databases(DB2D), the QA databases(DB2Q) or
>         the production databases(DB2P).
>
> Our DB2/2 environment consists of four sub-systems.  These major
> sub-systems are used to distinguish the database contents as follows:
>
> DB2D
> Devldba.(tablename)
> Convdba.(tablename)
>
> DB2Q
> Qadba.(tablename)
> Regrdba.(talename)
>
> DB2P
> Proddba.(tablename)
> Trngdba.(tablename)
>
> All application tables are initially created under the ownerid Devldba.
> The are migrated to the other ownerids (within the subsystem) and to the
> other sub-systems.
>
> We will configure an ODBC connection to each of the individual
> sub-systems.  A profile will be set up in Powerbuilder for each
> ownerid/subsystem combination.  This will allow access to any of the
> database tables.
>
> When the application is being created in development, the developer will
> need to connect to the combination for DB2D/Devldba.(tablename).  Two
> issues here that I am not sure of
>      1) if the developer creates a new table, how will Devldba be
>                 assigned as the owner id
>      2) a new datawindow should not reference the ownerid.  When this SQL
>                 generated is executed during the application execution,
>                 we want it to use the ownerid of its associated
>                 connection(transaction object....ie SQLCA)
>
> These are the issues that we face.  We may be overlooking something very
> basic in our anaylsis of the way PowerBuilder handles a development table
> and a production table at application execution time.



0
Jim
12/16/1997 10:25:14 PM
Reply:

Similar Artilces:

VS 2005 Win App Vs Web App
I am about to start writing an application that will monitor the locations of our golf carts, how this works is when a cart gets close to a hole or other locations on our course it will update our database with it's location. once the database is updated the change will be sent to the clients screen showing the cart in it's new location "The clients display is graphical showing a map on the course and the carts location on the course". Please keep in mind that this app will also allow the user to assign available technicians to work on carts needing maintenance and it will keep track of main...

Web apps Vs Win apps
Hi everyone.  I am conducting a survey on Web base applications Vs Windows base applications.  Please state the disadvantages and advantages of both, then conclude which one you would use.  Your participation will be of great help to me.  THANKS Some of the key differences are: Windows Applications Better able to exploit the resources on the client machine Generally more comprehensive functionality (try writing office under a browser) Easier to develop for (no browser incompatibility issues) Easier to debug client code A nightmare to deploy (roll on ClickOnce +...

Service App vs Desktop App
Hello everyone, I have two apps, one is a service server which is the one I deploy to my clients, the other one is a debug server which has the exact same code the service has but I use it for debugging purposes. (I never test the service, I just recompile it) I have a process which takes several files from as400, converts them to ascii, parses them and inserts all the records on a SQLServer. Everything works as expected. With large files, my client started to complain about the speed of the process. This particular process previously existed and let's say it used to last about ...

Conflict with Access Apps and vs.net app
I am getting a 'delayed write error', on my vs.net application and I know why, but I do not know what to do about it. Here is what is happening... The backend tables I am using in my vs.net application are from an Access database. There is an Access frontend application that uses the same backend tables. When users are logged on to the Access application there is a connection made (a .ldb file is created). When I bring up the vs.net application, it needs to read one of the tables in the backend. So the application creates the connection, opens the connection, reads the t...

Performance of packaged apps vs hosted (app cache)
I keep hearing statements like "Any real app should switch to packaged, because performance is far better". 1) Is this true? And how much better? 2) Why? 3) What's the Web platform plan for fixing this? Is there one? Thanks! Dietrich I have a beginner question on this topic: Hosted or packaged, once the app gets installed on the phone, does this difference still exist? Thanks, Brian I have a beginner question on this topic: Hosted or packaged, once the app gets installed on the phone, does this difference still exist? Thanks, Brian I guess I need to...

Determining if an app is a web app or a windows app
Hi all,  I'm writing a generic utilites class and one of the methods needs to get the physical path of the application. I know Server.MapPath("~") gets the server path of the app for windows and also that Application.ExecutablePath gets the path for windows app. Now how would i determine which app is a windows app or a web app?   Thanks in advance. add a reference to system.web and then do the following  if (System.Web.HttpContext.Current == null)            {       &...

XE4 trial iOS app vs XCode app
Hi, I just started using XE4 trial and launched some sample apps on my iPhone 4. I also have some prototype apps using XCode on my iPhone 4. When I clear the "cache" of recently used apps, and I click a XE4 app it takes extra time to launch versus a XCode created app. Anybody know why? Joe hi I have the same problem I think problem in Firemonkey core which is the problem of the slowness. I also have problem to launch +ou- 1000 dynamique item in a listbox !!! > {quote:title=Joe Sansalone wrote:}{quote} > Hi, > > I just started using XE4 trial ...

Web Apps vs. Web Sites (was: Universal Navigation for Web Apps)
On Wed, Mar 14, 2012 at 12:58 PM, Justin D'Arcangelo <justindarc@gmail.com>wrote: > there needs to be a differentiation between > web sites and web *apps*. > While we might be able to describe characteristics that conceptually separate a "web site" from a "web app", I think in reality they will exist on a continuum. Chris Jones is right that we need more data from actual app developers on this, but I can provide some anecdotal evidence by telling the story of a web app I worked on which got listed in a web app store. I worked on a web-b...

Differences in Web-App Development and Win-App Development?
 Hi guys,I'm gonna to give an interesting presentation on Friday, could anyone help me to think any differences between developing a web application and developing a win-form application?For example,       Win: Events invoked by user behaviour such as button click will be executed immediately;      Web: Server-side Events called by user behaviour such as button click will not be executed until the submitted/postback page has been loaded (Page_Load)I need to sort out all these differences and classify them into categories, so that the...

App inside an app....
HeyI have a main app (my site) inside which I want a link to another little project app that I'm working on. When I try to stick the new project app inside a folder within the main app I get this error:It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level.  This error can be caused by a virtual directory not being configured as an application in IIS.I've looked around at some of the posts on this and it says I need to set the mini app up as a virtual folder, however I'm running VWDE and IIS isn't install...

Web app Developer to go Windows based app development
Greetings All ! I am an experienced web developer in ASP.net/VB.net/C#.net. Now I want to expand my skills and want to get the grips of Making Windows based applications. I know that between web based and windows based apps, the VB.net, ADO.net, XML, all the controls, event handling is more or less a lot same. All I need is to understand the architecture of a typical windows based application. Now all tutorial meterial discusses from the scratch, I dont need to read all of that. How can I and people like me quickly get grips of developing windows based apps. Thanks a lot for reading. Go...

What advantages have to build one delphi xe7 app vs hybrid app as html5 bu? [Edit]
I need to know which mobile advanced hardware characteristics differences has delphi xe7 vs html5 builder for example. I need this characteristics: TEXT EDITING Text in different directions Changing Color On a picture Copy and paste Change Font delete uppercase lowercase Save phrases Select a saved phrase Bank of personal texts PHOTOS OR IMAGES Pulling photos or images already created cut paste Change in size turn Bank of personal images Drawings predefined Figures Lines or free strokes Change color and thickness Fillings Copy and paste delete Personal bank ...

After instal VS 2008, VS 2005 app got error
After instal vs 2008, vs 2005 app got error:  Could not load file or assembly 'CrystalDecisions.Web, Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. The system cannot find the file specified <add namespace="System.Drawing"/></namespaces></pages><httpHandlers><add verb="GET" path="CrystalImageHandler.aspx" type="CrystalDecisions.Web.CrystalImageHandler, CrystalDecisions.Web, Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/></httpHand...

web app vs web site vs web project
Could someone describe the differences between web sites, web apps and web projects? (or send me a link that contains this comparison?). Is one of these terms synonomous with another? What are the advantages/disadvantages of each?  How does one choose when starting new development? Can one type be converted into another?     Thank you. Here is my definition: Website: perspective of users. Collection of web pages.Webapp and project: perspective of developer (and webmasters). Collection of web pages and resouces (database, code, etc.). Maybe software installers...

Web resources about - DB2/NT Development App vs.Test App vs. Production App - sybase.powerbuilder.database

Agile Software Development - Better ways of developing software
- All things cross-platform, mobile, and mobile-web. Especially Qt/QML related - I love developing software, but also practice managing projects ...

Doha Development Round - Wikipedia, the free encyclopedia
The Doha Development Round or Doha Development Agenda ( DDA ) is the current trade-negotiation round of the World Trade Organization (WTO) which ...

Donald Trump's Name Disappears From Dubai Real Estate Development 8
... Emirates The image and name of American presidential hopeful Donald Trump was gone on Friday from much of a Dubai golf course and housing development ...

Software Development Linkopedia December 2015
Here is our monthly selection of knowledge on programming, software testing and project management. This month you will find some interesting ...

System Shock 3 in development at Otherside Entertainment
Night Dive Studios—the group behind the recent System Shock Enhanced Edition and new owner of the System Shock IP—recently teased that it was ...

Max Silvestri released a comedy album, hosting food shows on TV, has a sitcom in development at NBC
by Bill Pearis Max Silvestri officially said goodbye to NYC back in April when his weekly Big Terrific comedy show (with Jenny Slate and Gabe ...

Yingli Solar & R.Power Expand Solar Developments In Poland
The European subsidiary of Yingli Solar and Poland-based R Power will expand their joint project development program in Poland from 30 MW to ...

Fallout 4 publisher opens new studio to expand console, PC, mobile development
Canadian studio currently staffed by over 40 developers.

13 top Web development bootcamps in 13 cities
Bootcamp bonanza Image by Franco Folini/Flickr, Wikipedia According to a recent survey by bootcamp directory and reviews website Course Report ...

Ashley Tisdale Inks Development Deal With Warner Horizon Television
Actress-producer Ashley Tisdale has signed a two-year exclusive development deal with Warner Horizon Television for her Blondie Girl Productions. ...

Resources last updated: 12/14/2015 4:06:22 PM