Okay
  Public Ticket #3434462
displaying MS Sql Data in tables
Closed

Comments

  • Samantha started the conversation

    Good Morning,

    My WP site is hosted by Xneelo ( South Africa) and i have a managed server for MS SQL database.

    I need to know if your plugin can perform the following task:

    Link to MS SQL DB and display data in tables on site ( seen demo, seems simply..

    How to create Tables in WordPress from MS SQL server, PostgreSQL or remote MySQL databases 

    ) but have not found documentation regarding MS SQL support.

    I am very cautious of buying plugin's, as i bought WP DATA ACCESS and have not be able to get it up and running ( the process is too complicated)

    i would appreciate assistance soonest, as i would like to purchase on your summer sale! the 1 year premium for 1 domain ( basic) if this has the above feature available.

    Kind Regards

    Samantha

  •  1,846
    Miloš replied

    Hi Samantha,

    yes - we have the capability to add an 'external database connection' with our Plugin as an MS SQL DB.

    You can connect the plugin to almost any MySQL, MSSQL, and PostgreSQL database using the Separate DB Connection section in wpDataTables, 

    if you correctly input the details for the connection.

    The first step will be to check if you have the following drivers installed, and activated.

    3838527468.png

    These drivers need to be installed and activated on the server where your WordPress website is hosted. 

    After you install and activate those drivers, it should work.

    If you're not sure how to install the drivers, please reach out to your hosting provider.


    The server to which wpDataTables is connecting has its own method of establishing the connection, and we're using PHPs logic of connecting to separate connections.

     If there are errors your server returns, those are returned by the server, and only displayed by wpDataTables

     - there's no additional log within wpDataTables that would distinctively show you what's behind the error.

    -

    You can actually test the full features of our plugin, and test your remote DB connection on our Demo sandbox on this link,

    if it is on a live server ( if it is localhost, then It can't be accessed)

    and there is a 15-day money-back guarantee period, So if you purchase the plugin, you can safely fully test it out, and if it doesn't fit your needs you can request and receive a refund in that period. ( same goes for all plugins and add-ons)

    Let me know if you have any questions.smile.png

    Kind Regards, 

    Miloš Jovanović
    [email protected]

    Rate my support

    Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables

  • Samantha replied

    14/08/2023

    Hi Miloš,

    Thank you for the feedback.

    I used the Demo sandbox to test the connection the MSSQL server DB and it passes. But on the live site after installing the plugin, i receive the following error ( with the same server credentials)

    wpDataTables could not connect to mssql server. mssql said: There was a problem with your SQL connection - SQLSTATE[HY000] Unable to connect: Adaptive Server is unavailable or does not exist ("IP ADDRESS":1433) (severity 9) ( I Removed IP for security)

    I have also requested the ISP to install and update the drivers as you have advised. Could this be the issue? that the drivers are not installed yet?

    Regards

    Samantha

  •  1,846
    Miloš replied

    Hi Samantha,

    yes, it is is possible it might be either the correct driver missing on your live site's hosting server,

    but it might be something different.

    To be honest, i did not see that particular error for connection before from the remote Databases.

    Usually, when it is the driver, it says something like "the driver is missing", or similar.

    -

    As we mentioned earlier, 

    the server to which wpDataTables is connecting has its own method of establishing the connection, and we're using PHPs logic of connecting to separate connections.

    If you managed to do a successful Test connection from our Demo Website to this Database,

    but getting this error when you try from your WordPress website,

    it is an issue coming somewhere in the configuration of your hosting server.


    Those errors are returned by the server, and only displayed by wpDataTables,

     - there's no additional log within wpDataTables that would distinctively show you what's behind the error,

    so we are unfortunately not able to say with certainty what it is.

    You can search online for that error text, there are some other cases where users seem to have fixed it on their hosting configuration.


    I found a couple of articles that other users opened online with the same error text for MSSQL Database connection issues,

    and it seems they solved it.

    You can check them out , this one :

    https://community.dreamfactory.com/t/adaptive-server-is-unavailable-or-does-not-exist/2113

    and this one from Stack Overflow :

    https://stackoverflow.com/questions/8511369/adaptive-server-is-unavailable-or-does-not-exist-error-connecting-to-sql-serve

    I hope that might help.

    Kind Regards, 

    Miloš Jovanović
    [email protected]

    Rate my support

    Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables

  • Samantha replied

    Hi Milos,

    i have received a reply from the hosting company, this is what they had to say. i cannot move hosting. not sure what to do i would appreciate your feedback regarding the solution they have proposed below.


    Hi Samantha,

    Please see the response below from our hosts and let me know if this would work for you?

    Kindly note that the following PHP modules/drivers are already installed on your server: 

     

    pdo_dblib
    pdo_mysql
    pdo_pgsql
    pdo_sqlite

    At the moment, we do not support the pdo_sqlsrv driver and we will be unable to install this driver on your server as it requires root access and is not a customisation we support. However, you are able to install the ODBC driver on a per-domain basis by referring to the below steps: 

     

    In order to do so, you can enable SSH for your domain as you will need to run these commands from the command line. 

     

    Enable SSH.

    How to SSH to your hosting server.

     

    1. Run the following command in the folder you would like the ODBC driver to be installed in 

     

    wget https://tenet.dl.sourceforge.net/project/unixodbc/unixODBC/2.3.7/unixODBC-2.3.7pre.tar.gz

     

    2. Once the (unixODBC-2.3.7pre.tar.gz) file has been downloaded run the following commands in the order listed below:

     

    gunzip unixODBC-2.3.7pre.tar.gz 
    tar -xvf unixODBC-2.3.7pre.tar 
    cd unixODBC-2.3.7pre 
    ./configure --prefix='/usr/www/users/FTP_USER/'

     

    Replace 'FTP_USER' with your domain's FTP username. 

    3. Once the above has been done the following commands need to be run:

    make 
    make install

    The above-listed commands will install the drivers in the folder where you have run the commands. You or your website developers would then need to reference the driver within your code on your site.

     

    If you are wanting to connect to an external MSSQL database from your dedicated server, please let me know as we will need to open port 1433 for outbound connections on the server. 

    Regards

    Samantha


  •  1,846
    Miloš replied

    Hi Samantha,

    first my apologies for the waiting time.

    -

    Yes, i can see the issue does seem to be, that your hosting does not support installing the pdo_sqlsrv driver which is missing.

    That might be the issue.

    -

    I can see they proposed for you to try an alternate way, 

    which is to install  SSH  and try to connect your external Database to the hosting server via SSL TUNNEL.

    We were advised by our devs on this.

    At this time,  it is not possible to achieve this with built-in options of our Plugin like that, sadly.

    We had another user before that had the same issue,

    their hosting was not able to install all the needed drivers directly on the Hosting Server,

    and said that the external DB connection can only be from an SSH connection.

    If you wish to go for the SSH setup , you would need to make a custom workaround,  

    that would not be covered by our support at this time.

    Here's one resource that you can check out:

     https://help.pythonanywhere.com/pages/AccessingMySQLFromOutsidePythonAnywhere/

    MySQL databases on PythonAnywhere are protected by a firewall, so external computers can't access them.

    There may be a way of doing this through VPN, but you'd need to have the tunnel constantly opened for something like that.

    I don't exactly know how to do it, but if you are willing to explore this option, I'm sure you'll be able to find some useful info.

    We hope this helps.

    That is the only way we can advise, if you have to try with SSH option;

    The only other option would be to change your Hosting Provider to someone who can install all these drivers directly on their server :

    3838527468.png

    If you decide to do that, here is a recommended list of best WP hosting options :

    How to Choose the Best WordPress Hosting in 2023 (Compared).

    I hope this helps.

    Kind Regards, 

    Miloš Jovanović
    [email protected]

    Rate my support

    Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables