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


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
>
>
>



Relevant Pages

  • Re: Side-by-side upgrade - moving master, msdb and model
    ... MVP - Windows Server - Clustering ... "In some cases, you may want to copy the system databases, including ... from the source SQL Server 2000 instance to the SQL ...
    (microsoft.public.sqlserver.clustering)
  • Re: BizTalk Server 2004 ConfigFramework.exe error
    ... one BizTalk is installed on? ... machines (both for SQL and DTC) is not blocked by firewalls and new MSDTC ... Multi-computer configuration using Windows Server 2003 or Windows XP ... >>all associated databases. ...
    (microsoft.public.biztalk.general)
  • RE: Clustering a standalone SQL server + storage array
    ... working as expected with out error your ready to install sql server. ... log files to the data and log shared drives you setup as part of the cluster. ... Our apps team look after a trading system that uses an HP DL360 server ... running SQL 2000 SP3a with a few small databases on it. ...
    (microsoft.public.sqlserver.clustering)
  • Re: Store procedure vs Direct statement ???
    ... sql also executes on the server. ... In response to your example of stored procedures having a security advantage ... When you give users permission to access tables you must be aware you have given ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Side-by-side upgrade - moving master, msdb and model
    ... MVP - Windows Server - Clustering ... "In some cases, you may want to copy the system databases, including the ... from the source SQL Server 2000 instance to the SQL ...
    (microsoft.public.sqlserver.clustering)