Solved

SQL Server 208R2 not recognizing DBF file in linked Server

Posted on 2016-09-15
11
43 Views
Last Modified: 2016-09-20
I am having an issue where SQL Server does not see a Foxpro DBF file when I attempt to import using SSIS. I see all other files except WOYTRN01.dbf. I am able to update with the following statements below which means SQL sees it via the linked Server and I have proper permissions. I am attempting to import a handful of DBF files from an old system to automate reporting.

SELECT * into WOYTRN01 FROM OPENQUERY(ATQAV, 'SELECT * FROM WOYTRN01 where 1=0')

Open in new window


INSERT INTO WOYTRN01
SELECT * FROM OPENQUERY(ATQAV, 'SELECT * FROM WOYTRN01')

Open in new window


ALTER TABLE [LOKAD].[dbo].[WOYTRN01] ALTER COLUMN [ITEM] varchar(35)

Open in new window


Any insight will be greatly appreciated.
Capture.PNG
Capture2.PNG
0
Comment
Question by:maximus1974
  • 6
  • 5
11 Comments
 
LVL 39

Expert Comment

by:lcohan
Comment Utility
"I am able to update with the following statements below which means SQL sees it via the linked Server and I have proper permissions. "
I think you're actually changing a SQL table not the DBF file...what is this statement returning assuming ATQAV is your linked server name to the DBF file?

SELECT * FROM OPENQUERY(ATQAV, 'SELECT * FROM WOYTRN01)
0
 

Author Comment

by:maximus1974
Comment Utility
Actually the correct statement is:
INSERT INTO WOYTRN01
SELECT * FROM OPENQUERY(ATQAV, 'SELECT * FROM WOYTRN01')

Open in new window


I use this statement to insert data from the linked Server to SQL Server and this works fine.
0
 
LVL 39

Expert Comment

by:lcohan
Comment Utility
You can also use SQL SSMS and navigate to that Linked server then drill down until you see the tables and assuming WOYTRN01 is there Right click it to try a SELECT top something or just run in SQL query

SELECT * FROM [ATQAV]...[WOYTRN01];

see if it works.
You can also check that file properties at windows lever maybe is "Write-only" or hidden even though it doesn't look like from screen shots you posted as Attribute seems to be onle "A" - archived
0
 

Author Comment

by:maximus1974
Comment Utility
Sorry, I understand what you are saying now. I am running the statement now and it takes usually 43 minutes to return results but it works with no errors. This tells me SQL is able to see the dbf through the linked Server.
0
 
LVL 39

Expert Comment

by:lcohan
Comment Utility
OK so is just SSIS that is not "seining" that table and other than name due to some weird chars hidden in it or leading/trailing invisible space I can't really see a reason why is not visible in SSIS...if that is the only one table you have troble with - can you create a copy then rename that copy and see if that works?
0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

Author Comment

by:maximus1974
Comment Utility
I did copy the file's CDX and FPT to a directory on the SQL server and renamed it, same results.
0
 
LVL 39

Expert Comment

by:lcohan
Comment Utility
what about the dbf itself? did you copied/renamed that one as well? cdx are compound indexes and fpt contains the data from Memo type fields. That would be insane if you copy/rename and still can't see that file/table alone. Maybe just put them back after rename as the linked server points to the folder where all the rest of them are not to any new folder unless you created a new linked folder
0
 

Author Comment

by:maximus1974
Comment Utility
I created a foler on a separate folder and copied the three files and renamed all three TEST, DBF, TEST.CDX, and TEST.FPT. Pointed SSIS to the folder and nothing. If bring in another DBF that I am seeing into that folder, I see the new DBF. I am corruption. I have also made sure I have full permissions to the file.
0
 

Author Comment

by:maximus1974
Comment Utility
new screenshots added of the process and message.
Capture.PNG
Capture2.PNG
0
 
LVL 39

Accepted Solution

by:
lcohan earned 500 total points
Comment Utility
If that is the only file that gives you trouble and this is one-time task why you can't import this file only via the T-SQL that works and everything else via SSIS?
0
 

Author Closing Comment

by:maximus1974
Comment Utility
Found the FTP was corrupt.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
table fragmentation 40 73
CREATE DATABASE ENCRYPTION KEY 1 41
SQl query 19 12
t-sql splitting name column 5 22
If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now