uSING XP_CMDSHELL

  • Let me explain u wat we doing ..

    We have two temp variable

    one for root path

    second one for config path

    the root path variable is assigned to ssis variable

    ssis varibale + \ path is used inside the package for storing stage files which are created while executing the package..

    If we hard code the path we need to change that every where and that wont make things dynamic..this will help while migrating to other servers

  • Right. So instead of using the OS to store your path, put it into a config file and map the SSIS package to read the config file to get the path details. Then part of deployment is to update the config file. It's just a text file. You have to update a text file somewhere on deployment, whether it be a batch file or a config file. But if you use the config file you put everything into SSIS without reference to the OS save for the location of where the config file is stored. And this mapping of package to config file is done at the job level. The only thing you "hard code" in the package is the structure of the contents of the config file. The value is that you don't need xp_cmdshell or the OS to do any of this; SQL Server can handle what I am describing out of the box. Then you just put in deployment instructions the values in the config file that must be specified upon installation. Any server admin should be able to handle that.

  • Awesome Jeff....

    will talk to SSIS guys and let u know ..

    Thanks for ur help & support..

  • The variable in cmd file is storing the path of config file 🙁

  • If you are running the SSIS as a SQL job you can map the config file location as an attribute of the job step. Alternatively, you can supply the config file as part of the DTSExec command string. Use the /Conf[igFile] filespec switch as described in Books Online. You still haven't shown me anything that requires an environment variable in the OS.

  • You are right...

    Still they opposing the suggestion..They staes if we schedule the dtsx file in some other scheduler in that case we cant give config file in job tats wat they telling..:hehe:

  • Even if they type in the config file path as a parameter on the command line for DTExec? Man, that's clueless. Well, not sure what I can tell you. Your people are demanding that you open a security hole for no other reason than their comfort.

  • From our discuss me tto feel the same..but I am junior guy here and dont have much to recommend...They still feels that what they do is right ..Now they came down from 2 to 1 environment variable..but still one for config file path,the root folder..The reason the telling is that they can use the same for different projects...

    Can you please let me know what are the security impacts if we use environment variable??

Viewing 8 posts - 16 through 22 (of 22 total)

You must be logged in to reply to this topic. Login to reply