How to move file using File System Task in SSIS package - ssis

I am very new to SSIS, looking at a package already created by someone else and deployed on SQL server. There is a File System Task that moves files to a network share. I need to change the path of the destination folder. The destination folder requires a domain login.
I can change the folder path in the
global variable. Do I have to
redeploy the package after making
this change? Can the change be made directly on the SQL server?
How do I change the user name and password for this network share? Where is this infomation saved? I don't see it in any of the variables.
There is a SQL Job on the server with the same name, how do I check if this Job is related to the SSIS package?

You can change the folder path in the variable. You will need to redeploy after doing this unless the variable is stored in a configuration file. If that is the case, you can just change the configuration file, and won't need to redeploy.
The user name and password will probably be stored in the Flat File connection. Look at the bottom of the package in the section labelled Connection Manager.
If there is a job of the same name, it was most likely created for the SSIS package of the same name. If you open the job for editing in SSMS, you can look at the job steps and confirm that the dtsrun command references the SSIS package.

Related

Sql Server - Run job which contains dtsx that creates files in a remote folder in another server

I am doing a SSIS dtsx file in which I access data in Dynamics CRM. This is the procedure:
* Someone copies files in a folder (.txt files from OCR, that's an external process).
* The SSIS grabs those files and copy them to another folder "Processed". Then the SSIS looks for data in those .txt and creates records for entities in Dynamics CRM.
* When some record canĀ“t be created on CRM, it is an Error and the SSIS creates a temporal table in SQLServer with the error. Then the SSIS creates some .txt files which show all the errors, the number of the row and name of the original file.
I could run it from the Visual Studio, but I am not able to run it from a job. I've followed those steps: https://www.codeproject.com/Articles/14401/How-to-Schedule-and-Run-a-SSIS-package-DTS-Job-in , but still not running.
What may I do to handle this?
The dtsx in the job is in a SQL server and the files which I want to work with are in a CRM server.
Thanks very much for your help!
Finally ir worked!!
I followed the steps again and I could run the job successfully.

Transfer output file of T-SQL statement in SSIS package to another server

I have an existing SSIS package on my DB server and I have another server which is the application server which uses this DB server for its operation. This SSIS package, is being used by a job running on the DB server. I would like to add an additional step. That step is just a basic select count(*) query to get count from one table. I implemented that on my test server and gave the output path in the advanced tab as well. And i got the output in a simple text file.
My question now is, How do i send this output file to my application server instead? Because the output path of a T-SQL server seems to only take local drives. I tried giving the path of my application server(which was being used by the SSIS package already) but the output doesn't come on the text file even 'though it says the job executed successfully. I don't see the necessity to create another SSIS package for just getting a simple count info.
Use the UNC path to your application server file system.

Error on creating a folder in SSIS MSDB

I'm trying to create a folder for my SSIS packages like I've done on several servers up to now.
But instead of the folder being created, I recieve the following error: SSIS folder 'XXX' already exists in the specified parent folder. (Microsoft SQL Server Native Client 10.0)
I've tried using several diffrent names but have recieved the same error each time.
This is a new instance of SSIS that I set up today, so I'm very sure no other folders exist.
Found the culprit!
At first I tried the solution suggested by #billinkc in the comment, it worked (I managed to create a folder) but the folder wasn't usable as I couldn't upload packages.
I have db_owner permission on the MSDB database and so I can see and access the SSIS MSDB folder.
What I really needed was the db_ssisadmin permission. Not to worry as db_owner permissions allow me to give myself the db_ssisadmin permission!
After this was done, all the problems (the one in the original Q and more) disappeared.

Receive Excel Files from FTP Task changing file names everytime

Im loading excel files from ftp server to SQL Server where ftp server will contain only one file.
There is change of having the file with different name on monthly basis and old file is deleted. At that time if we run the package the package will fails, because ftp server contains new file with new name.
So, how to capture the new file.
Can anybody help me?
you need to use MASK to set the file name for example *.xlsx. Go to FTP Task Editor, set RemotePath to /your ftp path/*.xlsx.

Use SSIS to transfer file from FTP to Server

This is probably too simplistic a question but here goes.
I have a client that will drop xls files into a folder on our FTP site. I need to check if a file exists, I need to move it from the FTP folder to a folder on the server. Once the processing is done, I need to send another (but different) xls file back to a folder on the same FTP server.
I can see that there is an FTP task and I can connect to the FTP site, but I am unsure on how to specify where to send the file and also how to only select a file at a time.
I think if I just concentrate on the first part, I can work on getting the file back as a second step.
So the end result is to check the folder on the FTP site, if a file exists move it to the server.
The SSIS FTP task wraps the basic FTP syntax you would use if you were connecting to the FTP site interactively. Here's a review of basic FTP syntax.
So here's what you should be looking for when you're editing the FTP task. 1) The task needs to log into the FTP server, 2) it needs to know that it is performing a GET operation, 3) it needs to know the path and filename of the file it is supposed to retrieve from the FTP server, and 4) it needs to know where to drop the file on the local server.
So, in the FTP Task Editor, you want to go to the General tab and create an FTP connection. Then go to the File Transfer tab, and then set the "Operation" -> "Receive files", and fill in values for the Local Path and the Remote Path. (Or you can keep those paths in SSIS variables and have the task get them from there.)
The IsTransferAscii setting is False by default. This means it will assume it is transferring a binary file. Alternatively, if you tell it to treat it like an Ascii file, it will try to fix the line endings to account for the different combinations of carriage return and line feed characters used by various operating systems. You don't want that if you want to transfer the file verbatim, but you might want it if you're going back and forth between Windows and Linux or something.
You should also learn a little interactive FTP syntax. I often use this to figure out why SSIS is having a problem transferring files. Go to the command prompt and type "ftp". You can then type "?" to see a list of commands. Or just type "ftp yourservername", log in, and use cd and ls to walk around the directory structure and see what's there.