?
Solved

SQL Server 208R2 not recognizing DBF file in linked Server

Posted on 2016-09-15
11
Medium Priority
?
94 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 5
11 Comments
 
LVL 40

Expert Comment

by:lcohan
ID: 41800464
"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
ID: 41800472
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 40

Expert Comment

by:lcohan
ID: 41800476
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
Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

 

Author Comment

by:maximus1974
ID: 41800482
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 40

Expert Comment

by:lcohan
ID: 41800491
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
 

Author Comment

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

Expert Comment

by:lcohan
ID: 41800539
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
ID: 41800571
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
ID: 41800583
new screenshots added of the process and message.
Capture.PNG
Capture2.PNG
0
 
LVL 40

Accepted Solution

by:
lcohan earned 2000 total points
ID: 41801737
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
ID: 41807449
Found the FTP was corrupt.
0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I'm trying, I really am. But I've seen so many wrong approaches involving date(time) boundaries I despair about my inability to explain it. I've seen quite a few recently that define a non-leap year as 364 days, or 366 days and the list goes on. …
In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

718 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