Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Heroku with SQL Server

Does Heroku support SQL Server? What should I write my SQL Server database connection string in order to make it run in Heroku?

<connectionStrings>
    <add name="DatabaseConnection"
         connectionString="Data Source=Hp\HpLaptop;Initial Catalog=PracticeDB;Integrated Security=true"
        providerName="System.Data.SqlClient" />
</connectionStrings>
like image 811
Munchmallow Avatar asked Oct 15 '16 17:10

Munchmallow


People also ask

Can you use SQL with Heroku?

Heroku Postgres is a managed SQL database service provided directly by Heroku. You can access a Heroku Postgres database from any language with a PostgreSQL driver, including all languages officially supported by Heroku.

Can I host database in Heroku?

Heroku offers a free plan for hosting PostgreSQL databases. This can be handy if you're getting started with a new project or "just quickly need a hosted database" for experimentation or prototyping.

What database does heroku support?

Heroku delivers the core open-source data projects that are widely adopted by developers— PostgreSQL, Redis, and Apache Kafka. Heroku data services are fully-configured, optimized, secure, and ready for production apps.


1 Answers

Heroku is agnostic about your choice of datastore but they do not offer SQL Server like they offer Postgres as an addon. If you've an external SQL Server database and the appropriate environment on Heroku then there is nothing stopping you from connecting to it.

To connect you would configure your adapter/driver in the same way you would traditionally for your framework of choice. Of course the credentials should be stored in the environment rather than committed to the repo.

like image 102
RangerRanger Avatar answered Sep 21 '22 03:09

RangerRanger