License Count View for ORAFlex

Server-side control scripts must be run before you connect to Flex2SQL for Oracle (ORAFlex). These must be run as a SYSDBA.

  1. Select the Flex2SQL Utility shortcut from the Windows Start menu.

Note: It is recommended that you use the same version of the Flex2SQL GUI migration tool and Flex2SQL database drivers. If a mismatch is detected (for example, v12.0 migration tool and v12.1 drivers, a warning message displays.

The Login dialog box displays.

  1. In the Server Type field, select Oracle from the drop-down list.

  2. Select SYSDBA from the AutoMode drop-down list.

  3. In the Server Name field, type the name of the server you are logging into.

  4. In the User Name field, type the SYSDBA user name (for example SYS or SYSTEM).

  5. In the Password field, type the user password.

  6. Click Connect to log into the server. Server-side license scripts run automatically.

  7. Logout then login as a DEFAULT user before performing any migration work.

If you do not have DBA privileges, ask your DBA to run one of the following scripts to create the required Mertech view:

For a non-RAC Oracle database:

create or replace view mds_session_info as select username, machine, terminal, module from v$session where module like ‘ORAFlex%’;

grant select on mds_session_info to public;

drop public synonym mds_session_info;

create public synonym mds_session_info for sys.mds_session_info;

commit

For an Oracle Real Application Cluster (RAC)

create or replace view mds_session_info as select username, machine, terminal, module from gv$session where module like ‘ORAFlex%’;

grant select on mds_session_info to public;

drop public synonym mds_session_info;

create public synonym mds_session_info for sys.mds_session_info;

commit

Questions have been asked about the requirement to create the MDS_SESSION_INFO view within the SYS schema. The purpose of MDS_SESSION_ INFO is to limit v$session information that is available to the application user to only ORAFlex connections (“where module like ORAFlex%”).

Alternately, you can create the view in the user’s schema, but you must then add “grant select on v_$session” to the script. Since v_$session is the underlying table of v$session view, this method opens up v$session to the user.

We recommend creating the view as the SYS user, since this provides the highest-level of security.