RE: How to access a local text file from SP on remote database.
From: John Bell (JohnBell_at_discussions.microsoft.com)
Date: 09/14/04
- Next message: x-rays: "Ordinal Position"
- Previous message: John Bell: "RE: Problem in using trigger"
- In reply to: Mark Butler: "How to access a local text file from SP on remote database."
- Next in thread: hkvats_1999_at_yahoo.com: "Re: How to access a local text file from SP on remote database."
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 14 Sep 2004 00:33:09 -0700
Hi
You may want to look at running a scheduled DTS package on each of these
servers, this may help http://www.sqldts.com/default.aspx?292
In SQL 2000 BULK INSERT will take a UNC name as the data file.
John
"Mark Butler" wrote:
> I have a set of text files which are ftp'd to my server daily. I have to
> update these to multiple remote SQL databases. I am linked to these
> databases via a VPN and use the IP address to set up the link to my local
> server. Each of these stored procedures build a work file from these text
> files using a "BULK INSERT" statement as follows.
>
> ------------------------------------
> CREATE PROCEDURE sp_county
> @updates_dir varchar (500)
> AS
> --build the county lookup table
> CREATE TABLE [dbo].[wk_file]
> ([wk_data] [char] (54) NULL)
>
> DECLARE @bulk_insert varchar (500)
> SET @bulk_insert='BULK INSERT wk_file FROM "'+@updates_dir+'county.seq'+'"
> WITH (TABLOCK)'
> EXEC (@bulk_insert)
> ------------------------------------
>
> How can I point the @updates_dir at my server? It seems that I can only
> access local drives to the server with the physical databases. Is there a
> better way I am not seeing? Any insight would be appreciated.
>
> TIA
> Mark
>
>
>
- Next message: x-rays: "Ordinal Position"
- Previous message: John Bell: "RE: Problem in using trigger"
- In reply to: Mark Butler: "How to access a local text file from SP on remote database."
- Next in thread: hkvats_1999_at_yahoo.com: "Re: How to access a local text file from SP on remote database."
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|