bcp: dsn specified an unsupported driver
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}
A straight-forward call to bcp
works on linux and not on windows.
Ubuntu
~$ /opt/mssql-tools/bin/bcp "select @@version as v" queryout foo.csv
-D -S mydsn -c -U myuser -t, -r 'n' -P '...'
Starting copy...
1 rows copied.
Network packet size (bytes): 4096
Clock Time (ms.) Total : 78 Average : (12.8 rows per sec.)
~$ cat foo.csv
Microsoft SQL Server 2016 (RTM-GDR) (KB4019088) - 13.0.1742.0 (X64)
Jul 5 2017 23:41:17
Copyright (c) Microsoft Corporation
Standard Edition (64-bit) on Windows Server 2016 Standard 6.3 <X64> (Build 14393: )
~$ /opt/mssql-tools/bin/bcp -v
BCP - Bulk Copy Program for Microsoft SQL Server.
Copyright (C) Microsoft Corporation. All Rights Reserved.
Version: 17.3.0000.1
Windows
C:> bcp "select @@version as v" queryout foo.csv
-D -S mydsn -c -U myuser -t, -r 'n' -P '...'
The DSN specified an unsupported driver.
C:> bcp -v
BCP - Bulk Copy Program for Microsoft SQL Server.
Copyright (C) Microsoft Corporation. All Rights Reserved.
Version: 15.0.1000.34
Both ODBC configurations are using the native "ODBC Driver 17 for SQL Server" drivers. Both are reaching out to the same IP address and port. On both, I can use ODBC/DSN for other non-bulk queries, so it is not a network thing. On windows, bcp
works fine when not using -D
, as in -S ipaddr,port
notation.
- I cannot find a newer version of
bcp
for windows, currently listed here as 15.0: https://docs.microsoft.com/en-us/sql/tools/bcp-utility. - I have tried configuring both a 32-bit and 64-bit ODBC connections using the same connection parameters. (This shouldn't matter, though, since the same DSN is working for regular ODBC operations, just not with
bcp
.) - I cannot use
-T
(network restrictions).
When I try a similar connection with sqlcmd
:
C:> sqlcmd -d mydb -D -S mydsn -U myser -P '...'
Sqlcmd: Warning: '-D' is an obsolete option and is ignored
and removing the -D
fails (server not found).
Windows is win10, 64bit, build 1809.
What am I missing?
sql-server windows odbc bcp
add a comment |
A straight-forward call to bcp
works on linux and not on windows.
Ubuntu
~$ /opt/mssql-tools/bin/bcp "select @@version as v" queryout foo.csv
-D -S mydsn -c -U myuser -t, -r 'n' -P '...'
Starting copy...
1 rows copied.
Network packet size (bytes): 4096
Clock Time (ms.) Total : 78 Average : (12.8 rows per sec.)
~$ cat foo.csv
Microsoft SQL Server 2016 (RTM-GDR) (KB4019088) - 13.0.1742.0 (X64)
Jul 5 2017 23:41:17
Copyright (c) Microsoft Corporation
Standard Edition (64-bit) on Windows Server 2016 Standard 6.3 <X64> (Build 14393: )
~$ /opt/mssql-tools/bin/bcp -v
BCP - Bulk Copy Program for Microsoft SQL Server.
Copyright (C) Microsoft Corporation. All Rights Reserved.
Version: 17.3.0000.1
Windows
C:> bcp "select @@version as v" queryout foo.csv
-D -S mydsn -c -U myuser -t, -r 'n' -P '...'
The DSN specified an unsupported driver.
C:> bcp -v
BCP - Bulk Copy Program for Microsoft SQL Server.
Copyright (C) Microsoft Corporation. All Rights Reserved.
Version: 15.0.1000.34
Both ODBC configurations are using the native "ODBC Driver 17 for SQL Server" drivers. Both are reaching out to the same IP address and port. On both, I can use ODBC/DSN for other non-bulk queries, so it is not a network thing. On windows, bcp
works fine when not using -D
, as in -S ipaddr,port
notation.
- I cannot find a newer version of
bcp
for windows, currently listed here as 15.0: https://docs.microsoft.com/en-us/sql/tools/bcp-utility. - I have tried configuring both a 32-bit and 64-bit ODBC connections using the same connection parameters. (This shouldn't matter, though, since the same DSN is working for regular ODBC operations, just not with
bcp
.) - I cannot use
-T
(network restrictions).
When I try a similar connection with sqlcmd
:
C:> sqlcmd -d mydb -D -S mydsn -U myser -P '...'
Sqlcmd: Warning: '-D' is an obsolete option and is ignored
and removing the -D
fails (server not found).
Windows is win10, 64bit, build 1809.
What am I missing?
sql-server windows odbc bcp
add a comment |
A straight-forward call to bcp
works on linux and not on windows.
Ubuntu
~$ /opt/mssql-tools/bin/bcp "select @@version as v" queryout foo.csv
-D -S mydsn -c -U myuser -t, -r 'n' -P '...'
Starting copy...
1 rows copied.
Network packet size (bytes): 4096
Clock Time (ms.) Total : 78 Average : (12.8 rows per sec.)
~$ cat foo.csv
Microsoft SQL Server 2016 (RTM-GDR) (KB4019088) - 13.0.1742.0 (X64)
Jul 5 2017 23:41:17
Copyright (c) Microsoft Corporation
Standard Edition (64-bit) on Windows Server 2016 Standard 6.3 <X64> (Build 14393: )
~$ /opt/mssql-tools/bin/bcp -v
BCP - Bulk Copy Program for Microsoft SQL Server.
Copyright (C) Microsoft Corporation. All Rights Reserved.
Version: 17.3.0000.1
Windows
C:> bcp "select @@version as v" queryout foo.csv
-D -S mydsn -c -U myuser -t, -r 'n' -P '...'
The DSN specified an unsupported driver.
C:> bcp -v
BCP - Bulk Copy Program for Microsoft SQL Server.
Copyright (C) Microsoft Corporation. All Rights Reserved.
Version: 15.0.1000.34
Both ODBC configurations are using the native "ODBC Driver 17 for SQL Server" drivers. Both are reaching out to the same IP address and port. On both, I can use ODBC/DSN for other non-bulk queries, so it is not a network thing. On windows, bcp
works fine when not using -D
, as in -S ipaddr,port
notation.
- I cannot find a newer version of
bcp
for windows, currently listed here as 15.0: https://docs.microsoft.com/en-us/sql/tools/bcp-utility. - I have tried configuring both a 32-bit and 64-bit ODBC connections using the same connection parameters. (This shouldn't matter, though, since the same DSN is working for regular ODBC operations, just not with
bcp
.) - I cannot use
-T
(network restrictions).
When I try a similar connection with sqlcmd
:
C:> sqlcmd -d mydb -D -S mydsn -U myser -P '...'
Sqlcmd: Warning: '-D' is an obsolete option and is ignored
and removing the -D
fails (server not found).
Windows is win10, 64bit, build 1809.
What am I missing?
sql-server windows odbc bcp
A straight-forward call to bcp
works on linux and not on windows.
Ubuntu
~$ /opt/mssql-tools/bin/bcp "select @@version as v" queryout foo.csv
-D -S mydsn -c -U myuser -t, -r 'n' -P '...'
Starting copy...
1 rows copied.
Network packet size (bytes): 4096
Clock Time (ms.) Total : 78 Average : (12.8 rows per sec.)
~$ cat foo.csv
Microsoft SQL Server 2016 (RTM-GDR) (KB4019088) - 13.0.1742.0 (X64)
Jul 5 2017 23:41:17
Copyright (c) Microsoft Corporation
Standard Edition (64-bit) on Windows Server 2016 Standard 6.3 <X64> (Build 14393: )
~$ /opt/mssql-tools/bin/bcp -v
BCP - Bulk Copy Program for Microsoft SQL Server.
Copyright (C) Microsoft Corporation. All Rights Reserved.
Version: 17.3.0000.1
Windows
C:> bcp "select @@version as v" queryout foo.csv
-D -S mydsn -c -U myuser -t, -r 'n' -P '...'
The DSN specified an unsupported driver.
C:> bcp -v
BCP - Bulk Copy Program for Microsoft SQL Server.
Copyright (C) Microsoft Corporation. All Rights Reserved.
Version: 15.0.1000.34
Both ODBC configurations are using the native "ODBC Driver 17 for SQL Server" drivers. Both are reaching out to the same IP address and port. On both, I can use ODBC/DSN for other non-bulk queries, so it is not a network thing. On windows, bcp
works fine when not using -D
, as in -S ipaddr,port
notation.
- I cannot find a newer version of
bcp
for windows, currently listed here as 15.0: https://docs.microsoft.com/en-us/sql/tools/bcp-utility. - I have tried configuring both a 32-bit and 64-bit ODBC connections using the same connection parameters. (This shouldn't matter, though, since the same DSN is working for regular ODBC operations, just not with
bcp
.) - I cannot use
-T
(network restrictions).
When I try a similar connection with sqlcmd
:
C:> sqlcmd -d mydb -D -S mydsn -U myser -P '...'
Sqlcmd: Warning: '-D' is an obsolete option and is ignored
and removing the -D
fails (server not found).
Windows is win10, 64bit, build 1809.
What am I missing?
sql-server windows odbc bcp
sql-server windows odbc bcp
edited 3 hours ago
r2evans
asked 3 hours ago
r2evansr2evans
1063
1063
add a comment |
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "182"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f234247%2fbcp-dsn-specified-an-unsupported-driver%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Database Administrators Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f234247%2fbcp-dsn-specified-an-unsupported-driver%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown