Category Archives: Tutorials

How to determine your Vista Version and Database Version

Using the Application

  1. Open Vista
  2. Click the “Help” drop down menu in the top left hand corner of the application
  3. Select “About Vista”
    • Determing Vista Version 1
  4. The following dialog should appear
    • Determing Vista Version 2
  5. In this case
    1. The Vista Version is 2.60.05
    2. The Database Version is 2.60
  6. Note: the first 3 numbers of the Vista Version and Database Version will be the same if they are in sync.  If they are out of sync there may be errors or unexpected behavior.

For Database Administrators – Using SQL Server Management Studio

  1. Log into the Vista (or otherwise named database).
  2. Run the following query against the database.

    [sql]SELECT TOP 1 * FROM DBVERSION ORDER BY VersNum DESC[/sql]

    VersNum gives the database version. For example, if VersNum has value 260, then the database has been updated to version 2.60.

Updating Network Database

When updating an installation of Vista or Vista Lite which uses a network database, the network database must be updated as well so the application and network are using the same version. If they are out of sync, there may be errors or other unexpected behavior.

Steps on the user’s (client) computer

  1. Update Vista client application (must be done first on at least one computer to obtain necessary database scripts).
  2. Determine your current Vista Version and Database Version.
    • When the versions are in sync, the first three numbers of the current Vista version and current database version are equal.
  3. Navigate to the application’s installation directory under Database\NewDBScript. For example, the file path may be C:\Program Files (x86)\B&V EPRI\Vista\Database\NewDBScript.
  4. Copy the necessary update scripts to a flash drive to give to the DBA.
    • Copy all the ToDatabaseVersionXYZ.sql files whose XYZ are greater than the current Vista Database Version. For example, if the current database version is 2.50, copy ToDatabaseVersion251.sql, 252, 253, 254, and 260.
    • Copy these other files:
      • OutputTableDetails.out
      • OutputTagDetails.out
      • OutputTagGrandParents.out
      • OutputTagParents.out
  5. Close Vista.

DBA Reference and Steps

  1. Login to the network database server.
  2. Backup the Vista (or otherwise named) database.
  3. Open a new query against the Vista (or otherwise named) database.
  4. Determine the database version by running the following query (this should agree with what the user noted from the inspecting the application’s help window):

    [sql]SELECT * FROM DBVERSION ORDER BY 1 DESC[/sql]

    For this example, let’s say the current version is 2.50.

  5. Copy the update scripts from the user to a location on the server. After each update script, run the query from step 4 to ensure the database was successfully updated. For example, I’ll suppose the files are located in C:\Temp\VistaUpdateScripts. Run the database update scripts in increasing order. For example, if the current database version is 2.50, run ToDatabaseVersion251.sql, then ToDatabaseVersion252.sql, and so forth, finishing with the ToDatabaseVersion260.sql (2.60 was the current Vista application version, as noted by the user on the client computer).
  6. Update the output tags by running the following query (replace with your filepath to the respective .out files). The SELECT COUNT queries should return 4642 tags, 107 tables, 94 parents, and 12 grand parents (as of Vista 2.60).

    [sql]
    DELETE FROM dbo.OutputTableDetails;
    DELETE FROM dbo.OutputTagDetails;
    DELETE FROM dbo.OutputTagParents;
    DELETE FROM dbo.OutputTagGrandParents;

    BULK INSERT dbo.OutputTagGrandParents FROM ‘C:\Temp\VistaUpdateScripts\OutputTagGrandParents.out’ WITH (CODEPAGE = ‘RAW’,FIELDTERMINATOR = ‘|’,KEEPIDENTITY,KEEPNULLS);
    BULK INSERT dbo.OutputTagParents FROM ‘C:\Temp\VistaUpdateScripts\OutputTagParents.out’ WITH (CODEPAGE = ‘RAW’,FIELDTERMINATOR = ‘|’,KEEPIDENTITY,KEEPNULLS);
    BULK INSERT dbo.OutputTagDetails FROM ‘C:\Temp\VistaUpdateScripts\OutputTagDetails.out’ WITH (CODEPAGE = ‘RAW’,FIELDTERMINATOR = ‘|’,KEEPIDENTITY,KEEPNULLS);
    BULK INSERT dbo.OutputTableDetails FROM ‘C:\Temp\VistaUpdateScripts\OutputTableDetails.out’ WITH (CODEPAGE = ‘RAW’,FIELDTERMINATOR = ‘|’,KEEPIDENTITY,KEEPNULLS);

    SELECT Count(OutputTagDetailsID) as NumTags FROM OutputTagDetails;
    SELECT Count(TableName) as NumTables FROM OutputTableDetails;
    SELECT Count(OutputTagParentID) as NumParents FROM OutputTagParents;
    SELECT Count(OutputTagGrandParentID) as NumGrandParents FROM OutputTagGrandParents;
    [/sql]

How to test if the Update Worked

  1. Open Vista on the user’s (client) computer.
  2. Check the Vista version. The Vista version and current database version should agree.
  3. Open the different modules (e.g. Fuel, Economics, Performance Overwrites are good ones to test because they change most frequently) to make sure no errors occur.
  4. To test the output tags have been updated, generate some results from the Results module. Look through the Excel workbook for unpopulated tags. They will have “TD” followed by a number (e.g. “TD4285”). If there are any unpopulated tags, the database likely needs step #6 of the DBA reference in this post.

Registering on the Vista Web Server

MyVistaSource.com now has a completely new face! In order to access the Members-Only section of the Vista website, you’ll have to “Register.” You’ll make a unique UserName and password. This way, we can manage who sees what content and better protect the software and documentation. To register on the Vista website, do the following:

  1. Click “Register” on the top right-hand corner of the screen.
  2. Enter a Username and E-mail address
  3. Click Register
  4. Await confirmation e-mail.

One of the members of the Vista team will get an e-mail letting us know we need to confirm your registration. If it’s been more than 30 minutes, give us a call or shoot us an email, and we’ll drop what we’re doing and get you confirmed. This process is important because it allows us to screen out robots and attackers who would otherwise try to access data they shouldn’t.