Thread: Connect postgres to SQLSERVER
HI,
Is there a way to connect to a sqlserver like dblink?
--
Gracias
-----------------
Agustín Larreinegabe
I just need to execute a Procedure in sqlserver when something happen
Gracias
-----------------
Agustín Larreinegabe
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
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
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.
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]