How to I force windows to use a specific version of SQLCMD?
I have several versions of SSMS installed on my machine. We have legacy servers running several versions of sql, mainly 2008, 2012, and 2014. I use SQLCMD all the time, but it seems to default to the Version 10 version of the command.
C:Program FilesMicrosoft SQL Server100ToolsBinn
I need to use the one from the newer version for some of the new servers that don't have backwards compatibility enabled.
C:Program FilesMicrosoft SQL Server110ToolsBinn
What settings do I need to change so that I don't have to use the full path every time I want to use SQLCMD?
sql-server sqlcmd command-line
New contributor
add a comment |
I have several versions of SSMS installed on my machine. We have legacy servers running several versions of sql, mainly 2008, 2012, and 2014. I use SQLCMD all the time, but it seems to default to the Version 10 version of the command.
C:Program FilesMicrosoft SQL Server100ToolsBinn
I need to use the one from the newer version for some of the new servers that don't have backwards compatibility enabled.
C:Program FilesMicrosoft SQL Server110ToolsBinn
What settings do I need to change so that I don't have to use the full path every time I want to use SQLCMD?
sql-server sqlcmd command-line
New contributor
add a comment |
I have several versions of SSMS installed on my machine. We have legacy servers running several versions of sql, mainly 2008, 2012, and 2014. I use SQLCMD all the time, but it seems to default to the Version 10 version of the command.
C:Program FilesMicrosoft SQL Server100ToolsBinn
I need to use the one from the newer version for some of the new servers that don't have backwards compatibility enabled.
C:Program FilesMicrosoft SQL Server110ToolsBinn
What settings do I need to change so that I don't have to use the full path every time I want to use SQLCMD?
sql-server sqlcmd command-line
New contributor
I have several versions of SSMS installed on my machine. We have legacy servers running several versions of sql, mainly 2008, 2012, and 2014. I use SQLCMD all the time, but it seems to default to the Version 10 version of the command.
C:Program FilesMicrosoft SQL Server100ToolsBinn
I need to use the one from the newer version for some of the new servers that don't have backwards compatibility enabled.
C:Program FilesMicrosoft SQL Server110ToolsBinn
What settings do I need to change so that I don't have to use the full path every time I want to use SQLCMD?
sql-server sqlcmd command-line
sql-server sqlcmd command-line
New contributor
New contributor
edited 4 hours ago
Solomon Rutzky
49.3k582179
49.3k582179
New contributor
asked 8 hours ago
Red_ShadowRed_Shadow
1134
1134
New contributor
New contributor
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
Have you tried updating the PATH variable?
For Windows 10, do the following:
In the File Explorer, right-click on This PC.
In the context menu, click Properties.
In the System window, click the Advanced system settings page on the left-hand side.
In the Advanced Tab, click on Environment Variables.
In the System Variables window, highlight Path, and click Edit.
In the Edit System Variables window, insert the cursor at the end of the Variable value field.
If the last character is not a semi-colon (;), add one.
After the final semi-colon, type the full path to the file you want to find.
- In your case: C:Program FilesMicrosoft SQL Server110ToolsBinn
Find the path with 100 in it, and then remove it.
Click OK in each open window.
Word of caution: After doing these steps, you will not be able to auto-find any other exe's that the system was able to find earlier in the older path you just removed.
add a comment |
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
});
}
});
Red_Shadow is a new contributor. Be nice, and check out our Code of Conduct.
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%2f232639%2fhow-to-i-force-windows-to-use-a-specific-version-of-sqlcmd%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Have you tried updating the PATH variable?
For Windows 10, do the following:
In the File Explorer, right-click on This PC.
In the context menu, click Properties.
In the System window, click the Advanced system settings page on the left-hand side.
In the Advanced Tab, click on Environment Variables.
In the System Variables window, highlight Path, and click Edit.
In the Edit System Variables window, insert the cursor at the end of the Variable value field.
If the last character is not a semi-colon (;), add one.
After the final semi-colon, type the full path to the file you want to find.
- In your case: C:Program FilesMicrosoft SQL Server110ToolsBinn
Find the path with 100 in it, and then remove it.
Click OK in each open window.
Word of caution: After doing these steps, you will not be able to auto-find any other exe's that the system was able to find earlier in the older path you just removed.
add a comment |
Have you tried updating the PATH variable?
For Windows 10, do the following:
In the File Explorer, right-click on This PC.
In the context menu, click Properties.
In the System window, click the Advanced system settings page on the left-hand side.
In the Advanced Tab, click on Environment Variables.
In the System Variables window, highlight Path, and click Edit.
In the Edit System Variables window, insert the cursor at the end of the Variable value field.
If the last character is not a semi-colon (;), add one.
After the final semi-colon, type the full path to the file you want to find.
- In your case: C:Program FilesMicrosoft SQL Server110ToolsBinn
Find the path with 100 in it, and then remove it.
Click OK in each open window.
Word of caution: After doing these steps, you will not be able to auto-find any other exe's that the system was able to find earlier in the older path you just removed.
add a comment |
Have you tried updating the PATH variable?
For Windows 10, do the following:
In the File Explorer, right-click on This PC.
In the context menu, click Properties.
In the System window, click the Advanced system settings page on the left-hand side.
In the Advanced Tab, click on Environment Variables.
In the System Variables window, highlight Path, and click Edit.
In the Edit System Variables window, insert the cursor at the end of the Variable value field.
If the last character is not a semi-colon (;), add one.
After the final semi-colon, type the full path to the file you want to find.
- In your case: C:Program FilesMicrosoft SQL Server110ToolsBinn
Find the path with 100 in it, and then remove it.
Click OK in each open window.
Word of caution: After doing these steps, you will not be able to auto-find any other exe's that the system was able to find earlier in the older path you just removed.
Have you tried updating the PATH variable?
For Windows 10, do the following:
In the File Explorer, right-click on This PC.
In the context menu, click Properties.
In the System window, click the Advanced system settings page on the left-hand side.
In the Advanced Tab, click on Environment Variables.
In the System Variables window, highlight Path, and click Edit.
In the Edit System Variables window, insert the cursor at the end of the Variable value field.
If the last character is not a semi-colon (;), add one.
After the final semi-colon, type the full path to the file you want to find.
- In your case: C:Program FilesMicrosoft SQL Server110ToolsBinn
Find the path with 100 in it, and then remove it.
Click OK in each open window.
Word of caution: After doing these steps, you will not be able to auto-find any other exe's that the system was able to find earlier in the older path you just removed.
answered 8 hours ago
GaganLambaGaganLamba
1224
1224
add a comment |
add a comment |
Red_Shadow is a new contributor. Be nice, and check out our Code of Conduct.
Red_Shadow is a new contributor. Be nice, and check out our Code of Conduct.
Red_Shadow is a new contributor. Be nice, and check out our Code of Conduct.
Red_Shadow is a new contributor. Be nice, and check out our Code of Conduct.
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%2f232639%2fhow-to-i-force-windows-to-use-a-specific-version-of-sqlcmd%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