Comments (7)
I have observed this bug while connecting to Azure SQL .
- tds_fdw v 1.0.1,
- freetds v0.91,
- PostgreSQL v. 9.3.5
I can connect to MyApp database from command line with tsql:
tsql -H gsnza2xxxx.database.windows.net -U 'uuuu@gsnza2xxxx' -D MyApp -P 'xxxx' -p 1433
But on SQL level, with TDS FDW I always get connected to "master" database.
I cannot modify default login database in Azure.
Is there a way to force an equivalent of -D MyApp
on tds_fdw?
Should it be possible to specify database name on CREATE SERVER
stage, not on CREATE FOREIGN TABLE
stage?
Is it much work to do? Maybe it would be possible to add database
option in tdsSetupConnection
?
from tds_fdw.
I have started a discussion with the FreeTDS developers about this problem:
http://lists.ibiblio.org/pipermail/freetds/2015q2/029353.html
from tds_fdw.
The FreeTDS developer said that DBSETLDBNAME()
can be used to add the connecting database to the LOGINREC
prior to calling dbopen()
. This macro/function appears to be undocumented in the current FreeTDS Doxygen reference manual, but I see that the macro at least exists in sybdb.h
included in the version of FreeTDS in CentOS 7.
I'm thinking that I should make the DBSETLDBNAME()
behavior the default. Maybe the dbuse()
behavior could be turned on via a foreign server or table option.
from tds_fdw.
Hi @filiprem,
Can you please try the latest commit? I've added database
and dbuse
options for foreign servers. To support Azure, dbuse
has to be set to 0
(the default).
Commit: c534888
e.g. with this commit, you can provide more options to CREATE SERVER
:
CREATE SERVER mssql_svr
FOREIGN DATA WRAPPER tds_fdw
OPTIONS (servername '192.168.1.101', port '1433',
language 'us_english', character_set 'UTF-8',
database 'tds_fdw_test', tds_version '7.1');
from tds_fdw.
Direct links to archives of the commit:
from tds_fdw.
Fixed in version 1.0.2.
from tds_fdw.
Thank you Geoff! This works fine now.
from tds_fdw.
Related Issues (20)
- datetime2 not working properly
- Segmentation fault selecting geometry columns via foreign table HOT 1
- Adaptive Server connection failed HOT 14
- Data is broken when checking data using tds_fdw
- Issue with getting the data from varchar column with special characters
- Long Foreign Data Wrapper Table Names- Handling
- problem with data type "float(0)" HOT 1
- problem with data type "fload(0)" HOT 1
- problem with data type "fload(0)" HOT 1
- problem with data type "fload(0)" HOT 1
- New release? HOT 4
- Connection Transaction Isolation Level HOT 2
- Custom defined data types disrupt FDW tables HOT 1
- Feature Request: `LIMIT` and `COUNT` pushdown HOT 3
- Feature Request: support the nolock option when defining foreign table HOT 1
- Character set conversion problems should issue a warning but not terminate the query HOT 3
- JOIN pushdown availability
- Foreign Data Wrapper (FDW) to connect to a read-only secondary server on SQL Server HOT 1
- Question: Does tds_fdw lock tables?
- Query Error with "db_datareader" Role in tds_fdw
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tds_fdw.