Solved

SQL Server 208R2 not recognizing DBF file in linked Server

Posted on 2016-09-15
11
50 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
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 39

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
 

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 39

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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

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 39

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 39

Accepted Solution

by:
lcohan earned 500 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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Suggested Solutions

Composite queries are used to retrieve the results from joining multiple queries after applying any filters. UNION, INTERSECT, MINUS, and UNION ALL are some of the operators used to get certain desired results.​
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
Need to grow your business through quality cloud solutions? With everything required to build a cloud platform and solution, you may feel like the distance between you and the cloud is quite long. Help is here. Spend some time learning about the Con…
A company’s greatest vulnerability is their email. CEO fraud, ransomware and spear phishing attacks are the no1 threat to a company’s security. Cybercrime is responsible for the largest loss of money to companies today with losses projected to r…

937 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

3 Experts available now in Live!

Get 1:1 Help Now