Connecting to a File share with a flat file source in SSIS2005 - sql

I have created a SSIS package in BIDS005 that uses a flat file source as the input. The file I am wanting to use doesnt exist on my local machine, or on the server where the package will be executed. The file exists on a file share on another server, however when I try to use the server path for example:
\\servername\fileshare$\filename.csv
I get an error message saying:
A valid filename must be selected
Any ideas why this is happening?

It could be a permissions problem. Do you have a valid connection to the file containing the userID & pwd to connect to the share drive?
Is it a problem in the development environment, or only when deployed?

Related

Using IP ADDRESS in PROC EXPORT in SAS

I'm using PROC EXPORT of SAS to export information in xlsx format into a shared folder in my network. When I use the servername in the path of the output file, everything works well. When I change for the IP ADDRESS of the server, I get the following error:
ERROR: Connect: The Microsoft Access database engine cannot open or write to the file '\\123.12.12.12\PUBLIC\TEST1.xlsx'. It is already opened exclusively by another user, or you need permission to view and write its data.
Here it's my code:
proc export
data=WORK.TABLE1
DBMS=EXCEL
outfile="\\123.12.12.12\PUBLIC\TEST1.xlsx"
REPLACE;
SHEET='A';
run;
Do you know if the IP ADDRESS format is supported by PROC EXPORT? If not, it exists other method to export in SAS by using IP ADDRESS in the path of the output file? I have to use a way with IP ADDRESS as the servername is changed from time to time and I a have a bunch of scheduled SAS projets.
Thank you,
Dan
That error is coming from the file system. SAS is using the file system to get to whatever path you specify, so in Windows, what you have should work.
Possible Problems:
Someone else has the file open.
Another process has locked the file.
You (the user SAS runs as) do not have write permissions to the file
or directory.
Test #3 by
data _null_;
file "\\123.12.12.12\PUBLIC\TEST1.txt";
put "Hi";
run;
This will confirm you have write permissions in the directory. If SAS is running on the server, do this in the same way you call your other program.
If that is successful, then try deleting the XLSX file from Windows. If that fails, you don't have permission or someone has the file opened. You will need to debug that.
If it succeeds, then rerun your program. Hopefully it will create the file.

How to check file existence on remote Ftp server with simple ftp command line

From within my Access VBA I am running a batch file of ftp commands to upload some files to my remote server. I want to check the existence of a lock file on remote server before I decide to upload but cant figure it out. If it is not possible through simple ftp command line, I would take a VBA solution too.
open domain.com
username
password
binary
cd remotedir
lcd localdir
put web_status.csv
put web_customer.csv
disconnect
bye
LIST. List the folder and filter by the extension. If the file is locked generaly have a extension the locked file.
This is what worked for me in the end:
Connect to CLI ftp
mls remotefile localfile //<< This command creates loaclfile only if remote file exists
in VBA, check loaclfile existence with if (dir(localfile) = "")
Now you know whether remote file exists

How to check if file exist at FTP server in Objective-C

In this app, I am using FTP server to download and upload images to the server. Now, I want to check if file exist at server. I would have the file name to check on the server. Currently, I am using FTPManager class to do all uploading and downloading. Its working fine. But I couldn't find any solution to check if file exist at server
Please help me in this.
Assuming you're talking about this FTPManager class, it seems to me like you should be able to create a new FMServer instance with the path to the folder you want, then call the manager's -contentsOfServer: method to get an array of dictionaries containing file information at that path.

How to get a the remote file attributes through FTP using ConnectionKit

I need to get the file attributes of a remote file using the ConnectionKit framework.
What I am trying to do is compare the modification date of the file on the server and if it is newer than the local copy then download it. I've got the CKTransferRecord for the transfer but this only gives me the remote file path not that remote files attributes.
What is the best way to get the remote files attributes?
Thanks for your help!

SQL Server - Error when trying to reference a .mdf file

For a NUnit test I need to reference a .mdf file from a .config file. Unfortunately, I get the following error message:
The FOR ATTACH option requires that at least the primary file be specified.
An attempt to attach an auto-named database for file
C:\....\*.mdf
A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.
I looked for this error on google but didn't find anything that helped me solve my problem.
Any idea?
Thank you
Edit
Apparently the .log file is missing.
Yeah, as snippy as it sounds:
A database with the same name may already exist (database name possibly != file name).
The specified file may not be something SQL Server has access to
Is the file unique and not bound to the server at the same time (like from another unit test)? Does the SQL Server service account have access to the file?