Re: Conexion MS SQL Server a Postgresql

From: Jaime Casanova <jaime(dot)casanova(at)2ndquadrant(dot)com>
To: Nahum Castro <nahumcastro(at)gmail(dot)com>
Cc: José Fermín Francisco Ferreras <josefermin54(at)hotmail(dot)com>, Lista PostgreSQL <pgsql-es-ayuda(at)postgresql(dot)org>
Subject: Re: Conexion MS SQL Server a Postgresql
Date: 2016-12-07 06:15:22
Message-ID: CAJGNTeMm=P0iTa6X+DK6kc2b97MpHJQ7rbKNTtB+Dgf66ebepQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-es-ayuda

2016-12-06 12:56 GMT-05:00 Nahum Castro <nahumcastro(at)gmail(dot)com>:
> Se puede a través de linked server.
>

Solo que el quiere ver la tabla de SQL Server en PostgreSQL y no al revés.

Y para eso lo que necesita es una foreign table, que en esencia es la
misma idea de linked server: permitir ver una tabla foránea en
PostgreSQL [1]; sólo que en lugar de inventarse una sintáxis
PostgreSQL respeta el estándar SQL, el cual define CREATE SERVER,
CREATE FOREIGN TABLE y el uso de FOREIGN DATA WRAPPER (conectores de
datos foráneos) como el mecanismo para lograr esto.

En este caso en particular, necesitarías usar tds_fdw [2]

[1] https://www.postgresql.org/docs/9.6/static/sql-createforeigntable.html
[2] https://wiki.postgresql.org/wiki/Foreign_data_wrappers#Specific_SQL_Database_Wrappers
--
Jaime Casanova www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

-
Enviado a la lista de correo pgsql-es-ayuda (pgsql-es-ayuda(at)postgresql(dot)org)
Para cambiar tu suscripcin:
http://www.postgresql.org/mailpref/pgsql-es-ayuda

In response to

Responses

Browse pgsql-es-ayuda by date

  From Date Subject
Next Message Kernel 2016-12-07 10:12:08 pg_xlog se puede inicializar ?
Previous Message Nahum Castro 2016-12-06 17:56:26 Re: Conexion MS SQL Server a Postgresql