Link to home
Start Free TrialLog in
Avatar of JeepGeekin
JeepGeekin

asked on

Setting PATH Environment Variable for SQL

I am trying to control the version of dtexec.exe that is used by default on a server with multiple sql versions installed. As far as I know, the order of the SQL directories in the environment variable PATH will make this determination.

I have changed the PATH setting, but something keeps changing it back on startup. Does anyone know how I can permanently alter this so it stays? I'm not suer what is setting it back. I have checked the Startup & sysedit & I don't see anything there that can be doing this.    
Avatar of Anthony Perkins
Anthony Perkins
Flag of United States of America image

Instead of relying on the PATH Environment, why not set the path to the correct DTEXEC version?
Or while referencing the DTEXEC, why didn't you specify the Full file path to avoid these confusions..
Avatar of JeepGeekin
JeepGeekin

ASKER

Thanks for the input guys.

For acperkins. I thought that's what I did. I may need more info to give you a better answer.

For rrjegan17, I do use the full path, but I my goal is to install SQL 2008 on a shared server with 2005 and I want to minimize the impact to others who may not have refernced it this way by setting the path back to 2005.  
Actually I follow you acperkins, it's basically what rrjegan17 mentioned. See my ultimate goal above. I didn't think I needed to mention this to keep it simple.
ASKER CERTIFIED SOLUTION
Avatar of Anthony Perkins
Anthony Perkins
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Don't take it personal. Your solution is ideal (and what I am doing myself), but it's not what I am trying to accomplish with this question.

I need to install 2008 on a server that has been in use for a while & I don't want to break any apps that may not have a direct path to the dtsexec.exe because 2008 will sudden;y be the default on the server. I want to set the default back to 2005 after I install 2008. When I manually change the order of the SQL directories in the PATH env. variable & reboot, it gets set back the way it was somehow. I am trying to find out how to control this PATH setting or if there is a better way to set the default SQL component version used on a server with multiple versions, that would help as well.
Please ignore the "don't take it personal" part. This isn't a place to make personal remarks like that. It's a professional forum. I apologize.
No need to apologize.  I appreciate the gesture.  And you are right, I had not fully grasped what you were trying to do.

You are right setting the PATH from the DOS is not going to help you very much.  You need to change the environment PATH from the Control Panel.  As in System applet, Advanced tab, click on Environment Variables.