1. Home
  2. Docs
  3. Remote Databases
  4. Connect to SQL Server (tutorial)

Connect to SQL Server (tutorial)

WP Data Access supports connections to Microsoft SQL Server over ODBC and JDBC. Please follow the link below to learn how to setup a connection to SQL Server over ODBC or JDBC first.

> ODBC | JDBC setup and installation (read this first)


A remote MariaDB connection was used for this tutorial to connect to Microsoft SQL Server. The WordPress server used for this tutorial run on MySQL.

Step by step

  • Check prerequisites
  • Check architecture
  • Install CONNECT storage engine (if not installed)
  • Install ODBC or JDBC drivers
  • Prepare SQL Server connection (must use SQL Server Authentication)
  • Check SQL Server table structure (all data type supported? primary key needed?)
  • Use SQL Server in Data Publisher
  • Use SQL Server in Data Projects (supports data management on back-end and front-end)



Was this article helpful to you? Yes No

6 Replies to “Connect to SQL Server (tutorial)”

  1. Hey Peter,

    Awesome plugin. Will the remote connection functionality work with Microsoft Azure SQL Database? We have the option of choosing between Microsoft Azure SQL Database and Microsoft Azure SQL Server. We prefer to use the Azure SQL Database because less administrative overhead and cost of ownership. Our WordPress database is Percona Server (SSO Sigon) and I don’t believe we have a remote MariaDB database connection setup. Is the remote connection functionality still a viable option for us to connect to Microsoft Azure SQL Database/Server?

    Best Regards,

    1. Hi Arslan,

      That is an interesting question! 🙂 I have never tested with Azure, but ODBC and JDBC are supported by MariaDB and Azure, so it should be possible. Is this something we can pickup together?

      Best regards,

  2. Hi Peter,

    Awesome plugin you made.
    I’m running this website http://www.inksaneartists.com, and I would love to have it read data from a remote microsoft SQL server db.
    My wordpress plugin is using MySql and not MariaDB.
    So i’m trying to follow your videotutorial, where you make a gateway to a mariadb first.
    But here I’m stuck..
    Obviously copying the same data that you put in is not working. Since you are using a personal IP.
    Should I first go make a mariadb somewhere else (with my current hosting provider?), and then have WP Data Access connect to that?
    Or where can I find the IP that does work for my installation? What am I missing?

    Thanks already!

    1. Hi Sandy,

      To use your SQL Server tables from your WordPress server, your MariaDB database needs to be reachable from your WordPress server and your SQL Server needs to be reachable from your MariaDB server. The MariaDB server acts as a proxy. Your MariaDB and SQL Server databases will usually be on the public network both, and you need to be able to establish a remote connection.

      Hope this helps,

    1. Hi Jimmy,

      You can use JDBC or ODBC to connect to a remote SQLite database (I have not tested this!). You should carefully read this page before you start:
      Additionally you need to download the necessary drivers and call them in your table definition.

      You can follow the steps as described in the video on this page, you just need to change the connection parameters. The correct parameters should be documented with your driver.

      Hope this helps,

Leave a Reply

Your email address will not be published.