Dbvisit Replicate communicates with both source and target database to replicate data. This communication includes reading and writing data through Data Source Name (DSN) configured using ODBC data source and drivers. A DSN for SQL server on source system is required by Dbvisit Replicate to successfully execute configurational scripts that prepares the target MSSQL environment for replication. On target system, a DSN with same name as source system is required by the APPLY service which interacts with target database to replicate changes of source database.
DSN on WIndows
DSN on Linux
If the source database is running on Linux machine then ODBC drivers for Linux is required to set up DSN. To setup DSN on Linux machine, following steps needs to be performed.
1. First of all Install ODBC driver on Linux. Driver can be downloaded from this link : http://www.microsoft.com/en-us/download/details.aspx?id=28160
Installation instructions are available on same page. If required packages are installed then It will also work on different flavor of Linux and not just on 64-bit Red Hat Enterprise Linux 5 or 64-bit Red Hat Enterprise Linux 6.
2. Installtion of ODBC driver will insert following record in /etc/odbcinst.ini file.
[SQL Server Native Client 11.0]
Description=Microsoft SQL Server ODBC Driver V1.0 for Linux
Driver=/opt/microsoft/sqlncli/lib64/libsqlncli-11.0.so.1790.0
Threading=1
UsageCount=1
Crosscheck whether this specification are inserted or not.
3. Once the installation is done, DSN can be created. To create DSN, login as root and create a DSN entry in /etc/odbc.ini file.Following is an example of DSN named "dbtest1"
[dbtest]
Driver=SQL Server Native Client 11.0
Description=My Sample ODBC Database Connection
Trace=Yes
Server=<IP Address of Target Windows Machine>
4. DSN is created. "isql" command can be used to test DSN. If DSN is working properly then isql command will return SQL prompt from where you can execute SQL statements on target database running on Windows machine. Following is the example of testing DSN testdb1.
oracle@dbvldemo101[/home/oracle]: isql -v dbtest sa *******
+---------------------------------------+
| Connected! |
| |
| sql-statement |
| help [tablename] |
| quit |
| |
+---------------------------------------+
SQL> select * from avi.sample