Recently, we developed an new built-in database wrapper that can be used to connect to your Oracle database. This article explains the difference between this database wrapper and the traditional one.
Introducing the Managed Oracle Database Wrapper
Recently we introduced a new database wrapper based on the ODP.NET Managed Driver. This is a database driver is written entirely in .NET code. The result is that we do not have to install the Oracle data access components (ODAC). This results in a much simpler deployment of ViSit Anywhere. With respect to ViSit Anywhere, the main difference between the two Oracle clients is that the native client is required for manipulating spatial data, while the managed client is generally used for classic database access. In most scenarios, this is not a problem, as spatial data access is typically only required during spatial data integration. Applications like refreshing external tables can be performed perfectly well using the managed client.
Selecting the Managed Oracle Database Wrapper
The managed Oracle database wrapper is integrated directly in the current version of Visit Anywhere. No additional types or software needs to be installed. The wrapper is automatically capable of being used by both x64 and x86 versions of ViSit Anywhere. So the database wrapper can be selected directly using source menu in the Module properties dialog.
Once we have selected the wrapper, we only have to provide a connection string.
As is often the case, this is where the problems begin when connecting to Oracle. The native client used a tnsnames file that manages the network information required to locate the database service and connect. Since the native client is not installed, we now must provide this information as part of the connection string. The first technique for doing this is to reproduce the information that exists already in the tnsnames file. The format of the string is a bit complex, but for instances where we already have a working connection, this may be the easiest way to go.
Note that we have put place holders for the HOST, SERVICE, USER and PASSWORD as part of this string. Again, this type of connection string is useful when you already have a working connection with the unmanaged client. It takes information from the tnsnames file as the Data Source argument and adds the User Id and Password arguments.
An alternative to this connection string is to use one based on the EZ-Connect format of Oracle. In this case, the information in the connection string is essentially the same, but the format is simplified.
Data Source=HOSTNAME:1521/SERVICENAME;User ID=USERNAME;Password=PASSWORD
As we can see, we are assuming that the port used is 1521. This is the default port for the managed client, but this may depend on the configuration of the database.
And That's All!
Normally, this should be enough to configure a connection to Oracle. Note, we do not need to install the ODAC and we do not have to worry about the bitness (x86, x64) of your ViSit Anywhere installation. We only need to know the username, password, hostname and service instance name.