Mysql To MSSQL
Mysql To MSSQL
Run odbcad32
Select the System DSN tab to configure a data source for the entire system. If you only want to create
the DSN for a specific user (such as your service account), use the User DSN tab. In either scenario,
select the “Add…” button.
Scroll down in the Create New Data Source window and select “MySQL ODBC 3.53 Unicode Driver”
and click “Finish”.
Add and Configure the Connection
Select the Advanced Button and you’ll be placed on the “Connection” sub-tab. Check the boxes labelled
“Allow Big Set” and “Use Compression”.
Next, switch to the “Cursors/Results” tab and select “Don’t Cache Result of forward-only cursors)”.
This can actually be a performance penalty if you perform the same query multiple times to the same
linked server. However my reason to connect to a SQL Server to MySQL, is to pull data into a single
server, in which case, this option was perfectly suited.
Also “Force Use Of Forward Only Cursors”. When you’re done setting all these options, select the “Ok”
button.
2. Configure Linked Server Provider
Adjusting the Linked Server Provider is simple, but it comes with a caveat: When adjusting a provider,
you are adjusting it for all connections using that provider. I am not aware of any way to change these
settings on a per-connection basis.
Provider Properties
Drill down to Server Object → Linked Servers → Providers, right-click MSDASQL, and select
“Properties”.
Nested queries
Level zero only
Allow inprocess
Supports ‘Like’ Operator
The Provider Options for Microsoft OLE DB Provider for ODBC Drivers dialog box will open allowing
you to configure several options. Ensure the above four options are checked:
3. Create Linked Server to MySQL
The next step in our process is to create the actual MySQL Linked Server. Open Microsot SQL Server
Management Studio.
You should already have Linked Servers expanded in the Object Explorer tree. If not, find it in Server
Objects → Linked Server. Once there, right-click Linked Servers and select “New Linked Server…”
Click OK
4. Create view in MSSQL
Now, Select the database in MSSQL that you plan on using as a database source in Laserfiche Forms.
Ricoh Click and select ‘New View’ then click close to the add table dialog. We will use SQL query to add
what we need.
------------------------------------------------------------------------------------------------------------------
Examples of query of MYSQL tables
SELECT *
FROM MYSQL_LINK...vendorprice , MYSQL_LINK...vendorlookup
------------------------------------------------------------------------------------------------------------------
Example of query of MySQL and Join
SELECT vendorprice_1.ABN, vendorprice_1.[Supplier Total], vendorlookup_1.Supplier_Name
FROM MYSQL_LINK...vendorprice AS vendorprice_1 INNER JOIN
MYSQL_LINK...vendorlookup AS vendorlookup_1 ON vendorprice_1.ABN = vendorlookup_1.ABN
------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------
5. Add view as a data source in Laserfiche Forms
6. Configure Form with Data Source
7. Examples of databases queried