How to use Ms SQL Server in Meteor?

How to use Ms SQL Server in Meteor?

@theara - I’m currently working on a project where we have a meteor 1.3.4 app being served by Phusion Passenger Enterprise. The app touches a self hosted mongodb instance and a self hosted MS SQL instance.

We use the node package mssql. This is a non-reactive package, but works for our needs since our reference data is on the MS SQL box and all reactive data is stored back to our Mongodb instance.

Follow the mssql link for instructions, it’s pretty straightforward and supports several ways of polling your MS SQL data.

1 Like

Thanks for your reply.
Excuse me when we use Ms SQL, we can use Pub/Sub and any package such as Tabular, AutoForm, SimpleSchema, .....
Or have any, please reply me.

Could you create example repo for this?
Very thanks for your helping.

I put this together a while back.

I think I’d be looking at Apollo if I had this requirement today though.

1 Like

Thanks for your example, Look great.
Excuse me, could we use/install Ms SQL on Mac/Ubuntu?

here’s the link https://docs.microsoft.com/en-us/sql/linux/sql-server-linux-setup-ubuntu

Cant config

=> App running at: http://localhost:3000/
W20170119-10:56:05.052(7)? (STDERR) mssql: Database unconfigured

I base on Mac and use Ms SQL on docker (microsoft/mssql-server-linux).
I run Ms SQL by docker run -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=123456' -p 1433:1433 -d microsoft/mssql-server-linux (it work fine).

I config setting.js

{
    "database": {
        "server"   : "localhost:1433",
        "database" : "testing",
        "user"     : "sa",
        "password" : "123456",
        "options"  : {
            "useUTC"     : false,
            "appName"    : "MeteorApp"
        }
    }
}

Please help me.

Did you test if your Docker MS SQL is properly running? Have that fixed first then go on in connecting your meteor app to ur docker MS SQL…

Since you are using docker I would strongly recommend using docker as well for your meteor app…

Oh when I run
docker run --name mssql-container -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=123456' -p 1433:1433 -d microsoft/mssql-server-linux.

It show

Microsoft(R) SQL Server(R) setup failed with error code 1. Please check the setup log in /var/opt/mssql/log for more information.

Sorry I don’t have experience setting up MSSQL on a Mac, but you might was to try Stackoverflow, since this is not really a Meteor question.

ah looks like you found the answer!

Thanks now it work fine when I change to strong password.