FreeTDS Configuration and Use¶
Learn about how to use FreeTDS and the known configurations that will work with Unified Assurance and an external database.
FreeTDS is an application that is installed with Unified Assurance. It allows components and rules files to connect to databases other than MySQL. You can use it with the Generic Database Aggregator, Generic Database Connector, or other applications that connect to a database to retrieve data.
FreeTDS is not a Unified Assurance component and is not created or maintained by Oracle Communications.
Dependencies¶
You must install the Vendor Free TDS Application and Vendor Free TDS Configuration packages on any server that will be using FreeTDS.
Configuring FreeTDS¶
-
Update the freetds.conf file using one of the configurations described in Known Configurations or the specific settings needed for a particular database. Each (DATA_SOURCE_NAME) must be unique within the freetds.conf file. Do not create duplicates updating the file.
-
Update the Unified Assurance Component or the Rules files to use the new configuration settings. For example:
-
In a Unified Assurance component for the Generic Database Aggregator or Generic Database Connector:
-
DSN - dbi:Sybase:server=(DATA_SOURCE_NAME)
-
Password - (DATABASE_PASSWORD)
-
Username - (DATABASE_USERNAME)
-
-
In a Unified Assurance Rules file:
my $UserName = '(DATABASE_USERNAME)'; my $Password = '(DATABASE_PASSWORD)'; my $DBH = DBI->connect('dbi:Sybase:server=(DATA_SOURCE_NAME)', $UserName, $Password, {PrintError=>1}) or die "unable to connect to server " . $DBI::errstr; my $Query = '(SQL_QUERY)'; my $STH = $DBH->prepare($Query) or die "prepare failed for query $Query\n"; $STH->execute() or die "unable to execute query $Query :: error $DBI::errstr"; while (my $row = $STH->fetchrow_hashref()) { (CODE TO PROCESS THE RESULTS GOES HERE) }
-
Known Configurations¶
These are the configuration settings for known databases. You must find and test the connection settings for any other databases.
Microsoft SQL Server 2000¶
The freetds.conf configurations to connect to a Microsoft SQL 2000 server are:
[MyServer2k]
host = (DATABASE_SERVER)
port = 1433
tds version = 8.0
Microsoft SQL 2005¶
The freetds.conf configurations to connect to a Microsoft SQL 2005 server are:
[(DATA_SOURCE_NAME)]
host = (DATABASE_SERVER)
instance = (INSTANCE_NAME)
port = (PORT)
tds version = 7.0
The instance setting may not be needed in all situations, dependent upon your individual database configuration.
For example, the freetds.conf configurations to connect to a SolarWinds database, which runs on a Microsoft SQL 2005 Server, are:
[solarwinds]
host = solarwinds.(YOUR_DOMAIN).com
instance = SOLARWINDS_ORION
port = 1433
tds version = 7.0
The Unified Assurance component settings to connect to the SolarWinds database using the settings in the freetds.conf file are:
-
DSN - dbi:Sybase:server=solarwinds
-
Password - (YOUR_PASSWORD)
-
Username - SolarWindsOrionDatabaseUser
Microsoft SQL Server 6.x Configuration¶
The freetds.conf configurations to connect to a Microsoft SQL 6.x server are:
[MyServer65]
host = (DATABASE_SERVER)
port = 1433
tds version = 4.2
Microsoft SQL Server 7.x¶
The freetds.conf configurations to connect to a Microsoft SQL 7.x server are:
[MyServer70]
host = (DATABASE_SERVER)
port = 1433
tds version = 7.0
Nimbus¶
The freetds.conf configurations to connect to a Nimbus server are:
[NimBUS]
host = (DATABASE_SERVER)
port = 1433
tds version = 8.0