License Count View for ORAFlex¶
Server-side control scripts must be run before you connect to Flex2SQL for Oracle (ORAFlex). These scripts create the mds_session_info view, which the driver uses to track active ORAFlex sessions for license counting. The scripts must be run as a SYSDBA.
There are two ways to set up the required view: automatically using the Flex2SQL Utility, or manually by having your DBA run the appropriate SQL scripts.
Automatic Setup Using the Flex2SQL Utility¶
The Flex2SQL Utility can run the server-side license scripts automatically when you connect as a SYSDBA.
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, v18.0 migration tool and v18.1 drivers), a warning message displays.
The Login dialog box displays.
In the Server Type field, select Oracle from the drop-down list.
Select SYSDBA from the AutoMode drop-down list.
In the Server Name field, type the name of the server you are logging into.
In the User Name field, type the SYSDBA user name (for example SYS or SYSTEM).
In the Password field, type the user password.
Click Connect to log into the server. Server-side license scripts run automatically.
Logout then login as a DEFAULT user before performing any migration work.
Manual Setup by a DBA¶
If you do not have DBA privileges, ask your DBA to run one of the following scripts to create the required Mertech view. These scripts must be run as a SYSDBA.
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;
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;
Required Grant on v_$parameter¶
The driver also requires read access to v$parameter, which is a synonym for the base table v_$parameter. Your DBA must grant select on this table to the application user:
grant select on v_$parameter to <user>;
Security Considerations¶
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 the 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.