Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL Linked server StoredProcefure job creates temp files

Status
Not open for further replies.

BeatriceC

Technical User
Jan 20, 2021
6
US
I have a legacy Visual FoxPro application with flat tables that I needed to access the tables from SQL.
I create a Linked server on SQL Server Management studio.
The created a Database.
Create a stored procedure that copies certain tables to the database using openquery.
I scheduled a job to run the stored procedure at 6 minute intervals.

All works fine, except at the source location of the flat tables on FoxPro share, there are temp files being created. one file for each table in the stored procedure being written out at the 6 minute intervals.

What would cause these temp files form being written out?
Is there a configuration on the job or a command on the stored procedure that would prevent these files from being created?

I attached a screen pint of the temp files that are being written.
Here is the stored procedure.

**************
USE [DatabaseName]
GO
/****** Object: StoredProcedure [dbo].[CopyTables] Script Date: 2/19/2021 9:43:41 AM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

ALTER PROCEDURE [dbo].[CopyTables]
-- Add the parameters for the stored procedure here

AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;


--1. Pull 5 tables from EPRMS to get live tool states
Drop Table TableName
SELECT *
INTO TableName
FROM OPENQUERY(LinkServerName,'select * from TableName
')
*****************************
 
 https://files.engineering.com/getfile.aspx?folder=59ab21c6-a73e-4145-887e-1c556c51ce56&file=ScreenHunter_112_Feb._19_11.40.jpg
I can't answer your question, but I suspect that it is related to FoxPro rather than SQL Server.

You might do better to post this on a FoxPro forum.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top