Gyrus Knowledge Base
Article Number: 04002103
Article Title: NEW: DBMS Alternate Connection

This article applies to the following products:

Training Wizard 2001 3.0.23

Summary:

Prior to Training Wizard 2001, client machines were forced to use the "Wizard32" ODBC data source created by the Training Wizard installation program. This data source was required to connect to the database as the "Wizard" database user. The "Wizard" database user owned all of the tables, views and procedures used by Training Wizard and Self Service Training. Because most database systems requires database users to have unique names, it was difficult to create a second Training Wizard database on the same database server. When using Oracle, you had to create a second instance. When using Microsoft SQL Server, it was next to impossible.

Training Wizard 2001 is now more flexible. Although the installation program will still create a "Wizard32" ODBC data source that Training Wizard will use by default, you are now able to create your own ODBC data source for Training Wizard to use. In addition, you can create your Training Wizard database so that it is owned by a database user other than "Wizard". This makes it easier to have multiple Training Wizard databases on the same database server.

Details:

By default, when you create a Training Wizard database, the database objects (tables, views, procedures, etc.) are owned by a database user named "Wizard". By editing the scripts (Oracle and Microsoft SQL Server only) used to create the Training Wizard database, you can create these objects so that they are owned by whatever database user you choose. For example:

For Oracle, edit the ORAUSER.SQL script so that the last three statements create and work with a user other than Wizard. For example, to use a database user named "Lamont", those last three statements would read:

CREATE USER LAMONT IDENTIFIED BY LAMONT DEFAULT TABLESPACE WIZ_DATA_SPACE TEMPORARY TABLESPACE WIZ_TEMP_SPACE;
GRANT UNLIMITED TABLESPACE TO LAMONT;
GRANT WIZARD_SUPERVISOR TO LAMONT WITH ADMIN OPTION;

You would then log on as the Lamont user within SQL*Plus and run the remaining scripts.

For Microsoft SQL Server, edit the MSINIT.SQL script so that the database, physcial storage, login and user are all named something other than "WIZARD". For example, to use "Lamont" instead of "Wizard", the MSINIT.SQL file for Microsoft SQL Server 7.x would look like this:

CREATE DATABASE Lamont
ON
( NAME = Lamont_Data,
FILENAME = 'c:\mssql7\data\Lamont_data.mdf',
SIZE = 100 )
LOG ON
( NAME = Lamont_Log,
FILENAME = 'c:\mssql7\data\Lamont_log.ldf',
SIZE = 40 )
GO

USE Lamont
GO

sp_addlogin Lamont, Lamont, Lamont
GO

sp_grantdbaccess 'Lamont', 'Lamont'
GO

sp_addrolemember 'db_owner', 'Lamont'
GO

You would then log on as the Lamont user within Query Analyzer and run the remaining scripts.

Once you have created your alternate database, you must create an ODBC datasource that connects to it. This must be done on each client machine on which Training Wizard will run and connect to the alternate database.

After you have created the alternate database ODBC datasource, you need to use a special utility to configure Training Wizard to use the new ODBC datasource. The utility is located in the same directory as the Training Wizard application and is called TWdbconopt.exe.

The TWdbconopt.exe utility is used to define "alternate connections" for Training Wizard to use. When you first run this utility, there will be no connections defined. Click the Add button to add a new connection. Each alternate connection requires two pieces of information:

After defining an alternate connection, you have several choices:

Finally, do not confuse the Training Wizard login screen with a database connection. When the Training Wizard logon screen appears, you are already logged into the database. The Training Wizard logon screen is used to identify which Training Wizard application user you are, and therefore what application security privileges you will have.

Related Articles:

04002143 - Summary Of Changes In Training Wizard 2001 3.0.23

THIS INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. GYRUS SYSTEMS DISCLAIMS ALL WARRANTIES, EITHER EXPRESSED OR IMPLIED. GYRUS SYSTEMS SHALL NOT BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS, OR SPECIAL DAMAGES, EVEN IF GYRUS SYSTEMS HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

For additional assistance send email to support@gyrus.com or phone technical support at 1-800-284-9787
Gyrus Systems, Inc. is located at Gyrus Center, 620 Moorefield Park Drive, Richmond, VA 23236-3692.
Office Phone: (804) 320-1414 Office Fax: (804) 320-2323 Located on the web at www.gyrus.com