Connect postgres to SQLSERVER

Started by Agustin Larreinegabeover 12 years ago5 messagesgeneral
Jump to latest
#1Agustin Larreinegabe
alarreine@gmail.com

HI,

Is there a way to connect to a sqlserver like dblink?
I just need to execute a Procedure in sqlserver when something happen

--
Gracias
-----------------
Agustín Larreinegabe

#2John R Pierce
pierce@hogranch.com
In reply to: Agustin Larreinegabe (#1)
Re: Connect postgres to SQLSERVER

On 9/17/2013 11:05 AM, Agustin Larreinegabe wrote:

Is there a way to connect to a sqlserver like dblink?
I just need to execute a Procedure in sqlserver when something happen

postgresql *is* a sql server. or do you mean Microsoft SQL Server ?

--
john r pierce 37N 122W
somewhere on the middle of the left coast

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#3Igor Neyman
ineyman@perceptron.com
In reply to: Agustin Larreinegabe (#1)
Re: Connect postgres to SQLSERVER

From: pgsql-general-owner@postgresql.org [mailto:pgsql-general-owner@postgresql.org] On Behalf Of Agustin Larreinegabe
Sent: Tuesday, September 17, 2013 2:06 PM
To: PostgreSQL mailing lists
Subject: [GENERAL] Connect postgres to SQLSERVER

HI,

Is there a way to connect to a sqlserver like dblink?
I just need to execute a Procedure in sqlserver when something happen

--
Gracias
-----------------
Agustín Larreinegabe

-------------------------------------------------------------------------------------------------

One option is to use "Linked Server" feature to connect from MS SQL Server to Postgres through ODBC driver.

Regards,
Igor Neyman

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#4Atri Sharma
atri.jiit@gmail.com
In reply to: Igor Neyman (#3)
Re: Connect postgres to SQLSERVER

On Wed, Sep 18, 2013 at 12:11 AM, Igor Neyman <ineyman@perceptron.com> wrote:

From: pgsql-general-owner@postgresql.org [mailto:pgsql-general-owner@postgresql.org] On Behalf Of Agustin Larreinegabe
Sent: Tuesday, September 17, 2013 2:06 PM
To: PostgreSQL mailing lists
Subject: [GENERAL] Connect postgres to SQLSERVER

HI,

Is there a way to connect to a sqlserver like dblink?
I just need to execute a Procedure in sqlserver when something happen

--
Gracias
-----------------
Agustín Larreinegabe

-------------------------------------------------------------------------------------------------

One option is to use "Linked Server" feature to connect from MS SQL Server to Postgres through ODBC driver.

Regards,
Igor Neyman

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Or use a FDW, like JDBC_FDW.

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#5Rowan Collins
rowan.collins@gmail.com
In reply to: Agustin Larreinegabe (#1)
Re: Connect postgres to SQLSERVER

On 17/09/2013 19:05, Agustin Larreinegabe wrote:

HI,

Is there a way to connect to a sqlserver like dblink?
I just need to execute a Procedure in sqlserver when something happen

--
Gracias
-----------------
Agust�n Larreinegabe

If all you want to do is trigger a single stored proc, one option might
be to write a function in an unrestricted procedural language (e.g.
pl/PerlU) which connects and runs it using a shell command. It sounds
more complicated on the face of it, but it means you don't need to worry
so much about configuring drivers to make the two DBs talk to each
other, you can just concentrate on the single task you need to work.

This will probably seem less good an idea if you need to retrieve data
from the stored proc, or if there's a possibility of more complex
linkages being needed later anyway.
--
Rowan Collins
[IMSoP]

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general