I have a flat file stored locally on the same server where SSIS is running.
When choosing the location of my flat file in the flat file connection manager, I could use the local drive (d:\testfiles\flatfile.txt) or I could use the UNC path (\myserver\flatfileshare\flatfile.txt.)
Both are pointing at the same file and the package is succesful either way. Is there a performance reason for why I should choose one over the other?
More than a performance reason, if you choose the UNC path, you have a more flexible solution. In that case, if you change the SSIS package, so it runs on another server, the path to the file will be correct.
Specify your files like this:
\\server\sharename\path\file.txt
This will work in both places.
Referred to as a UNC path.
When I had XP, I loved this utility for generating them - clippath. You could right-click a file and it would copy the path to your clipboard. Magical.
Now I'm on Win7 x64 and it's not supported. Windows7 has a copy file path, but it seems to use the drive letter, which is not what we want, is it?
Looking up a file is a trivial location, I wouldn't worry about the diff.
I'd use some sort of package configuration to store the path for the file, it's a much more flexible solution.
Related
I have the drive mapped to my PC, which is no good.
I need to find the UNC path of the excel/csv files. The use case if for linking with Tableau.
I'm using windows 10.
There are several answers in this SO post, you can check some answers there.
But of all, here is the quickest:
Maybe a long way around but open a cmd window. Then do net use >
filename
Then open the filename and you can get the path:
Ex:
C:\Users\me\net use > drives.txt
Opening drives.txt
New connections will be remembered.
Status Local Remote Network
-------------------------------------------------------------------------------
H: \\server\c\proj\net Microsoft Windows Network
Can copy \\server\c\prog\net from the file for your use.
Hope this helps.
You also have another choice, convert shared folder path to UNC path.
I'm quite confused as to how to create a deployment in SSIS 2008 that I can use throughout the various sites we are going to deploy to. I'm using the deployment utility to deploy my ETL packages which are file based and executed using a SQL job.
When I rebuild my solution, the deployment files are created along with their configuration files which I bind my connection strings to. I've discovered that each of the packages are still referencing the configuration files in my project folder, rather than the configuration files in the deployment folder. I thought that when I created a deployment, the paths referencing the configuration files would be relative paths.
Ideally, what I would have liked to have been able to do would be to copy the contents of the deployment folder to a flash drive, plug it in at the site I'm deploying to and edit the configuration file per the customer site, execute the deployment manifest file in the folder and expect everything to work. But this doesn't seem to be the case.
I also notice that the SQL job has an option to specify the configuration files for the packages, but this doesn't seem to have an effect either. I must clearly be doing something wrong here, please could someone assist.
Seems like you are encountering these two issues with SSIS deployment and execution:
Configuration file references are stored with absolute paths (meaning the concrete path used in the development environment when the configuration file reference was created, and in production this is the same path that will be used).
Specifying a different configuration file at runtime in SSIS 2008 cannot override values specified at design time (see Understanding How SSIS Package Configurations Are Applied at Run Time).
To deploy your packages with a simple file copy the way you describe, you must change your packages to use a relative reference to your configuration files:
Right click the package file and select View Source to open the XML view of the package source. Search for your configuration file, which will include the path, and remove the path; keeping only the filename portion. Alternatively, change the absolute path to a relative path to the configuration file. Save and close the XML view of the package.
Now when you deploy the package and the configuration file together, ensuring they have the same relative location to each other, the package will find the config file by the relative path, and work the way you expect.
Note: from this point forward you will need to open the BIDS IDE by double-clicking on the project or solution file. If you launch Visual Studio, and then open the project or solution from within the IDE, the IDE will not be able to find the configuration file when you execute the package (the current directory will be Windows\System32, not your package folder).
I am using SSIS 2012 to perform a couple basic tasks. The issue I am having occurs in both a Process Execute task and a Flat File connection. When developing the file is local, but I am using an expression to replace the file directory once deployed. I have the files, which are a CSV and a BAT file in the "Miscellaneous" folder.
I would like to be able to reference the relative path of the files rather than an explicit directory on my computer. This would also prevent other developers from having to stage the files locally before being able to even validate the package.
Try using Project Parameter as your folder path.. and use it in your expression Something like
#[$Project::FileLocation] +#[User::FileName]
If I use JavaScript to create a file on a HTML5 Filesystem, can I find it on the real file system of my computer?
originally I think all file is stored on a virtual file system , so files can be protected. but it's not. for chrome, file is placed at "C:\Users\user name\AppData\Local\Google\Chrome\User Data\Default\File System" with obfuscated name on windows 7. so you can operate on it as local file.
I have the need to copy the entire contents of a directory on a FTP location onto a shared networked location. FTP Task has you specify the exact file name (not a directory) and File System Task does not allow accessing a FTP location.
EDIT: I ended up writing a script task.
Nothing like reviving a really old thread... but there is a solution to this.
To copy the all files from a directory then specify your remote path to be /[directory name]/*
Or for just files and not directories /[directory name]/.
Or specific file types; /[directory name]/*.csv
I've had some similar issues with the FTP task before. In my case, the file names changed based on the date and some other criteria. I ended up using a Script Task to perform the FTP operation.
It looks like this is what you ended up doing as well. I'd be curious if anyone else can come up with a better way to use the FTP task. It's nice to have...but VERY limited.
When I need to do this sort of thing I use a batch file to call FTP on the command line and use the mget command. Then I call the batch from the DTS/DTSX package.